ZFS automatically mounts file systems when file systems are created or when the system boots. Use of the zfs mount command is necessary only when changing mount options or explicitly mounting or unmounting file systems.
The zfs mount command with no arguments shows all currently mounted file systems that are managed by ZFS. Legacy managed mount points are not displayed. For example:
# zfs mount tank /tank tank/home /tank/home tank/home/bonwick /tank/home/bonwick tank/ws /tank/ws |
You can use the -a option to mount all ZFS managed file systems. Legacy managed file systems are not mounted. For example:
# zfs mount -a |
By default, ZFS does not allow mounting on top of a nonempty directory. To force a mount on top of a nonempty directory, you must use the -O option. For example:
# zfs mount tank/home/lalt cannot mount '/export/home/lalt': directory is not empty use legacy mountpoint to allow this behavior, or use the -O flag # zfs mount -O tank/home/lalt |
Legacy mount points must be managed through legacy tools. An attempt to use ZFS tools results in an error. For example:
# zfs mount pool/home/billm cannot mount 'pool/home/billm': legacy mountpoint use mount(1M) to mount this filesystem # mount -F zfs tank/home/billm |
When a file system is mounted, it uses a set of mount options based on the property values associated with the dataset. The correlation between properties and mount options is as follows:
Mount Options
atime/noatime
devices/nodevices
exec/noexec
nbmand/nonbmand
ro/rw
setuid/nosetuid
xattr/noxattr
The mount option nosuid is an alias for nodevices,nosetuid.
You can use the NFSv4 mirror mount features to help you better manage NFS-mounted ZFS home directories. For a description of mirror mounts, see ZFS and File System Mirror Mounts.