Boot problem if a ZFS log device is missing

Matt Churchyard matt.home at userve.net
Fri Aug 30 12:24:58 UTC 2013


> Yesterday I have done some test. If I remove the stick from the USB
> port, before the shutdown the PC, it  don't crash but continues to
> works. Then  I am able to reboot the laptop without inserting the 
> stick
> with a pool that works in degraded mode.

> From the end user point of view a PC should always boot, even with a
> missing ZFS log device.

The problem is that if a machine comes up without a LOG device that was 
there previously, It can't guarantee that there weren't pending writes. 
To automatically import the pool could be dangerous - leaving critical 
data corrupt. That's not really acceptable in a production environment. 
ZFS does the *right* thing by requiring an admin to get involved. It may 
be that the admin forces a rollback and checks any applications are ok 
manually, or it could be that they just plug in a device that was 
removed by accident.

I haven't followed official ZFS since Oracle came along but Sun's kit 
used to only allow a simple disk or mirror for the root pool. There are 
some good reasons for this, and the failure to import the pool if ZIL is 
lost was probably one of them. I wouldn't recommend running any serious 
system with a large or complex pool that's also being used for root.

For a home PC maybe it is useful to have a tunable that says "just 
force an import and ignore any possible writes if the ZILs gone, I'll 
deal with any problems that appear". The only issue with that is most 
people won't know to switch it on until it's too late.


More information about the freebsd-fs mailing list