ZFS Filesystem Management

Similar filesystems should be grouped together in hierarchies to make management easier. Naming schemes should be thought out as well to make it easier to group administrative commands for similarly managed filesystems.

When a new pool is created, a new filesystem is mounted at /pool-name.

To create another filesystem:

# zfs create pool-name/fs-name

To delete a filesystem:

# zfs destroy filesystem-name

To rename a ZFS filesystem:

zfs rename old-name new-name

Properties are set via the zfs set command. To turn on compression:

# zfs set compression=on pool-name/filesystem-name

To share the filesystem via NFS:

# zfs set sharenfs=on pool-name/fs-name
# zfs set sharenfs="mount-options" pool-name/fs-name

Rather than editing the /etc/vfstab:

zfs set mountpoint=mountpoint-name pool-name/filesystem-name

Quotas are also set via the same command:

# zfs set quota=#gigGpool-name/filesystem-name