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  -         -
up vote 1 down vote accepted

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

Check that the canmount property is set to on, and not to noauto or off.

If you see this, you have a problem:

# zfs get canmount zroot/usr/home/<username>
NAME                       PROPERTY  VALUE     SOURCE
zroot/usr/home/<username>  canmount  noauto    default

Fix it with:

# zfs set canmount=on zroot/usr/home/<username>

You may also want to check the parent datasets.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.