From owner-freebsd-current@FreeBSD.ORG Thu Sep 20 21:16:25 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BFA816A4D6 for ; Thu, 20 Sep 2007 21:16:25 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101]) by mx1.freebsd.org (Postfix) with ESMTP id AD83F13C4C1 for ; Thu, 20 Sep 2007 21:16:01 +0000 (UTC) (envelope-from dan@dan.emsphone.com) Received: (from dan@localhost) by dan.emsphone.com (8.14.1/8.14.1) id l8KF8eX6034001; Thu, 20 Sep 2007 10:08:40 -0500 (CDT) (envelope-from dan) Date: Thu, 20 Sep 2007 10:08:40 -0500 From: Dan Nelson To: Axel Message-ID: <20070920150840.GG7562@dan.emsphone.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-OS: FreeBSD 7.0-CURRENT User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-fs@freebsd.org, Adam Jacob Muller , freebsd-current@freebsd.org Subject: Re: ZFS pool not working on boot X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Sep 2007 21:16:26 -0000 In the last episode (Sep 19), Axel said: > Adam Jacob Muller writes: > > On Sep 19, 2007, at 6:44 PM, Axel wrote: > >> There is a file called /boot/zfs/zpool.cache that is kept in sync > >> and loaded at boot time. > >> > >> If that's not there , e.g. by your /boot pointing to it , you're > >> hosed. > > > > File is there, of note is that some of the prior reboots had been > > "unintentional" reboots, so it is possible that that file was > > corrupt, however, it does not seem correct for zfs to come up in a > > state that shows drives as corrupted and/or unavailable. I believe I > > have corrected the crashing issue, however it still does not seem > > that this is the correct behavior. > > If you have a working root outside of zfs I'd do the following: > > 1) Rename the zpool.cache to something else to be safe > 2) Reboot, make sure that /boot/zfs points to the right location, > and reimport the pools. > 3) Should be fine from there on. > > I had sort of the same issue, the zpool.cache isn't documented too > well yet; I only stumbled over it by doing a "lsmod" at the loader > prompt;it's one reason root can be on zfs before hostid is set. If > you setup zfs and don't have the future /boot/zfs set right it won't > work because the information gets lost. With / on zfs it's crucial to > have /boot point to the actual UFS boot partition and not be in your > zfs / somewhere, cause that gets ignored until it's mounted. > > It's a good idea to keep the actual old UFS / directory around > although only /boot gets used in there if you mount / from zfs. What I do is populate my UFS /.boot filesystem with /etc, /lib, /libexec, /bin, and /sbin from my root filesystem, so if zfs fails to load it's easy to recover. -- Dan Nelson dnelson@allantgroup.com