zfs: allow to mount root from a pool not in zpool.cache

Pawel Jakub Dawidek pjd at FreeBSD.org
Wed Oct 3 08:53:03 UTC 2012


On Sat, Sep 22, 2012 at 10:59:56PM -0600, Justin T. Gibbs wrote:
> On Sep 22, 2012, at 10:28 AM, Andriy Gapon <avg at freebsd.org> wrote:
> 
> > 
> > Currently FreeBSD ZFS kernel code doesn't allow to mount root filesystem on a
> > pool that is not listed in zpool.cache as only pools from the cache are known to
> > ZFS at that time.
> 
> I've for some time been of the opinion that FreeBSD should only use
> the cache file for ZFS pools created from non-GEOM objects (i.e.
> files).  GEOM tasting should be used to make the kernel aware of
> all pools whether they be imported on the system, partial, or
> foreign.  Even for pools created by files, the user land utilities
> should do nothing more than ask the kernel to "taste them".  This
> would remove code duplicated in user land for this task (code that
> must be re-executed in kernel space for validation reasons anyway)
> and also help solve problems we've encountered at Spectra with races
> in fault event processing, spare management, and device arrival and
> departures.
> 
> So I'm excited by your work in this area and would encourage you
> to "think larger" than just trying to integrate root pool discovery
> with GEOM.  Spectra may even be able to help in this work sometime
> in the near future.

GEOM tasting would most likely require rewriting the code heavly.
Also note that you can have pools in you system that do match your
hostid, but user decided to keep exported and such pool should not be
configured automatically. Not a huge problem probably as there is pool
status somewhere in the metadata that we can use to see if the pool is
exported or not.

-- 
Pawel Jakub Dawidek                       http://www.wheelsystems.com
FreeBSD committer                         http://www.FreeBSD.org
Am I Evil? Yes, I Am!                     http://tupytaj.pl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20121003/575a4658/attachment.pgp


More information about the freebsd-fs mailing list