Oracle Solaris ZFS Administration Guide

Creating a ZFS File System

ZFS file systems are created by using the zfs create command. The create subcommand takes a single argument: the name of the file system to be created. The file system name is specified as a path name starting from the name of the pool as follows:


The pool name and initial file system names in the path identify the location in the hierarchy where the new file system will be created. The last name in the path identifies the name of the file system to be created. The file system name must satisfy the naming requirements in ZFS Component Naming Requirements.

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

# zfs create tank/home/bonwick

ZFS automatically mounts the newly created file system if it is created successfully. By default, file systems are mounted as /dataset, using the path provided for the file system name in the create subcommand. In this example, the newly created bonwick file system is mounted at /tank/home/bonwick. For more information about automatically managed mount points, see Managing ZFS Mount Points.

For more information about the zfs create command, see zfs(1M).

You can set file system properties when the 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.