Go to main content

Managing ZFS File Systems in Oracle® Solaris 11.3

Exit Print View

Updated: May 2019
 
 

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 jeff file system is mounted at /tank/home/jeff. 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(1M) man page.

  1. Become root.
  2. Create the ZFS file system.
Example 27  Creating a Simple ZFS File System

In the following example, a file system named jeff is created in the tank/home file system.

# zfs create tank/home/jeff
Example 28  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.