ZFS: How to enable cache and logs.

Bob Friesenhahn bfriesen at simple.dallas.tx.us
Thu May 12 14:08:06 UTC 2011


On Thu, 12 May 2011, Jeremy Chadwick wrote:
>
> What guarantee is there that the intent log -- which is written to the
> disk -- actually got written to the disk in the middle of a power
> failure?  There's a lot of focus there on the idea that "the intent log
> will fix everything, but may lose writes", but what guarantee do I have
> that the intent log isn't corrupt or botched during a power failure?

This is pretty easy.  Zfs requests that the disk containing the intent 
log commit its update (and waits for completion) before it returns 
from the "write" request.  As long as the disk does not lie, the data 
will be present after the reboot.

Note that many SSDs do lie about cache commit requests and these are 
best avoided for anything to do with zfs.

Bob
-- 
Bob Friesenhahn
bfriesen at simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/


More information about the freebsd-fs mailing list