Solved /usr ZFS dataset not mounted?

I just noticed a possible anomaly on my system. This is what is mounted:

Code:
[11:02][fmc000@tu45b-freebsd ~] $ df -T|grep zfs|sort
zroot               zfs       262452872        96 262452776     0%    /zroot
zroot/ROOT/default  zfs       273647164  11194388 262452776     4%    /
zroot/gdrive        zfs       209715136 139109212  70605924    66%    /gdrive
zroot/home          zfs       262452872        96 262452776     0%    /home
zroot/home/fmc000   zfs        49195348   3355628  45839720     7%    /home/fmc000
zroot/tmp           zfs         5144492     22000   5122492     0%    /tmp
zroot/usr/ports     zfs        46861036   3269964  43591072     7%    /usr/ports
zroot/usr/src       zfs        18231572   1220612  17010960     7%    /usr/src
zroot/var/audit     zfs          102400        96    102304     0%    /var/audit
zroot/var/crash     zfs         2097152        96   2097056     0%    /var/crash
zroot/var/log       zfs         5238188      2904   5235284     0%    /var/log
zroot/var/mail      zfs          101544       172    101372     0%    /var/mail
zroot/var/tmp       zfs         2096336       220   2096116     0%    /var/tmp
zroot/vm            zfs        39315976  27266752  12049224    69%    /vm
[11:02][fmc000@tu45b-freebsd ~]
and these are the datasets that exist on my laptop:
Code:
[11:02][fmc000@tu45b-freebsd ~] $ zfs list|grep -v NAME|sort
zroot                198G   250G    96K  /zroot
[CODE]zroot/ROOT          13.2G   250G    96K  none
zroot/usr           7.21G   250G    96K  /usr
zroot/ROOT/default  13.2G   250G  10.7G  /
zroot/gdrive         133G  67.3G   133G  /gdrive
zroot/home          6.28G   250G    96K  /home
zroot/home/fmc000   6.28G  43.7G  3.20G  /home/fmc000
zroot/tmp            118M  4.89G  21.5M  /tmp
zroot/usr           7.21G   250G    96K  /usr
zroot/usr/ports     3.43G  41.6G  3.12G  /usr/ports
zroot/usr/src       3.78G  16.2G  1.16G  /usr/src
zroot/var           9.71M   250G    96K  /var
zroot/var/audit       96K  99.9M    96K  /var/audit
zroot/var/crash       96K  2.00G    96K  /var/crash
zroot/var/log       7.42M  4.99G  2.84M  /var/log
zroot/var/mail      1.00M  99.0M   172K  /var/mail
zroot/var/tmp       1.01M  2.00G   220K  /var/tmp
zroot/vm            38.5G  11.5G  26.0G  /vm
[11:02][fmc000@tu45b-freebsd ~] $
There are essentially two differences: these two datasets
Code:
zroot/ROOT          13.2G   250G    96K  none
zroot/usr           7.21G   250G    96K  /usr
are not mounted. The first looks normal to me but the second definitely does not.

I haven't changed much since my first installation last June (FreeBSD 14.1) - there are two custom datasets that I created and they show up correctly.

So my question is: why the zroot/usr is not mounted? Can/should I do something about it?
 
So my question is: why the zroot/usr is not mounted? Can/should I do something about it?
This is normal because of boot environment layout. That way the entire content of your /usr directory actually resides under zroot/ROOT (because zroot/usr is not mounted), so it fall into the BE, with the exception of /usr/ports and /usr/src, which are on their own mounted datasets, so they are not part of the BE. See also "Boot Environment Structures" in bectl(8).
 
The datasets appear to have been created by the FreeBSD installer installation script /usr/libexec/bsdinstall/zfsboot. This is the script being executed during a menu guided Root-on-ZFS installation. In this script, for "/usr" the property "canmount=off" is set in the default ZFS datasets creation.

Rich (BB code):
140 # Default ZFS datasets for root zpool
141 #
142 # NOTE: Requires /tmp, /var/tmp, /$ZFSBOOT_BOOTFS_NAME/$ZFSBOOT_BOOTFS_NAME
143 # NOTE: Anything after pound/hash character [#] is ignored as a comment.
144 #
145 f_isset ZFSBOOT_DATASETS || ZFSBOOT_DATASETS="
146         # DATASET       OPTIONS (comma or space separated; or both)
147
148         # Boot Environment [BE] root and default boot dataset
149         /$ZFSBOOT_BEROOT_NAME                           mountpoint=none
150         /$ZFSBOOT_BEROOT_NAME/$ZFSBOOT_BOOTFS_NAME      mountpoint=/
151
152         # Home directories separated so they are common to all BEs
153         /home           mountpoint=/home
154
155         # Compress /tmp, allow exec but not setuid
156         /tmp            mountpoint=/tmp,exec=on,setuid=off
157
158         # Don't mount /usr so that 'base' files go to the BEROOT
159         /usr            mountpoint=/usr,canmount=off
160
161         # Ports tree
162         /usr/ports      setuid=off
163
164         # Source tree (compressed)
165         /usr/src
166
167         # Create /var and friends
168         /var            mountpoint=/var,canmount=off
169         /var/audit      exec=off,setuid=off
171         /var/log        exec=off,setuid=off
172         /var/mail       atime=on
173         /var/tmp        setuid=off
174 " # END-QUOTE

For BEROOT in comment see also "Boot Environment Structures" in bectl(8).
 
Back
Top