[OmniOS-discuss] How do non-rpool ZFS filesystems get mounted?
Chris Siebenmann
cks at cs.toronto.edu
Wed Mar 5 15:50:51 UTC 2014
| I think a "zpool list" can help in your debugging to see if the pools
| in question are in fact imported before "zfs mount -a", or if some
| unexpected magic happens and the "zfs" command does indeed trigger the
| imports.
Sorry for not mentioning this before: a 'zpool list' before the 'zfs
mount -a' lists the pools as visible, but both df and 'mount -v' do not
report any filesystems from the two additional pools (the ones that get
mount failures and so on).
| The mounts from different pools may be done in parallel, so if you
| need some specific order of mounts (i.e. rpool/export/home and then
| datapool/export/home/user... okay, there is in fact no problem with
| these - but just to give *some* viable example) you may have to
| specify stuff in /etc/vfstab.
As far as I can tell from the Illumos code, this is not the case.
The code certainly seems to be single-threaded and it sorts the mount
list into order in a way that should put prerequisite mounts first
(eg you mount /a and then /a/b).
(This potential issue also doesn't apply to my case because all four
of the mounts from these pools are in the root filesystem, not in any
sub-filesystem.)
| I can guess (but would need to grok the code) that something
| like "zpool import -N -a" is done in some part of the root
| environment preparation to prepare all pools referenced in
| /etc/zfs/zpool.cache, perhaps some time after the rpool is
| imported and the chosen root dataset is mounted explicitly
| to anchor the running kernel.
The last time I spelunked the OpenSolaris code some years ago, the
kernel read zpool.cache very early on but only sort of half-activated
pools then (eg it didn't check to see if all vdevs were present). Pools
were brought to full activation essentially as a side effect of doing
other operations with/to them.
I don't know if this is still the state of affairs in Illumos/OmniOS
today and how such half-activated pools show up during early boot (eg
if they appear in 'zpool list', or even if simply running 'zpool list'
is enough to bring them to fully active status).
- cks
More information about the OmniOS-discuss
mailing list