Understanding Differences: Legacy Mountpoint vs. None ZFS Datasets
ZFS is a combined file system and logical volume manager designed by Sun Microsystems. It is now used widely in many systems, including FreeBSD, Linux, and macOS. ZFS provides several features that make it an excellent choice for a file system, such as data integrity, copy-on-write, and snapshots.
What is a ZFS Dataset?
A ZFS dataset is a collection of files and directories that reside in a ZFS storage pool. A ZFS storage pool is a logical volume created from one or more physical storage devices. ZFS datasets can have different properties, such as compression, deduplication, and quotas, that can be configured independently.
Legacy Mountpoint vs. None ZFS Datasets
When creating a ZFS dataset, you can choose between two mount point options: legacy and none. The mount point option determines how the dataset is mounted in the file system hierarchy.
Legacy Mountpoint
The legacy mountpoint option mounts the dataset under the traditional Unix directory hierarchy. For example, if you create a dataset named "tank/data" with a legacy mountpoint, it will be mounted under "/tank/data". The advantage of using a legacy mountpoint is that it is compatible with existing applications and scripts that expect the traditional directory hierarchy.
None Mountpoint
The none mountpoint option does not mount the dataset under the traditional Unix directory hierarchy. Instead, you can mount it manually using the zfs mount command or automatically using the /etc/zfs/zfs-mount.cache file. The advantage of using a none mountpoint is that it allows you to create a more flexible and customizable file system hierarchy.
Use Cases
The choice between legacy and none mountpoint depends on your use case. If you are using ZFS as a root file system, you should use a legacy mountpoint to ensure compatibility with existing applications and scripts. If you are using ZFS for a specific application or workload, you can use a none mountpoint to create a customized file system hierarchy.
ZFS is a powerful and flexible file system that provides many advanced features. When creating a ZFS dataset, you can choose between two mount point options: legacy and none. The legacy mountpoint option mounts the dataset under the traditional Unix directory hierarchy, while the none mountpoint option does not. The choice between the two options depends on your use case and preferences.
References
# Create a ZFS dataset with a legacy mountpoint
# The dataset will be mounted under /tank/data
zfs create tank/data
# Create a ZFS dataset with a none mountpoint
# The dataset will not be mounted automatically
zfs create -o mountpoint=none tank/data
# Mount a ZFS dataset with a none mountpoint manually
# Replace tank/data with the name of your dataset
zfs mount tank/data
# Mount a ZFS dataset with a none mountpoint automatically
# Add the following line to /etc/zfs/zfs-mount.cache
tank/data /tank/data