[Ukfreebsd] Confused by ZFS root(s)

Matthew Seaman matthew at FreeBSD.org
Mon Feb 5 18:16:16 GMT 2018


On 05/02/2018 13:00, Jon Schneider wrote:
> 
> 
> On 05/02/2018 12:23, David Chisnall wrote:
>>> 2) Why might my virtual machine not mount the important one
>>> zoot/ROOT/default ?
>>
>> Do you already have something mounted at /?
> 
> I mean having booted off memstick in my virtual machine when I do
> 
> # zpool import zroot -fR /tmp/mnt
> 
> the main root guts does not get mounted and I have to
> 
> # zfs mount zroot/ROOT/default
> 
> to get it. Whereas when I broke into the actual server I didn't have
> this issue. Clearly there is a difference and the main server seems to
> have been built mid 2014 but it too has a zroot/ROOT/default and I would
> like to understand the difference.

Yes.  That's all Boot Environment related.  Typically you'ld have
several clones of the system as different boot environments, and having
the system try to mount all of them would result in chaos.

Usually the active BE should have zfses marked as canmount=on, and other
BEs should have canmount=noauto -- like this:

lucid-nonsense:~:% zfs get -t filesystem -r canmount zroot
NAME                                      PROPERTY  VALUE     SOURCE
zroot                                     canmount  off       received
zroot/ROOT                                canmount  noauto    received
zroot/ROOT/STABLE_11_20171130             canmount  noauto    local
zroot/ROOT/STABLE_11_20171130/usr         canmount  noauto    local
zroot/ROOT/STABLE_11_20171130/usr/local   canmount  noauto    local
zroot/ROOT/STABLE_11_20171130/usr/obj     canmount  noauto    local
zroot/ROOT/STABLE_11_20171130/usr/src     canmount  noauto    local
zroot/ROOT/STABLE_11_20171130/var         canmount  noauto    local
zroot/ROOT/STABLE_11_20171130/var/crash   canmount  noauto    local
zroot/ROOT/STABLE_11_20171130/var/db      canmount  noauto    local
zroot/ROOT/STABLE_11_20171130/var/db/pkg  canmount  noauto    local
zroot/ROOT/STABLE_11_20171130/var/mail    canmount  noauto    local
zroot/ROOT/STABLE_11_20171209             canmount  on        local
zroot/ROOT/STABLE_11_20171209/usr         canmount  on        local
zroot/ROOT/STABLE_11_20171209/usr/local   canmount  on        local
zroot/ROOT/STABLE_11_20171209/usr/obj     canmount  on        local
zroot/ROOT/STABLE_11_20171209/usr/src     canmount  on        local
zroot/ROOT/STABLE_11_20171209/var         canmount  on        local
zroot/ROOT/STABLE_11_20171209/var/crash   canmount  on        local
zroot/ROOT/STABLE_11_20171209/var/db      canmount  on        local
zroot/ROOT/STABLE_11_20171209/var/db/pkg  canmount  on        local
zroot/ROOT/STABLE_11_20171209/var/mail    canmount  on        local

	Cheers,

	Matthew

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 992 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.uk.freebsd.org/pipermail/ukfreebsd/attachments/20180205/bf3a81e5/attachment.bin>


More information about the Ukfreebsd mailing list