Damon Atkins wrote:
The zpool.cache file makes clustering complex. {Assume the man page is
still correct}

The man page is correct.  zpool.cache helps make clustering feasible
because it differentiates those file systems which are of interest from
those which are not.  This is particularly important for environments
where storage is shared: SAN, NAS, etc.


From the zpool man page:

cachefile=path | "none"

Controls the location of where the pool configuration is cached.
Discovering all pools on system startup requires a cached copy of the
configuration data that  is  stored on  the  root  file  system. All
pools in this cache are automatically imported when the system boots.

**** Some  environments,  such  as  install and clustering, need to
cache this information in a different location so that pools are not
automatically imported. *****

Setting this property caches the pool configuration in a different
location  that can later be imported with "zpool import -c".
....... When the last pool using  a cache file  is  exported  or
destroyed,  the  file  is removed.

zpool import [-d dir | -c cachefile] [-D]

        Lists pools available to import. If the -d option is not
        specified,   this   command   searches  for  devices  in
        "/dev/dsk".
--
A truss of zpool import indicates that it is not multi-threaded when
scanning for disks. ie. it scans 1 at a time instead of X at a time. So
it does take a while to run. Would be nice if this was multi-threaded.

But you are complaining about removable media, so there is a timing
issue.  The "fixed" device locations are known early in the boot, as they
are part of the boot archive.  Removable devices are enumerated later.

What I think you are complaining about is that if you have a zpool on a
removable device, you want it to import when you plug it in. That
functionality exists elsewhere -- not needed in ZFS, per se.


If the cache file is to stay, it should do a scan of /dev to fix itself
at boot if something is wrong, and report it is doing a scan to the
console. esp if it is not multi-threaded.

PS it would be nice to have a zpool diskinfo <devicepath> reports  if
the device belongs to a zpool imported or not, and all the details about
any zpool it can find on the disk. e.g. file-systems (zdb is only for
ZFS "engineers" says the man page). 'zpool import' needs an option to
list the file systems of a pool which is not yet imported and its
properties so you can have more information about it before importing it.

Good idea.  Please file an RFE.
http://bugs.opensolaris.org category solaris/kernel/zfs
-- richard

_______________________________________________
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

Reply via email to