HAST + ZFS causes system to shutdown uncleanly?

Lorenzo Perone lopez.on.the.lists at yellowspace.net
Sat Mar 19 00:01:57 UTC 2011


On 17.03.11 22:00, Thomas Johnson wrote:
> (replying again with the list CCd)
>
> Adding the hastd to the REQUIRE in zfs does not have any effect; although
> I'm not even sure if /etc/rc.d/zfs gets called during shutdown ('rcorder -k
> shutdown /etc/rc.d/*' would seem to indicate that it does not. I am using
> devd/CARP to manage my pools, but it seems to me that if the zfs rc script
> were running on shutdown it would handle this case properly, since the zfs
> script appears to simply run a 'zfs unmount -a'. I did add/test with
> enable_zfs=YES in my rc.conf, to no avail.
>
> A shutdown hook was my thought too.
>
> Also, to clarify an omission in my initial email, the vm hangs after the
> "All buffers synced." message on shutdown.

Now that I read this, I must add I've had the same thing lastly - in 
another situation unrelated to HAST. I'm not sure it is necessarily 
related, but if yes, it might be helpful to know:

When testing the hot-pluggability of drives in a non-redundant zpool, I 
ran into the same situation: stuck at "All buffers synced.".

I did an evil thing for testing: just plugged out one of the drives (in 
a non-redundant pool). This was noticed by the OS without panic (yepee! 
good news!), and also by the zpool status ('One or more devices are 
faulted in response to IO failures.' 'Make sure the affected devices are 
connected, then run 'zpool clear'.') Drives in zpool status were still 
all listed as ONLINE (not correct - but this might be also related to 
the underlying driver).

After reinserting the drive, an attempt to zpool clear hung with the 
shell controlling it.

I could do anything else, included shutdown -r now, but then I was stuck 
@ "All buffers synced." too.

My case had nothing to do with HAST, but it looks like ZFS hangs here 
when it loses a vdev component? If it is the case, I wonder if it is to 
be filed as a bug (I mean, if we get so far as to sync all buffers, 
hell, let's reboot ;))?

Note that my pool was perfectly okay after manual reset/reboot (as yours 
seems too). It was even already cleared so apparently the zpool clear 
had succeeded before hanging.

BTW: I must really say that the number of subjects in this list 
containing a bad word like 'unclean', 'problem', 'crash', AND "ZFS" is 
way unjust (and mostly turns out being something elses'fault):
ZFS ROCKS on FreeBSD when used with good hardware (in my small but heavy 
production experience of the last 2 years).

Regards,

Lorenzo





More information about the freebsd-fs mailing list