what happens to pool if ZIL dies on ZFS v14

Freddie Cash fjwcash at gmail.com
Fri Sep 17 17:03:56 UTC 2010


On Fri, Sep 17, 2010 at 9:37 AM, Jeremy Chadwick
<freebsd at jdc.parodius.com> wrote:
> 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?)

Yes, there has been a ZIL in ZFS from the very beginning.  Originally,
it was part of the pool.  Then the ability to have separate log (slog)
devices was added.  At the time that slog support was added, the
recommendation was to mirror the slogs, since losing the slog would
kill the entire pool.  Then in ZFSv19, support for removing slogs and
booting with a dead slog was added, so one could run with non-mirrored
slogs.

Disabling the ZIL has no bearing on whether or not the pool dies when
the slog dies.

> You can search the FreeBSD lists for people continually advocating
> vfs.zfs.zil_disable=1.  There's even a couple blog posts from engineers
> talking about how the only way to get their filers to behave decently
> was to disable the ZIL[1][2][3].  In most (every?) cases I've seen where
> someone advocates disabling the ZIL, pool details aren't provided, which
> leads me to believe their pools have no "log" devices.

Correct.

However, disabling the ZIL is orthogonal to having slog devices and
whether or not the pool dies when the slog dies.  You can have
separate log devices, then disable the ZIL, but the slog devices will
remain as part of the pool, just unused.

For example, in ZFSv14, if you have a separate log device, then
disable the ZIL, then the slog device dies (or you physically remove
it), and you reboot ... your pool is dead as the log device is
inaccessible.  (There may be rare occasions when you may be able to
boot without the slog if there's no data in the slog, but I wouldn't
count on it.)

> Here's a better way to phrase my question: does vfs.zfs.zil_disable=1 do
> anything if there aren't any "log" devices in use (in any pool)?

Yes, it disables the in-pool ZIL.  ZFS always has a ZIL unless you
disable it.  the only difference is where the ZIL is located (in-pool
or on separate device).

-- 
Freddie Cash
fjwcash at gmail.com


More information about the freebsd-fs mailing list