what happens to pool if ZIL dies on ZFS v14
Bob Friesenhahn
bfriesen at simple.dallas.tx.us
Sat Sep 18 15:48:19 UTC 2010
On Fri, 17 Sep 2010, Jeremy Chadwick wrote:
>>
>> This (dead ZIL == dead pool) only applies to separate log (slog) devices.
>
> I was under the impression ZFS still managed to utilise the ZIL when a
> pool didn't have any "log" devices associated with it (possibly some
> sort of statically-allocated amount of RAM?)
To clarify, the ZIL (ZFS Intent Log) is a non-volatile log of pending
(uncomitted) synchronous write requests. ZFS always has one. A
synchronous write does not return until the data is at least written
into the ZIL. If you "disable ZIL" then you are pretending that
synchronous writes were immediately written (even when they were not).
This will not endanger your pool, but recently requested synchronous
writes may be lost (just as recent asyncronous writes may be lost) if
the system loses power, or spontaneously reboots.
By default, ZFS will buffer up to 30 seconds of writes (async + sync)
and in fact zfs writes are coherent so that synchronous writes are
treated the same as asynchronous writes. The only difference is that
when a synchronous write completes, it is cleared from the ZIL. The
ZIL is used to replay buffered synchronous writes which did not
complete prior to a system crash or unexpected reboot.
The 30 seconds of buffering only occurs on systems with a very large
amount of RAM and/or a relatively slow write rate. Otherwise, zfs
will write data much more often. If a system has limited RAM, then it
will also buffer less data in the ZIL since it needs to write more
often.
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