How to Create a ZFS File System
The zfs create
command automatically mounts the newly created file system, if it is created successfully. By default, file systems are mounted as /dataset, using the dataset name provided with the create
subcommand. In this example, the newly created sueb
file system is mounted at /tank/home/sueb
. For more information about automatically managed mount points, see Managing ZFS Mount Points.
Note:
Encrypting a ZFS file system must be enabled when the file system is created. For information about encrypting a ZFS file system, see Encrypting ZFS File Systems.For more information about the zfs create
command, see the
zfs
(8) man page.
- Assume the root role or an equivalent role with the appropriate ZFS rights profile.
- Create the ZFS file system.
Example 7-1 Creating a Simple ZFS File System
In the following example, a file system named sueb
is
created in the tank/home
file system.
$ zfs create tank/home/sueb
Example 7-2 Creating a ZFS File System Using File System Properties
You can set file system properties when a file system is created. In the following example, a mount point of /export/zfs
is created for the tank/home
file system:
$ zfs create -o mountpoint=/export/zfs tank/home
For more information about file system properties, see Introducing ZFS Properties.