Running on a FreeBSD 12.0 system, a dataset (my home directory) does not mount automatically at system boot. Manually mounting it (i.e. via zfs mount zroot/usr/home/username
) works correctly.
This dataset originally was on a different disk and was moved to its current location via zfs send deskback/backup/usr/home/username | zfs receive -e zroot/usr/home
.
Presumably, I could add an entry to /etc/fstab
to mount this dataset, but it seems like this shouldn't be necessary. How can I get ZFS to automatically mount this at boot time?
Edit
The canmount
property for these datasets are:
# zfs get -r canmount zroot/usr
NAME PROPERTY VALUE SOURCE
zroot/usr canmount off local
zroot/usr/home canmount on default
zroot/usr/home/username canmount on default
zroot/usr/home/username@--head-- canmount - -
Check that the
canmount
property is set toon
, and not tonoauto
oroff
.If you see this, you have a problem:
Fix it with:
You may also want to check the parent datasets.
You have 'zfs_enable="YES"' in /etc/rc.conf right? This is what mounts all datasets at boot, it basically runs
zfs mount -a
to mount all ZFS datasetsto mount automatically
zdata
pool run:It will save currently mounted pools to cache and when reboot import this pool automatically.
Of course, zfs parameter
canmount
for this pool has to be set to on