Go to main content

Managing ZFS File Systems in Oracle® Solaris 11.4

Exit Print View

Updated: August 2019
 
 

Creating ZFS File Systems

This section provides steps and examples for creating ZFS file systems.

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(8) man page.

  1. Assume the root role or an equivalent role with the appropriate ZFS rights profile.
  2. Create the ZFS file system.
Example 28  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 29  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.