Managing ZFS Mount Points
By default, a ZFS file system is automatically mounted when it is created. You can determine specific mount-point behavior for a file system as described in this section.
You can also set the default mount point for a pool's file system at creation time by using the zpool create -m
command. For more information about creating pools, see Creating ZFS Storage Pools.
All ZFS file systems are mounted by ZFS at boot time by using the Service Management Facility's (SMF) svc://system/filesystem/local
service. File systems are mounted under /
path, where path is the name of the file system.
You can override the default mount point by using the zfs set
command to set the mountpoint
property to a specific path. ZFS automatically creates the specified mount point, if needed, and automatically mounts the associated file system.
ZFS file systems are automatically mounted at boot time without requiring you to edit the /etc/vfstab
file.
The mountpoint
property is inherited. For example, if pool/home
has the mountpoint
property set to /export/stuff
, then pool/home/user
inherits /export/stuff/user
for its mountpoint
property value.
To prevent a file system from being mounted, set the mountpoint
property to none
. In addition, the canmount
property can be used to control whether a file system can be mounted. For more information about the canmount
property, see The canmount Property.
File systems can also be explicitly managed through legacy mount interfaces by using zfs set
to set the mountpoint
property to legacy
. Doing so prevents ZFS from automatically mounting and managing a file system. Legacy tools including the mount
and umount
commands, and the /etc/vfstab
file must be used instead. For more information about legacy mounts, see Legacy Mount Points.