"can't load 'kernel'" on ZFS root

Alexander Leidinger Alexander at Leidinger.net
Tue Sep 13 08:43:55 UTC 2011


On Wed, 7 Sep 2011 11:45:56 +0200 Pawel Jakub Dawidek <pjd at FreeBSD.org>
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


More information about the freebsd-fs mailing list