From owner-freebsd-fs@FreeBSD.ORG Tue Sep 13 08:43:55 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 865D6106564A; Tue, 13 Sep 2011 08:43:55 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 3F2EF8FC12; Tue, 13 Sep 2011 08:43:55 +0000 (UTC) Received: from outgoing.leidinger.net (p4FC41D5D.dip.t-dialin.net [79.196.29.93]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id C2405844015; Tue, 13 Sep 2011 10:24:29 +0200 (CEST) Received: from unknown (IO.Leidinger.net [192.168.1.12]) by outgoing.leidinger.net (Postfix) with ESMTP id 0BA673BA7; Tue, 13 Sep 2011 10:24:27 +0200 (CEST) Date: Tue, 13 Sep 2011 10:24:27 +0200 From: Alexander Leidinger To: Pawel Jakub Dawidek Message-ID: <20110913102427.000030df@unknown> In-Reply-To: <20110907094554.GB1674@garage.freebsd.pl> References: <20110907044800.GA96277@server.vk2pj.dyndns.org> <4E673751.5080503@FreeBSD.org> <20110907094554.GB1674@garage.freebsd.pl> X-Mailer: Claws Mail 3.7.8cvs47 (GTK+ 2.16.6; i586-pc-mingw32msvc) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: C2405844015.AF67F X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-0.4, required 6, autolearn=disabled, ALL_TRUSTED -1.00, J_CHICKENPOX_55 0.60) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1316507070.41574@Y9j7To/gF2TTUMOKRS7q6Q X-EBL-Spam-Status: No Cc: freebsd-fs@FreeBSD.org, Artem Belevich , Martin =?ISO-8859-1?Q?Matu=C5=A1ka?= , Andriy Gapon Subject: Re: "can't load 'kernel'" on ZFS root 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: Tue, 13 Sep 2011 08:43:55 -0000 On Wed, 7 Sep 2011 11:45:56 +0200 Pawel Jakub Dawidek wrote: > On Wed, Sep 07, 2011 at 12:20:17PM +0300, Andriy Gapon wrote: > > on 07/09/2011 10:35 Artem Belevich said the following: > > > It makes me wonder, though -- if we're probing devices anyways, > > > why is zpool.cache existence mandatory? According to the name > > > it's a *cache*, presumably to speed up zpool detection on a > > > normal boot. Perhaps we can fall back to probing all drives if > > > zpool.cache is missing. Slower boot definitely beats no booting > > > at all. > > > > Very good point indeed. > > > > Pawel, Martin, do you know how the relevant code works? I suspect > > that you do :-) Maybe this could be improved trivially?... > > The zpool.cache file contains pools that are automatically imported at > system start-up. There might be pools visible in the system that are > not suppose to be automatically imported (eg. a pool on iSCSI disks on > secondary cluster node - importing such pool automatically will > corrupt the data). If I try to import a pool which is imported somewhere else, I get an error. The hostid is used to determine this. I know that the hostid may not be set at point in booting-time, but don't you think this can be changed? Maybe adding a /boot/hostid.conf which the loader tries to load if it exists, and is updated by /etc/rc.d/hostid if there is write access to it and the ID written there is not the same as the hostid script wants it to be. This way the hostid can be known before the root-mount, and all the pools (or at least the pool with the rootfs) can be imported (if the hostid matches, off course), if no cache files exists. Bye, Alexander. -- http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137