From owner-freebsd-fs@FreeBSD.ORG Sat Mar 19 00:01:57 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A05DE106566B for ; Sat, 19 Mar 2011 00:01:57 +0000 (UTC) (envelope-from lopez.on.the.lists@yellowspace.net) Received: from mail.yellowspace.net (mail.yellowspace.net [80.190.192.217]) by mx1.freebsd.org (Postfix) with ESMTP id 3B6A98FC08 for ; Sat, 19 Mar 2011 00:01:56 +0000 (UTC) Received: from furia.intranet ([188.174.150.231]) (AUTH: CRAM-MD5 lopez.on.the.lists@yellowspace.net, SSL: TLSv1/SSLv3, 256bits, CAMELLIA256-SHA) by mail.yellowspace.net with esmtp; Sat, 19 Mar 2011 01:01:55 +0100 id 027C1803.000000004D83F273.0000EA1A Message-ID: <4D83F273.2070409@yellowspace.net> Date: Sat, 19 Mar 2011 01:01:55 +0100 From: Lorenzo Perone User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 To: freebsd-fs@freebsd.org References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: HAST + ZFS causes system to shutdown uncleanly? X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Mar 2011 00:01:57 -0000 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