FreeBSD – ZFS Dataset Doesn’t Automatically Mount

freebsdzfs

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  -         -

Best Answer

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 datasets