| Main index | Section 8 | Options |
for example:
rpool/var/log
The maximum length of a dataset name is ZFS_MAX_DATASET_NAME_LEN - 1 ASCII characters (currently 255) satisfying [A-Za-z_.:/ -]. Additionally snapshots are allowed to contain a single @ character, while bookmarks are allowed to contain a single # character. / is used as separator between components. The maximum amount of nesting allowed in a path is zfs_max_dataset_nesting levels deep. ZFS tunables ( zfs_*) are explained in zfs(4).
A dataset can be one of the following:
| file system | Can be mounted within the standard system namespace and behaves like other file systems. While ZFS file systems are designed to be POSIX-compliant, known issues exist that prevent compliance in some cases. Applications that depend on standards conformance might fail due to non-standard behavior when checking file system free space. |
| volume | A logical volume exported as a raw or block device. This type of dataset should only be used when a block device is required. File systems are typically used in most environments. |
| snapshot | A read-only version of a file system or volume at a given point in time. It is specified as filesystem@name or volume@name. |
| bookmark | Much like a snapshot, but without the hold on on-disk data. It can be used as the source of a send (but not for a receive). It is specified as filesystem#name or volume#name. |
See zfsconcepts(7) for details.
| Fl | Displays a help message. |
| zfs
| |
| zfs version Displays the software version of the zfs userland utility and the zfs kernel module. | |
| zfs-list(8) | |
| Lists the property information for the given datasets in tabular form. | |
| zfs-create(8) | |
| Creates a new ZFS file system or volume. | |
| zfs-destroy(8) | |
| Destroys the given dataset(s), snapshot(s), or bookmark. | |
| zfs-rename(8) | |
| Renames the given dataset (filesystem or snapshot). | |
| zfs-upgrade(8) | |
| Manage upgrading the on-disk version of filesystems. | |
| zfs-snapshot(8) | |
| Creates snapshots with the given names. | |
| zfs-rollback(8) | |
| Roll back the given dataset to a previous snapshot. | |
| zfs-hold(8)/zfs-release(8) | |
| Add or remove a hold reference to the specified snapshot or snapshots. If a hold exists on a snapshot, attempts to destroy that snapshot by using the zfs command return EBUSY. | |
| zfs-diff(8) | |
| Display the difference between a snapshot of a given filesystem and another snapshot of that filesystem from a later time or the current contents of the filesystem. | |
| zfs-clone(8) | |
| Creates a clone of the given snapshot. | |
| zfs-promote(8) | |
| Promotes a clone file system to no longer be dependent on its "origin" snapshot. | |
| zfs-send(8) | |
| Generate a send stream, which may be of a filesystem, and may be incremental from a bookmark. | |
| zfs-receive(8) | |
| Creates a snapshot whose contents are as specified in the stream provided on standard input. If a full stream is received, then a new file system is created as well. Streams are created using the zfs-send(8) subcommand, which by default creates a full stream. | |
| zfs-bookmark(8) | |
| Creates a new bookmark of the given snapshot or bookmark. Bookmarks mark the point in time when the snapshot was created, and can be used as the incremental source for a zfs command. | |
| zfs-redact(8) | |
| Generate a new redaction bookmark. This feature can be used to allow clones of a filesystem to be made available on a remote system, in the case where their parent need not (or needs to not) be usable. | |
| zfs-get(8) | |
| Displays properties for the given datasets. | |
| zfs-set(8) | |
| Sets the property or list of properties to the given value(s) for each dataset. | |
| zfs-inherit(8) | |
|
Clears the specified property, causing it to be inherited from an ancestor,
restored to default if no ancestor has the property set, or with the
| |
| zfs-userspace(8)/zfs-groupspace(8)/zfs-projectspace(8) | |
| Displays space consumed by, and quotas on, each user, group, or project in the specified filesystem or snapshot. | |
| zfs-project(8) | |
| List, set, or clear project ID and/or inherit flag on the files or directories. | |
| zfs-mount(8) | |
| Displays all ZFS file systems currently mounted, or mount ZFS filesystem on a path described by its mountpoint property. | |
| zfs-unmount(8) | |
| Unmounts currently mounted ZFS file systems. | |
| zfs-share(8) | |
| Shares available ZFS file systems. | |
| zfs-unshare(8) | |
| Unshares currently shared ZFS file systems. | |
| zfs-allow(8) | |
| Delegate permissions on the specified filesystem or volume. | |
| zfs-unallow(8) | |
| Remove delegated permissions on the specified filesystem or volume. | |
| zfs-change-key(8) | |
| Add or change an encryption key on the specified dataset. | |
| zfs-load-key(8) | |
| Load the key for the specified encrypted dataset, enabling access. | |
| zfs-unload-key(8) | |
| Unload a key for the specified dataset, removing the ability to access the dataset. | |
| zfs-program(8) | |
| Execute ZFS administrative operations programmatically via a Lua script-language channel program. | |
| zfs-jail(8) | |
| Attaches a filesystem to a jail. | |
| zfs-unjail(8) | |
| Detaches a filesystem from a jail. | |
| zfs-wait(8) | |
| Wait for background activity in a filesystem to complete. | |
# zfs
# zfs
# zfs
# zfs
# zfs
# zfs
# zfs
# zfs
# zfs NAME USED AVAIL REFER MOUNTPOINT pool 450K 457G 18K /pool pool/home 315K 457G 21K /export/home pool/home/anne 18K 457G 18K /export/home/anne pool/home/bob 276K 457G 276K /export/home/bob
# zfs
# zfs NAME PROPERTY VALUE SOURCE pool/home/bob type filesystem - pool/home/bob creation Tue Jul 21 15:53 2009 - pool/home/bob used 21K - pool/home/bob available 20.0G - pool/home/bob referenced 21K - pool/home/bob compressratio 1.00x - pool/home/bob mounted yes - pool/home/bob quota 20G local pool/home/bob reservation none default pool/home/bob recordsize 128K default pool/home/bob mountpoint /pool/home/bob default pool/home/bob sharenfs off default pool/home/bob checksum on default pool/home/bob compression on local pool/home/bob atime on default pool/home/bob devices on default pool/home/bob exec on default pool/home/bob setuid on default pool/home/bob readonly off default pool/home/bob zoned off default pool/home/bob snapdir hidden default pool/home/bob acltype off default pool/home/bob aclmode discard default pool/home/bob aclinherit restricted default pool/home/bob canmount on default pool/home/bob xattr on default pool/home/bob copies 1 default pool/home/bob version 4 - pool/home/bob utf8only off - pool/home/bob normalization none - pool/home/bob casesensitivity sensitive - pool/home/bob vscan off default pool/home/bob nbmand off default pool/home/bob sharesmb off default pool/home/bob refquota none default pool/home/bob refreservation none default pool/home/bob primarycache all default pool/home/bob secondarycache all default pool/home/bob usedbysnapshots 0 - pool/home/bob usedbydataset 21K - pool/home/bob usedbychildren 0 - pool/home/bob usedbyrefreservation 0 -
The following command gets a single property value:
# zfs on
The following command lists all properties with local settings for pool/home/bob:
# zfs NAME PROPERTY VALUE pool/home/bob quota 20G pool/home/bob compression on
# zfs
# zfs
# zfs populate /pool/project/production with data # zfs # zfs make changes to /pool/project/beta and test them # zfs # zfs # zfs once the legacy version is no longer needed, it can be destroyed # zfs
# zfs
# zfs
ssh
# zfs
ssh
# zfs
ssh
# zfs
# zfs # zfs # zfs # zfs # zfs # zfs # zfs # zfs # zfs
# zfs
If you are using DNS for host name resolution, specify the fully-qualified hostname.
# zfs
# zfs
---- Permissions on tank/cindys --------------------------------------
Local+Descendent permissions:
user cindys create,destroy,mount,snapshot
Because the tank/cindys mount point permission is set to 755 by default, user cindys will be unable to mount file systems under tank/cindys. Add an ACE similar to the following syntax to provide mount point access:
# chmod A+user:cindys:add_subdirectory:allow /tank/cindys
# zfs
# zfs
# zfs
---- Permissions on tank/users ---------------------------------------
Permission sets:
destroy
Local+Descendent permissions:
group staff create,mount
# zfs
# zfs
# zfs
---- Permissions on tank/users ---------------------------------------
Permission sets:
@pset create,destroy,mount,snapshot
Local+Descendent permissions:
group staff @pset
# zfs
# zfs
---- Permissions on users/home ---------------------------------------
Local+Descendent permissions:
user cindys quota,reservation
cindys% zfs set quota=10G users/home/marks
cindys% zfs get quota users/home/marks
NAME PROPERTY VALUE SOURCE
users/home/marks quota 10G local
# zfs
# zfs
---- Permissions on tank/users ---------------------------------------
Permission sets:
@pset create,destroy,mount,snapshot
Local+Descendent permissions:
group staff @pset
# zfs M / /tank/test/ M F /tank/test/linked (+1) R F /tank/test/oldname -> /tank/test/newname - F /tank/test/deleted + F /tank/test/created M F /tank/test/modified
# zfs
# smbmount
Minimal
/etc/samba/smb.conf
configuration is required, as follows.
Samba will need to bind to the loopback interface for the ZFS utilities to
communicate with Samba.
This is the default behavior for most Linux distributions.
Samba must be able to authenticate a user.
This can be done in a number of ways
(passwd(5), LDAP,smbpasswd(5), &c.amp;).
How to do this is outside the scope of this document â refer to
smb.conf(5)
for more information.
See the
USERSHARES
section for all configuration options,
in case you need to modify any options of the share afterwards.
Do note that any changes done with the
net(8)
command will be undone if the share is ever unshared (like via a reboot).
Example 24: Setting sharesmb Property Options on a ZFS File System
The following example show how to share SMB filesystem through ZFS.
Note that a user and their password must be given.
| ZFS_COLOR | Use ANSI color in zfs and zfs output. |
| ZFS_MOUNT_HELPER | Cause zfs to use mount(8) to mount ZFS datasets. This option is provided for backwards compatibility with older ZFS versions. |
| ZFS_SET_PIPE_MAX | Tells zfs to set the maximum pipe size for sends/recieves. Disabled by default on Linux due to an unfixed deadlock in Linux's pipe size handling code. |
| ZFS_MODULE_TIMEOUT | |
| Time, in seconds, to wait for /dev/zfs to appear. Defaults to 10, max 600 (10 minutes). If < 0, wait forever; if 0, don't wait. | |
| ZFS (8) | May 12, 2022 |
| Main index | Section 8 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
| “ | VI = Virtually Incomprehensible. | ” |