I am beginning to use boot environments on a system, and have moved my zfs datasets around within the pool to create child datasets of the boot environment's root dataset with the intention that these datasets be duplicated into the boot environment. However, the child datasets are not being activated when I use bectl. I am wondering what I am doing wrong.
Running
However, running
How can I get the child datasets to mount automatically when I change boot environments?
For interest, I am attaching the zfs properties for one of the child datasets in case this is helpful.
Running
bectl create -r test
does what I expect. New zfs datasets appear associated with the root and the child datasets of the root.
Code:
root@xyzzy:/home/cmh # zfs list -o name,canmount,mountpoint
NAME CANMOUNT MOUNTPOINT
zroot off /zroot
zroot/ROOT off none
zroot/ROOT/release-11.4 on /
zroot/ROOT/release-11.4/local on /usr/local
zroot/ROOT/release-11.4/usrobj on /usr/obj
zroot/ROOT/release-11.4/usrsrc on /usr/src
--snip--
root@xyzzy:/home/cmh # bectl create -r test
root@xyzzy:/home/cmh # zfs list -o name,canmount,mountpoint
NAME CANMOUNT MOUNTPOINT
zroot off /zroot
zroot/ROOT off none
zroot/ROOT/release-11.4 on /
zroot/ROOT/release-11.4/local on /usr/local
zroot/ROOT/release-11.4/usrobj on /usr/obj
zroot/ROOT/release-11.4/usrsrc on /usr/src
zroot/ROOT/test noauto /
zroot/ROOT/test/local noauto /usr/local
zroot/ROOT/test/usrobj noauto /usr/obj
zroot/ROOT/test/usrsrc noauto /usr/src
--snip--
However, running
bectl activate
does not set "canmount=on" on the child datasets of the new root. Upon rebooting, I have the new root, but I have the child datasets of the old root. This is counter to what I expect. The bectl documentation does not describe things in much detail. But I am wondering if I am doing something wrong given that some of these zfs filesystems were manually moved into position. Perhaps I am not inheriting some property that I should?
Code:
root@xyzzy:/home/cmh # bectl activate test
successfully activated boot environment test
root@xyzzy:/home/cmh # zfs list -o name,canmount,mountpoint
NAME CANMOUNT MOUNTPOINT
zroot off /zroot
zroot/ROOT off none
zroot/ROOT/release-11.4 noauto /
zroot/ROOT/release-11.4/local on /usr/local
zroot/ROOT/release-11.4/usrobj on /usr/obj
zroot/ROOT/release-11.4/usrsrc on /usr/src
zroot/ROOT/test noauto /
zroot/ROOT/test/local noauto /usr/local
zroot/ROOT/test/usrobj noauto /usr/obj
zroot/ROOT/test/usrsrc noauto /usr/src
--snip--
How can I get the child datasets to mount automatically when I change boot environments?
For interest, I am attaching the zfs properties for one of the child datasets in case this is helpful.
Code:
root@xyzzy:/home/cmh # zfs get all zroot/ROOT/test/local
NAME PROPERTY VALUE SOURCE
zroot/ROOT/test/local type filesystem -
zroot/ROOT/test/local creation Tue Sep 15 9:53 2020 -
zroot/ROOT/test/local used 8K -
zroot/ROOT/test/local available 332G -
zroot/ROOT/test/local referenced 3.89G -
zroot/ROOT/test/local compressratio 1.00x -
zroot/ROOT/test/local mounted no -
zroot/ROOT/test/local origin zroot/ROOT/release-11.4/local@2020-09-15-09:53:20-0 -
zroot/ROOT/test/local quota none default
zroot/ROOT/test/local reservation none default
zroot/ROOT/test/local recordsize 128K default
zroot/ROOT/test/local mountpoint /usr/local local
zroot/ROOT/test/local sharenfs off default
zroot/ROOT/test/local checksum on default
zroot/ROOT/test/local compression lz4 inherited from zroot
zroot/ROOT/test/local atime off inherited from zroot
zroot/ROOT/test/local devices on default
zroot/ROOT/test/local exec on default
zroot/ROOT/test/local setuid on default
zroot/ROOT/test/local readonly off inherited from zroot/ROOT/test
zroot/ROOT/test/local jailed off default
zroot/ROOT/test/local snapdir hidden default
zroot/ROOT/test/local aclmode discard default
zroot/ROOT/test/local aclinherit restricted default
zroot/ROOT/test/local createtxg 23449181 -
zroot/ROOT/test/local canmount noauto local
zroot/ROOT/test/local xattr on default
zroot/ROOT/test/local copies 1 default
zroot/ROOT/test/local version 5 -
zroot/ROOT/test/local utf8only off -
zroot/ROOT/test/local normalization none -
zroot/ROOT/test/local casesensitivity sensitive -
zroot/ROOT/test/local vscan off default
zroot/ROOT/test/local nbmand off default
zroot/ROOT/test/local sharesmb off default
zroot/ROOT/test/local refquota none default
zroot/ROOT/test/local refreservation none default
zroot/ROOT/test/local guid 10200537805109230507 -
zroot/ROOT/test/local primarycache all default
zroot/ROOT/test/local secondarycache all default
zroot/ROOT/test/local usedbysnapshots 0 -
zroot/ROOT/test/local usedbydataset 8K -
zroot/ROOT/test/local usedbychildren 0 -
zroot/ROOT/test/local usedbyrefreservation 0 -
zroot/ROOT/test/local logbias latency default
zroot/ROOT/test/local dedup off default
zroot/ROOT/test/local mlslabel -
zroot/ROOT/test/local sync standard default
zroot/ROOT/test/local refcompressratio 3.27x -
zroot/ROOT/test/local written 8K -
zroot/ROOT/test/local logicalused 2K -
zroot/ROOT/test/local logicalreferenced 11.4G -
zroot/ROOT/test/local volmode default default
zroot/ROOT/test/local filesystem_limit none default
zroot/ROOT/test/local snapshot_limit none default
zroot/ROOT/test/local filesystem_count none default
zroot/ROOT/test/local snapshot_count none default
zroot/ROOT/test/local redundant_metadata all default