2 .\" Copyright (c) 2013, Martin Matuska <mm@FreeBSD.org>.
3 .\" All Rights Reserved.
5 .\" The contents of this file are subject to the terms of the
6 .\" Common Development and Distribution License (the "License").
7 .\" You may not use this file except in compliance with the License.
9 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 .\" or http://www.opensolaris.org/os/licensing.
11 .\" See the License for the specific language governing permissions
12 .\" and limitations under the License.
14 .\" When distributing Covered Code, include this CDDL HEADER in each
15 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 .\" If applicable, add the following below this CDDL HEADER, with the
17 .\" fields enclosed by brackets "[]" replaced with your own identifying
18 .\" information: Portions Copyright [yyyy] [name of copyright owner]
20 .\" Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved.
21 .\" Copyright (c) 2013 by Delphix. All rights reserved.
22 .\" Copyright (c) 2011, Pawel Jakub Dawidek <pjd@FreeBSD.org>
23 .\" Copyright (c) 2012, Glen Barber <gjb@FreeBSD.org>
24 .\" Copyright (c) 2012, Bryan Drewery <bdrewery@FreeBSD.org>
25 .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
26 .\" Copyright (c) 2013 Nexenta Systems, Inc. All Rights Reserved.
27 .\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
28 .\" Copyright (c) 2013, Steven Hartland <smh@FreeBSD.org>
29 .\" Copyright (c) 2014, Xin LI <delphij@FreeBSD.org>
38 .Nd configures ZFS file systems
45 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... Ar filesystem
50 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
56 .Ar filesystem Ns | Ns Ar volume
61 .Ar filesystem Ns | Ns volume
64 .Op , Ns Ar snap Op % Ns Ar snap
69 .Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
71 .Cm snapshot Ns | Ns Cm snap
73 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
74 .Ar filesystem@snapname Ns | Ns Ar volume@snapname
75 .Ar filesystem@snapname Ns | Ns Ar volume@snapname Ns ...
83 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
84 .Ar snapshot filesystem Ns | Ns Ar volume
91 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
92 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
97 .Ar filesystem Ns | Ns Ar volume
98 .Ar filesystem Ns | Ns Ar volume
102 .Ar snapshot snapshot
107 .Ar filesystem filesystem
110 .Op Fl r Ns | Ns Fl d Ar depth
112 .Op Fl o Ar property Ns Oo , Ns property Ns Oc Ns ...
113 .Op Fl t Ar type Ns Oo , Ns type Ns Oc Ns ...
114 .Oo Fl s Ar property Oc Ns ...
115 .Oo Fl S Ar property Oc Ns ...
116 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
119 .Ar property Ns = Ns Ar value
120 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
123 .Op Fl r Ns | Ns Fl d Ar depth
125 .Op Fl o Ar all | field Ns Oo , Ns Ar field Oc Ns ...
126 .Op Fl t Ar type Ns Oo Ns , Ar type Oc Ns ...
127 .Op Fl s Ar source Ns Oo Ns , Ns Ar source Oc Ns ...
128 .Ar all | property Ns Oo Ns , Ns Ar property Oc Ns ...
129 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
134 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
142 .Fl a | Ar filesystem
146 .Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
147 .Oo Fl s Ar field Oc Ns ...
148 .Oo Fl S Ar field Oc Ns ...
149 .Op Fl t Ar type Ns Oo Ns , Ns Ar type Oc Ns ...
150 .Ar filesystem Ns | Ns Ar snapshot
154 .Op Fl o Ar field Ns Oo , Ns field Oc Ns ...
155 .Oo Fl s Ar field Oc Ns ...
156 .Oo Fl S Ar field Oc Ns ...
157 .Op Fl t Ar type Ns Oo Ns , Ns Ar type Oc Ns ...
158 .Ar filesystem Ns | Ns Ar snapshot
164 .Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
165 .Fl a | Ar filesystem
167 .Cm unmount Ns | Ns Cm umount
169 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
172 .Fl a | Ar filesystem
175 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
183 .Op Fl i Ar snapshot | Fl I Ar snapshot
187 .Op Fl i Ar snapshot Ns | Ns bookmark
188 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
190 .Cm receive Ns | Ns Cm recv
192 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
194 .Cm receive Ns | Ns Cm recv
200 .Ar filesystem Ns | Ns Ar volume
204 .Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ...
205 .Ar perm Ns | Ns Ar @setname Ns
206 .Oo Ns , Ns Ar perm Ns | Ns Ar @setname Oc Ns ...
207 .Ar filesystem Ns | Ns Ar volume
211 .Fl e Ns | Ns Cm everyone
212 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
214 .Ar filesystem Ns | Ns Ar volume
218 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
220 .Ar filesystem Ns | Ns Ar volume
225 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
227 .Ar filesystem Ns | Ns Ar volume
231 .Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ...
232 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
234 .Ar filesystem Ns | Ns Ar volume
238 .Fl e Ns | Ns Cm everyone
239 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
241 .Ar filesystem Ns | Ns Ar volume
246 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
248 .Ar filesystem Ns | Ns Ar volume
254 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
256 .Ar filesystem Ns | Ns Ar volume
260 .Ar tag snapshot Ns ...
268 .Ar tag snapshot Ns ...
273 .Op Ar snapshot Ns | Ns Ar filesystem
276 .Ar jailid Ns | Ns Ar jailname filesystem
279 .Ar jailid Ns | Ns Ar jailname filesystem
287 storage pool, as described in
289 A dataset is identified by a unique path within the
291 namespace. For example:
292 .Bd -ragged -offset 4n
293 .No pool/ Ns Brq filesystem,volume,snapshot
296 where the maximum length of a dataset name is
300 A dataset can be one of the following:
307 can be mounted within the standard system namespace and behaves like other file
310 file systems are designed to be
312 compliant, known issues exist that prevent compliance in some cases.
313 Applications that depend on standards conformance might fail due to nonstandard
314 behavior when checking file system free space.
316 A logical volume exported as a raw or block device. This type of dataset should
317 only be used under special circumstances. File systems are typically used in
320 A read-only version of a file system or volume at a given point in time. It is
326 .Ss ZFS File System Hierarchy
329 storage pool is a logical collection of devices that provide space for
330 datasets. A storage pool is also the root of the
332 file system hierarchy.
334 The root of the pool can be accessed as a file system, such as mounting and
335 unmounting, taking snapshots, and setting properties. The physical storage
336 characteristics, however, are managed by the
342 for more information on creating and administering pools.
344 A snapshot is a read-only copy of a file system or volume. Snapshots can be
345 created extremely quickly, and initially consume no additional space within the
346 pool. As data within the active dataset changes, the snapshot consumes more
347 data than would otherwise be shared with the active dataset.
349 Snapshots can have arbitrary names. Snapshots of volumes can be cloned or
350 rolled back, but cannot be accessed independently.
352 File system snapshots can be accessed under the
354 directory in the root of the file system. Snapshots are automatically mounted
355 on demand and may be unmounted at regular intervals. The visibility of the
357 directory can be controlled by the
361 A clone is a writable volume or file system whose initial contents are the same
362 as another dataset. As with snapshots, creating a clone is nearly
363 instantaneous, and initially consumes no additional space.
365 Clones can only be created from a snapshot. When a snapshot is cloned, it
366 creates an implicit dependency between the parent and child. Even though the
367 clone is created somewhere else in the dataset hierarchy, the original snapshot
368 cannot be destroyed as long as a clone exists. The
370 property exposes this dependency, and the
372 command lists any such dependencies, if they exist.
374 The clone parent-child dependency relationship can be reversed by using the
376 subcommand. This causes the "origin" file system to become a clone of the
377 specified file system, which makes it possible to destroy the file system that
378 the clone was created from.
382 file system is a simple operation, so the number of file systems per system is
383 likely to be numerous. To cope with this,
385 automatically manages mounting and unmounting file systems without the need to
388 file. All automatically managed file systems are mounted by
392 By default, file systems are mounted under
396 is the name of the file system in the
398 namespace. Directories are created and destroyed as needed.
400 A file system can also have a mount point set in the
402 property. This directory is created as needed, and
404 automatically mounts the file system when the
406 command is invoked (without editing
410 property can be inherited, so if
416 automatically inherits a mount point of
423 prevents the file system from being mounted.
427 file systems can also be managed with traditional tools
428 .Pq Xr mount 8 , Xr umount 8 , Xr fstab 5 .
429 If a file system's mount point is set to
432 makes no attempt to manage the file system, and the administrator is
433 responsible for mounting and unmounting the file system.
436 dataset can be attached to a jail by using the
438 subcommand. You cannot attach a dataset to one jail and the children of the
439 same dataset to another jails. To allow management of the dataset from within
442 property has to be set and the jail needs access to the
446 property cannot be changed from within a jail. See
448 for information on how to allow mounting
450 datasets from within a jail.
453 dataset can be detached from a jail using the
457 After a dataset is attached to a jail and the jailed property is set, a jailed
458 file system cannot be mounted outside the jail, since the jail administrator
459 might have set the mount point to an unacceptable value.
461 Deduplication is the process for removing redundant data at the block-level,
462 reducing the total amount of data stored. If a file system has the
464 property enabled, duplicate data blocks are removed synchronously. The result
465 is that only unique data is stored and common components are shared among
467 .Ss Native Properties
468 Properties are divided into two types, native properties and user-defined (or
469 "user") properties. Native properties either export internal statistics or
472 behavior. In addition, native properties are either editable or read-only. User
473 properties have no effect on
475 behavior, but you can use them to annotate datasets in a way that is meaningful
476 in your environment. For more information about user properties, see the
477 .Qq Sx User Properties
480 Every dataset has a set of properties that export statistics about the dataset
481 as well as control various behaviors. Properties are inherited from the parent
482 unless overridden by the child. Some properties apply only to certain types of
483 datasets (file systems, volumes, or snapshots).
485 The values of numeric properties can be specified using human-readable suffixes
487 .Sy k , KB , M , Gb ,
490 for zettabyte). The following are all valid (and equal) specifications:
491 .Bd -ragged -offset 4n
495 The values of non-numeric properties are case sensitive and must be lowercase,
497 .Sy mountpoint , sharenfs , No and Sy sharesmb .
499 The following native properties consist of read-only statistics about the
500 dataset. These properties can be neither set, nor inherited. Native properties
501 apply to all dataset types unless otherwise noted.
504 The amount of space available to the dataset and all its children, assuming
505 that there is no other activity in the pool. Because space is shared within a
506 pool, availability can be limited by any number of factors, including physical
507 pool size, quotas, reservations, or other datasets within the pool.
509 This property can also be referred to by its shortened column name,
512 For non-snapshots, the compression ratio achieved for the
514 space of this dataset, expressed as a multiplier. The
516 property includes descendant datasets, and, for clones, does not include
517 the space shared with the origin snapshot. For snapshots, the
521 property. Compression can be turned on by running:
522 .Qq Nm Cm set compression=on Ar dataset
526 The time this dataset was created.
528 For snapshots, this property is a comma-separated list of filesystems or
529 volumes which are clones of this snapshot. The clones'
531 property is this snapshot. If the
533 property is not empty, then this snapshot can not be destroyed (even with the
541 if the snapshot has been marked for deferred destroy by using the
543 command. Otherwise, the property is
545 .It Sy filesystem_count
546 The total number of filesystems and volumes that exist under this location in the
548 This value is only available when a
551 been set somewhere in the tree under which the dataset resides.
552 .It Sy logicalreferenced
553 The amount of space that is
555 accessible by this dataset.
559 The logical space ignores the effect of the
563 properties, giving a quantity closer to the amount of data that applications
565 However, it does include space consumed by metadata.
567 This property can also be referred to by its shortened column name,
570 The amount of space that is
572 consumed by this dataset and all its descendents.
576 The logical space ignores the effect of the
580 properties, giving a quantity closer to the amount of data that applications
583 This property can also be referred to by its shortened column name,
586 For file systems, indicates whether the file system is currently mounted. This
587 property can be either
592 For cloned file systems or volumes, the snapshot from which the clone was
593 created. See also the
597 The amount of data that is accessible by this dataset, which may or may not be
598 shared with other datasets in the pool. When a snapshot or clone is created, it
599 initially references the same amount of space as the file system or snapshot it
600 was created from, since its contents are identical.
602 This property can also be referred to by its shortened column name,
604 .It Sy refcompressratio
605 The compression ratio achieved for the
607 space of this dataset, expressed as a multiplier. See also the
610 .It Sy snapshot_count
611 The total number of snapshots that exist under this location in the dataset tree.
612 This value is only available when a
614 has been set somewhere
615 in the tree under which the dataset resides.
618 .Sy filesystem , volume , No or Sy snapshot .
620 The amount of space consumed by this dataset and all its descendents. This is
621 the value that is checked against this dataset's quota and reservation. The
622 space used does not include this dataset's reservation, but does take into
623 account the reservations of any descendent datasets. The amount of space that a
624 dataset consumes from its parent, as well as the amount of space that are freed
625 if this dataset is recursively destroyed, is the greater of its space used and
628 When snapshots (see the
630 section) are created, their space is
631 initially shared between the snapshot and the file system, and possibly with
632 previous snapshots. As the file system changes, space that was previously
633 shared becomes unique to the snapshot, and counted in the snapshot's space
634 used. Additionally, deleting snapshots can increase the amount of space unique
635 to (and used by) other snapshots.
637 The amount of space used, available, or referenced does not take into account
638 pending changes. Pending changes are generally accounted for within a few
639 seconds. Committing a change to a disk using
643 does not necessarily guarantee that the space usage information is updated
648 properties decompose the
650 properties into the various reasons that space is used. Specifically,
652 .Sy usedbysnapshots + usedbydataset + usedbychildren + usedbyrefreservation .
653 These properties are only available for datasets created
656 pool version 13 pools and higher.
657 .It Sy usedbysnapshots
658 The amount of space consumed by snapshots of this dataset. In particular, it is
659 the amount of space that would be freed if all of this dataset's snapshots were
660 destroyed. Note that this is not simply the sum of the snapshots'
662 properties because space can be shared by multiple snapshots.
664 The amount of space used by this dataset itself, which would be freed if the
665 dataset were destroyed (after first removing any
667 and destroying any necessary snapshots or descendents).
668 .It Sy usedbychildren
669 The amount of space used by children of this dataset, which would be freed if
670 all the dataset's children were destroyed.
671 .It Sy usedbyrefreservation
672 The amount of space used by a
674 set on this dataset, which would be freed if the
677 .It Sy userused@ Ns Ar user
678 The amount of space consumed by the specified user in this dataset. Space is
679 charged to the owner of each file, as displayed by
681 The amount of space charged is displayed by
687 subcommand for more information.
689 Unprivileged users can access only their own space usage. The root user, or a
690 user who has been granted the
694 can access everyone's usage.
698 properties are not displayed by
700 The user's name must be appended after the
702 symbol, using one of the following forms:
703 .Bl -bullet -offset 2n
705 POSIX name (for example,
708 POSIX numeric ID (for example,
712 This property is set to the number of user holds on this snapshot. User holds
716 .It Sy groupused@ Ns Ar group
717 The amount of space consumed by the specified group in this dataset. Space is
718 charged to the group of each file, as displayed by
721 .Sy userused@ Ns Ar user
722 property for more information.
724 Unprivileged users can only access their own groups' space usage. The root
725 user, or a user who has been granted the
729 can access all groups' usage.
730 .It Sy volblocksize Ns = Ns Ar blocksize
731 For volumes, specifies the block size of the volume. The
733 cannot be changed once the volume has been written, so it should be set at
734 volume creation time. The default
736 for volumes is 8 Kbytes. Any
737 power of 2 from 512 bytes to 128 Kbytes is valid.
739 This property can also be referred to by its shortened column name,
744 space written to this dataset since the previous snapshot.
745 .It Sy written@ Ns Ar snapshot
748 space written to this dataset since the specified snapshot. This is the space
749 that is referenced by this dataset but was not referenced by the specified
754 may be specified as a short snapshot name (just the part after the
756 in which case it will be interpreted as a snapshot in the same filesystem as
759 may be a full snapshot name
760 .Pq Em filesystem@snapshot ,
761 which for clones may be a snapshot in the origin's filesystem (or the origin of
762 the origin's filesystem, etc).
765 The following native properties can be used to change the behavior of a
770 .Sy aclinherit Ns = Ns Cm discard |
778 entries are inherited when files and directories are created. A file system
785 entries. A file system with an
789 only inherits inheritable
791 entries that specify "deny" permissions. The property value
793 (the default) removes the
799 entry is inherited. A file system with an
803 inherits all inheritable
805 entries without any modifications made to the
807 entries when they are inherited. A file system with an
811 has the same meaning as
814 .Em owner@ , group@ , No and Em everyone@ Tn ACE Ns s
815 inherit the execute permission only if the file creation mode also requests the
818 When the property value is set to
820 files are created with a mode determined by the inheritable
824 exist that affect the mode, then the mode is set in accordance to the requested
825 mode from the application.
826 .It Sy aclmode Ns = Ns Cm discard | groupmask | passthrough | restricted
831 A file system with an
835 (the default) deletes all
837 entries that do not represent the mode of the file. An
841 reduces permissions granted in all
845 such that they are no greater than the group permissions specified by
847 A file system with an
851 indicates that no changes are made to the
853 other than creating or updating the necessary
855 entries to represent the new mode of the file or directory.
862 operation to return an error when used on any file or directory which has
865 whose entries can not be represented by a mode.
867 is required to change the set user ID, set group ID, or sticky bits on a file
868 or directory, as they do not have equivalent
873 on a file or directory with a non-trivial
879 you must first remove all
881 entries which do not represent the current mode.
882 .It Sy atime Ns = Ns Cm on | off
883 Controls whether the access time for files is updated when they are read.
884 Turning this property off avoids producing write traffic when reading files and
885 can result in significant performance gains, though it might confuse mailers
886 and other similar utilities. The default value is
888 .It Sy canmount Ns = Ns Cm on | off | noauto
889 If this property is set to
891 the file system cannot be mounted, and is ignored by
892 .Qq Nm Cm mount Fl a .
893 Setting this property to
895 is similar to setting the
899 except that the dataset still has a normal
901 property, which can be inherited. Setting this property to
903 allows datasets to be used solely as a mechanism to inherit properties. One
905 .Sy canmount Ns = Ns Cm off
906 is to have two datasets with the same
908 so that the children of both datasets appear in the same directory, but might
909 have different inherited characteristics.
913 value is set, a dataset can only be mounted and unmounted explicitly. The
914 dataset is not mounted automatically when the dataset is created or imported,
915 nor is it mounted by the
917 command or unmounted by the
918 .Qq Nm Cm umount Fl a
921 This property is not inherited.
922 .It Sy checksum Ns = Ns Cm on | off | fletcher2 | fletcher4 | sha256 | noparity
923 Controls the checksum used to verify data integrity. The default value is
925 which automatically selects an appropriate algorithm (currently,
927 but this may change in future releases). The value
929 disables integrity checking on user data.
933 disables integrity but also disables maintaining parity for user data. This
934 setting is used internally by a dump device residing on a RAID-Z pool and should
935 not be used by any other dataset.
936 Disabling checksums is
938 a recommended practice.
939 .It Sy compression Ns = Ns Cm on | off | lzjb | gzip | gzip- Ns Ar N | zle | Cm lz4
940 Controls the compression algorithm used for this dataset. The
942 compression algorithm is optimized for performance while providing decent data
943 compression. Setting compression to
947 compression algorithm. The
949 compression algorithm uses the same compression as the
951 command. You can specify the
953 level by using the value
957 is an integer from 1 (fastest) to 9 (best compression ratio). Currently,
961 (which is also the default for
965 compression algorithm compresses runs of zeros.
969 compression algorithm is a high-performance replacement
972 algorithm. It features significantly faster
973 compression and decompression, as well as a moderately higher
974 compression ratio than
976 but can only be used on pools with
983 for details on ZFS feature flags and the
987 This property can also be referred to by its shortened column name
989 Changing this property affects only newly-written data.
990 .It Sy copies Ns = Ns Cm 1 | 2 | 3
991 Controls the number of copies of data stored for this dataset. These copies are
992 in addition to any redundancy provided by the pool, for example, mirroring or
993 RAID-Z. The copies are stored on different disks, if possible. The space used
994 by multiple copies is charged to the associated file and dataset, changing the
996 property and counting against quotas and reservations.
998 Changing this property only affects newly-written data. Therefore, set this
999 property at file system creation time by using the
1000 .Fl o Cm copies= Ns Ar N
1002 .It Sy dedup Ns = Ns Cm on | off | verify | sha256 Ns Op Cm ,verify
1003 Configures deduplication for a dataset. The default value is
1005 The default deduplication checksum is
1007 (this may change in the future).
1010 is enabled, the checksum defined here overrides the
1012 property. Setting the value to
1014 has the same effect as the setting
1020 will do a byte-to-byte comparsion in case of two blocks having the same
1021 signature to make sure the block contents are identical.
1022 .It Sy devices Ns = Ns Cm on | off
1025 property is currently not supported on
1027 .It Sy exec Ns = Ns Cm on | off
1028 Controls whether processes can be executed from within this file system. The
1031 .It Sy mlslabel Ns = Ns Ar label | Cm none
1034 property is currently not supported on
1036 .It Sy filesystem_limit Ns = Ns Ar count | Cm none
1037 Limits the number of filesystems and volumes that can exist under this point in
1039 The limit is not enforced if the user is allowed to change
1042 .Sy filesystem_limit
1043 on a descendent of a filesystem that
1045 .Sy filesystem_limit
1046 does not override the ancestor's
1047 .Sy filesystem_limit ,
1048 but rather imposes an additional limit.
1049 This feature must be enabled to be used
1051 .Xr zpool-features 7
1053 .It Sy mountpoint Ns = Ns Ar path | Cm none | legacy
1054 Controls the mount point used for this file system. See the
1056 section for more information on how this property is used.
1060 property is changed for a file system, the file system and any children that
1061 inherit the mount point are unmounted. If the new value is
1063 then they remain unmounted. Otherwise, they are automatically remounted in the
1064 new location if the property was previously
1068 or if they were mounted before the property was changed. In addition, any
1069 shared file systems are unshared and shared in the new location.
1070 .It Sy nbmand Ns = Ns Cm on | off
1073 property is currently not supported on
1075 .It Sy primarycache Ns = Ns Cm all | none | metadata
1076 Controls what is cached in the primary cache (ARC). If this property is set to
1078 then both user data and metadata is cached. If this property is set to
1080 then neither user data nor metadata is cached. If this property is set to
1082 then only metadata is cached. The default value is
1084 .It Sy quota Ns = Ns Ar size | Cm none
1085 Limits the amount of space a dataset and its descendents can consume. This
1086 property enforces a hard limit on the amount of space used. This includes all
1087 space consumed by descendents, including file systems and snapshots. Setting a
1088 quota on a descendent of a dataset that already has a quota does not override
1089 the ancestor's quota, but rather imposes an additional limit.
1091 Quotas cannot be set on volumes, as the
1093 property acts as an implicit quota.
1094 .It Sy snapshot_limit Ns = Ns Ar count | Cm none
1095 Limits the number of snapshots that can be created on a dataset and its
1099 on a descendent of a dataset that already
1102 does not override the ancestor's
1103 .Sy snapshot_limit ,
1105 rather imposes an additional limit.
1106 The limit is not enforced if the user is
1107 allowed to change the limit.
1108 For example, this means that recursive snapshots
1109 taken from the global zone are counted against each delegated dataset within
1111 This feature must be enabled to be used
1113 .Xr zpool-features 7
1115 .It Sy userquota@ Ns Ar user Ns = Ns Ar size | Cm none
1116 Limits the amount of space consumed by the specified user.
1121 space calculation does not include space that is used by descendent datasets,
1122 such as snapshots and clones. User space consumption is identified by the
1123 .Sy userspace@ Ns Ar user
1126 Enforcement of user quotas may be delayed by several seconds. This delay means
1127 that a user might exceed their quota before the system notices that they are
1128 over quota and begins to refuse additional writes with the
1130 error message. See the
1132 subcommand for more information.
1134 Unprivileged users can only access their own groups' space usage. The root
1135 user, or a user who has been granted the
1139 can get and set everyone's quota.
1141 This property is not available on volumes, on file systems before version 4, or
1142 on pools before version 15. The
1143 .Sy userquota@ Ns ...
1144 properties are not displayed by
1146 The user's name must be appended after the
1148 symbol, using one of the following forms:
1149 .Bl -bullet -offset 2n
1151 POSIX name (for example,
1154 POSIX numeric ID (for example,
1157 .It Sy groupquota@ Ns Ar group Ns = Ns Ar size | Cm none
1158 Limits the amount of space consumed by the specified group. Group space
1159 consumption is identified by the
1160 .Sy userquota@ Ns Ar user
1163 Unprivileged users can access only their own groups' space usage. The root
1164 user, or a user who has been granted the
1168 can get and set all groups' quotas.
1169 .It Sy readonly Ns = Ns Cm on | off
1170 Controls whether this dataset can be modified. The default value is
1172 .It Sy recordsize Ns = Ns Ar size
1173 Specifies a suggested block size for files in the file system. This property is
1174 designed solely for use with database workloads that access files in fixed-size
1177 automatically tunes block sizes according to internal algorithms optimized for
1178 typical access patterns.
1180 For databases that create very large files but access them in small random
1181 chunks, these algorithms may be suboptimal. Specifying a
1183 greater than or equal to the record size of the database can result in
1184 significant performance gains. Use of this property for general purpose file
1185 systems is strongly discouraged, and may adversely affect performance.
1187 The size specified must be a power of two greater than or equal to 512 and less
1188 than or equal to 128 Kbytes.
1190 Changing the file system's
1192 affects only files created afterward; existing files are unaffected.
1194 This property can also be referred to by its shortened column name,
1196 .It Sy refquota Ns = Ns Ar size | Cm none
1197 Limits the amount of space a dataset can consume. This property enforces a hard
1198 limit on the amount of space used. This hard limit does not include space used
1199 by descendents, including file systems and snapshots.
1200 .It Sy refreservation Ns = Ns Ar size | Cm none
1201 The minimum amount of space guaranteed to a dataset, not including its
1202 descendents. When the amount of space used is below this value, the dataset is
1203 treated as if it were taking up the amount of space specified by
1204 .Sy refreservation .
1207 reservation is accounted for in the parent datasets' space used, and counts
1208 against the parent datasets' quotas and reservations.
1212 is set, a snapshot is only allowed if there is enough free pool space outside
1213 of this reservation to accommodate the current number of "referenced" bytes in
1216 This property can also be referred to by its shortened column name,
1218 .It Sy reservation Ns = Ns Ar size | Cm none
1219 The minimum amount of space guaranteed to a dataset and its descendents. When
1220 the amount of space used is below this value, the dataset is treated as if it
1221 were taking up the amount of space specified by its reservation. Reservations
1222 are accounted for in the parent datasets' space used, and count against the
1223 parent datasets' quotas and reservations.
1225 This property can also be referred to by its shortened column name,
1227 .It Sy secondarycache Ns = Ns Cm all | none | metadata
1228 Controls what is cached in the secondary cache (L2ARC). If this property is set
1231 then both user data and metadata is cached. If this property is set to
1233 then neither user data nor metadata is cached. If this property is set to
1235 then only metadata is cached. The default value is
1237 .It Sy setuid Ns = Ns Cm on | off
1238 Controls whether the
1240 bit is respected for the file system. The default value is
1242 .It Sy sharesmb Ns = Ns Cm on | off | Ar opts
1245 property currently has no effect on
1247 .It Sy sharenfs Ns = Ns Cm on | off | Ar opts
1248 Controls whether the file system is shared via
1250 and what options are used. A file system with a
1254 is managed the traditional way via
1256 Otherwise, the file system is automatically shared and unshared with the
1260 commands. If the property is set to
1264 export options are used. Otherwise,
1266 export options are equivalent to the contents of this property. The export
1267 options may be comma-separated. See
1269 for a list of valid options.
1273 property is changed for a dataset, the
1276 .It Sy logbias Ns = Ns Cm latency | throughput
1279 about handling of synchronous requests in this dataset.
1286 will use pool log devices (if configured) to handle the requests at low
1292 will not use configured pool log devices.
1294 will instead optimize synchronous operations for global pool throughput and
1295 efficient use of resources.
1296 .It Sy snapdir Ns = Ns Cm hidden | visible
1297 Controls whether the
1299 directory is hidden or visible in the root of the file system as discussed in
1302 section. The default value is
1304 .It Sy sync Ns = Ns Cm standard | always | disabled
1305 Controls the behavior of synchronous requests (e.g.
1307 O_DSYNC). This property accepts the following values:
1308 .Bl -tag -offset 4n -width 8n
1310 This is the POSIX specified behavior of ensuring all synchronous requests are
1311 written to stable storage and all devices are flushed to ensure data is not
1312 cached by device controllers (this is the default).
1314 All file system transactions are written and flushed before their system calls
1315 return. This has a large performance penalty.
1317 Disables synchronous requests. File system transactions are only committed to
1318 stable storage periodically. This option will give the highest performance.
1319 However, it is very dangerous as
1321 would be ignoring the synchronous transaction demands of applications such as
1324 Administrators should only use this option when the risks are understood.
1326 .It Sy volsize Ns = Ns Ar size
1327 For volumes, specifies the logical size of the volume. By default, creating a
1328 volume establishes a reservation of equal size. For storage pools with a
1329 version number of 9 or higher, a
1331 is set instead. Any changes to
1333 are reflected in an equivalent change to the reservation (or
1334 .Sy refreservation ) .
1337 can only be set to a multiple of
1341 The reservation is kept equal to the volume's logical size to prevent
1342 unexpected behavior for consumers. Without the reservation, the volume could
1343 run out of space, resulting in undefined behavior or data corruption, depending
1344 on how the volume is used. These effects can also occur when the volume size is
1345 changed while it is in use (particularly when shrinking the size). Extreme care
1346 should be used when adjusting the volume size.
1348 Though not recommended, a "sparse volume" (also known as "thin provisioning")
1349 can be created by specifying the
1352 .Qq Nm Cm create Fl V
1353 command, or by changing the reservation after the volume has been created. A
1354 "sparse volume" is a volume where the reservation is less then the volume size.
1355 Consequently, writes to a sparse volume can fail with
1357 when the pool is low on space. For a sparse volume, changes to
1359 are not reflected in the reservation.
1360 .It Sy volmode Ns = Ns Cm default | geom | dev | none
1361 This property specifies how volumes should be exposed to the OS.
1366 providers, providing maximal functionality.
1369 exposes volumes only as cdev device in devfs.
1370 Such volumes can be accessed only as raw disk device files, i.e. they
1371 can not be partitioned, mounted, participate in RAIDs, etc, but they
1372 are faster, and in some use scenarios with untrusted consumer, such as
1373 NAS or VM storage, can be more safe.
1374 Volumes with property set to
1376 are not exposed outside ZFS, but can be snapshoted, cloned, replicated, etc,
1377 that can be suitable for backup purposes.
1380 means that volumes exposition is controlled by system-wide sysctl/tunable
1381 .Va vfs.zfs.vol.mode ,
1387 are encoded as 1, 2 and 3 respectively.
1388 The default values is
1390 This property can be changed any time, but so far it is processed only
1391 during volume creation and pool import.
1392 .It Sy vscan Ns = Ns Cm off | on
1395 property is currently not supported on
1397 .It Sy xattr Ns = Ns Cm off | on
1400 property is currently not supported on
1402 .It Sy jailed Ns = Ns Cm off | on
1403 Controls whether the dataset is managed from a jail. See the
1405 section for more information. The default value is
1409 The following three properties cannot be changed after the file system is
1410 created, and therefore, should be set when the file system is created. If the
1411 properties are not set with the
1415 commands, these properties are inherited from the parent dataset. If the parent
1416 dataset lacks these properties due to having been created prior to these
1417 features being supported, the new file system will have the default values for
1420 .It Sy casesensitivity Ns = Ns Cm sensitive | insensitive | mixed
1421 Indicates whether the file name matching algorithm used by the file system
1422 should be case-sensitive, case-insensitive, or allow a combination of both
1423 styles of matching. The default value for the
1427 Traditionally, UNIX and POSIX file systems have case-sensitive file names.
1433 property indicates that the
1434 file system can support requests for both case-sensitive and case-insensitive
1436 .It Sy normalization Ns = Ns Cm none | formC | formD | formKC | formKD
1437 Indicates whether the file system should perform a
1439 normalization of file names whenever two file names are compared, and which
1440 normalization algorithm should be used. File names are always stored
1441 unmodified, names are normalized as part of any comparison process. If this
1442 property is set to a legal value other than
1446 property was left unspecified, the
1448 property is automatically set to
1450 The default value of the
1454 This property cannot be changed after the file system is created.
1455 .It Sy utf8only Ns = Ns Cm on | off
1456 Indicates whether the file system should reject file names that include
1457 characters that are not present in the
1459 character code set. If this property is explicitly set to
1461 the normalization property must either not be explicitly set or be set to
1463 The default value for the
1467 This property cannot be changed after the file system is created.
1471 .Sy casesensitivity , normalization , No and Sy utf8only
1472 properties are also new permissions that can be assigned to non-privileged
1475 delegated administration feature.
1476 .Ss Temporary Mount Point Properties
1477 When a file system is mounted, either through
1479 for legacy mounts or the
1481 command for normal file systems, its mount options are set according to its
1482 properties. The correlation between properties and mount options is as follows:
1483 .Bl -column -offset 4n "PROPERTY" "MOUNT OPTION"
1484 .It "PROPERTY MOUNT OPTION"
1485 .It "atime atime/noatime"
1486 .It "exec exec/noexec"
1487 .It "readonly ro/rw"
1488 .It "setuid suid/nosuid"
1491 In addition, these options can be set on a per-mount basis using the
1493 option, without affecting the property that is stored on disk. The values
1494 specified on the command line override the values stored in the dataset. These
1495 properties are reported as "temporary" by the
1497 command. If the properties are changed while the dataset is mounted, the new
1498 setting overrides any temporary settings.
1500 In addition to the standard native properties,
1502 supports arbitrary user properties. User properties have no effect on
1504 behavior, but applications or administrators can use them to annotate datasets
1505 (file systems, volumes, and snapshots).
1507 User property names must contain a colon
1509 character to distinguish them from native properties. They may contain
1510 lowercase letters, numbers, and the following punctuation characters: colon
1518 The expected convention is that the property name is divided into two portions
1520 .Em module Ns Sy \&: Ns Em property ,
1521 but this namespace is not enforced by
1523 User property names can be at most 256 characters, and cannot begin with a dash
1526 When making programmatic use of user properties, it is strongly suggested to
1531 component of property names to reduce the chance that two
1532 independently-developed packages use the same property name for different
1533 purposes. Property names beginning with
1535 are reserved for use by Sun Microsystems.
1537 The values of user properties are arbitrary strings, are always inherited, and
1538 are never validated. All of the commands that operate on properties
1545 can be used to manipulate both native properties and user properties. Use the
1547 command to clear a user property. If the property is not defined in any parent
1548 dataset, it is removed entirely. Property values are limited to 1024
1551 All subcommands that modify state are logged persistently to the pool in their
1559 Displays a help message.
1564 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1570 file system. The file system is automatically mounted according to the
1572 property inherited from the parent.
1573 .Bl -tag -width indent
1575 Creates all the non-existing parent datasets. Datasets created in this manner
1576 are automatically mounted according to the
1578 property inherited from their parent. Any property specified on the command
1581 option is ignored. If the target filesystem already exists, the operation
1582 completes successfully.
1584 Newly created file system is not mounted.
1585 .It Fl o Ar property Ns = Ns Ar value
1586 Sets the specified property as if the command
1587 .Qq Nm Cm set Ar property Ns = Ns Ar value
1588 was invoked at the same time the dataset was created. Any editable
1590 property can also be set at creation time. Multiple
1592 options can be specified. An error results if the same property is specified in
1601 .Op Fl b Ar blocksize
1602 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1607 Creates a volume of the given size. The volume is exported as a block device in
1608 .Pa /dev/zvol/path ,
1611 is the name of the volume in the
1613 namespace. The size represents the logical size as exported by the device. By
1614 default, a reservation of equal size is created.
1617 is automatically rounded up to the nearest 128 Kbytes to ensure that
1618 the volume has an integral number of blocks regardless of
1620 .Bl -tag -width indent
1622 Creates all the non-existing parent datasets. Datasets created in this manner
1623 are automatically mounted according to the
1625 property inherited from their parent. Any property specified on the command
1628 option is ignored. If the target filesystem already exists, the operation
1629 completes successfully.
1631 Creates a sparse volume with no reservation. See
1634 .Qq Sx Native Properties
1635 section for more information about sparse volumes.
1636 .It Fl b Ar blocksize
1638 .Fl o Cm volblocksize Ns = Ns Ar blocksize .
1639 If this option is specified in conjunction with
1640 .Fl o Cm volblocksize ,
1641 the resulting behavior is undefined.
1642 .It Fl o Ar property Ns = Ns Ar value
1643 Sets the specified property as if the
1644 .Qq Nm Cm set Ar property Ns = Ns Ar value
1645 command was invoked at the same time the dataset was created. Any editable
1647 property can also be set at creation time. Multiple
1649 options can be specified. An error results if the same property is specified in
1658 .Ar filesystem Ns | Ns Ar volume
1661 Destroys the given dataset. By default, the command unshares any file systems
1662 that are currently shared, unmounts any file systems that are currently
1663 mounted, and refuses to destroy a dataset that has active dependents (children
1665 .Bl -tag -width indent
1667 Recursively destroy all children.
1669 Recursively destroy all dependents, including cloned file systems outside the
1672 Force an unmount of any file systems using the
1673 .Qq Nm Cm unmount Fl f
1674 command. This option has no effect on non-file systems or unmounted file
1677 Do a dry-run ("No-op") deletion. No data will be deleted. This is useful in
1678 conjunction with the
1682 flags to determine what data would be deleted.
1684 Print machine-parsable verbose information about the deleted data.
1686 Print verbose information about the deleted data.
1689 Extreme care should be taken when applying either the
1693 options, as they can destroy large portions of a pool and cause unexpected
1694 behavior for mounted file systems in use.
1701 .Op % Ns Ar snapname
1706 The given snapshots are destroyed immediately if and only if the
1710 option would have destroyed it. Such immediate destruction would occur, for
1711 example, if the snapshot had no clones and the user-initiated reference count
1714 If a snapshot does not qualify for immediate destruction, it is marked for
1715 deferred deletion. In this state, it exists as a usable, visible snapshot until
1716 both of the preconditions listed above are met, at which point it is destroyed.
1718 An inclusive range of snapshots may be specified by separating the
1719 first and last snapshots with a percent sign
1721 The first and/or last snapshots may be left blank, in which case the
1722 filesystem's oldest or newest snapshot will be implied.
1725 (or ranges of snapshots) of the same filesystem or volume may be specified
1726 in a comma-separated list of snapshots.
1727 Only the snapshot's short name (the
1730 should be specified when using a range or comma-separated list to identify
1732 .Bl -tag -width indent
1734 Destroy (or mark for deferred deletion) all snapshots with this name in
1735 descendent file systems.
1737 Recursively destroy all clones of these snapshots, including the clones,
1738 snapshots, and children.
1739 If this flag is specified, the
1741 flag will have no effect.
1743 Do a dry-run ("No-op") deletion. No data will be deleted. This is useful in
1744 conjunction with the
1748 flags to determine what data would be deleted.
1750 Print machine-parsable verbose information about the deleted data.
1752 Print verbose information about the deleted data.
1754 Defer snapshot deletion.
1757 Extreme care should be taken when applying either the
1761 options, as they can destroy large portions of a pool and cause unexpected
1762 behavior for mounted file systems in use.
1766 .Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
1769 The given bookmark is destroyed.
1772 .Cm snapshot Ns | Ns Cm snap
1774 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1775 .Ar filesystem@snapname Ns | Ns volume@snapname
1776 .Ar filesystem@snapname Ns | Ns volume@snapname Ns ...
1779 Creates snapshots with the given names. All previous modifications by
1780 successful system calls to the file system are part of the snapshots.
1781 Snapshots are taken atomically, so that all snapshots correspond to the same
1782 moment in time. See the
1784 section for details.
1785 .Bl -tag -width indent
1787 Recursively create snapshots of all descendent datasets
1788 .It Fl o Ar property Ns = Ns Ar value
1789 Sets the specified property; see
1800 Roll back the given dataset to a previous snapshot. When a dataset is rolled
1801 back, all data that has changed since the snapshot is discarded, and the
1802 dataset reverts to the state at the time of the snapshot. By default, the
1803 command refuses to roll back to a snapshot other than the most recent one. In
1804 order to do so, all intermediate snapshots and bookmarks must be destroyed
1811 options do not recursively destroy the child snapshots of a
1813 Only direct snapshots of the specified filesystem
1814 are destroyed by either of these options.
1815 To completely roll back a
1816 recursive snapshot, you must rollback the individual child snapshots.
1817 .Bl -tag -width indent
1819 Destroy any snapshots and bookmarks more recent than the one specified.
1821 Destroy any more recent snapshots and bookmarks, as well as any clones of those
1826 option to force an unmount of any clone file systems that are to be destroyed.
1832 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1833 .Ar snapshot filesystem Ns | Ns Ar volume
1836 Creates a clone of the given snapshot. See the
1838 section for details. The target dataset can be located anywhere in the
1840 hierarchy, and is created as the same type as the original.
1841 .Bl -tag -width indent
1843 Creates all the non-existing parent datasets. Datasets created in this manner
1844 are automatically mounted according to the
1846 property inherited from their parent. If the target filesystem or volume
1847 already exists, the operation completes successfully.
1848 .It Fl o Ar property Ns = Ns Ar value
1849 Sets the specified property; see
1856 .Ar clone-filesystem
1859 Promotes a clone file system to no longer be dependent on its "origin"
1860 snapshot. This makes it possible to destroy the file system that the clone was
1861 created from. The clone parent-child dependency relationship is reversed, so
1862 that the origin file system becomes a clone of the specified file system.
1864 The snapshot that was cloned, and any snapshots previous to this snapshot, are
1865 now owned by the promoted clone. The space they use moves from the origin file
1866 system to the promoted clone, so enough space must be available to accommodate
1867 these snapshots. No new space is consumed by this operation, but the space
1868 accounting is adjusted. The promoted clone must not have any conflicting
1869 snapshot names of its own. The
1871 subcommand can be used to rename any conflicting snapshots.
1876 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
1877 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
1884 .Ar filesystem Ns | Ns Ar volume
1885 .Ar filesystem Ns | Ns Ar volume
1892 .Ar filesystem filesystem
1895 Renames the given dataset. The new target can be located anywhere in the
1897 hierarchy, with the exception of snapshots. Snapshots can only be renamed
1898 within the parent file system or volume. When renaming a snapshot, the parent
1899 file system of the snapshot does not need to be specified as part of the second
1900 argument. Renamed file systems can inherit new mount points, in which case they
1901 are unmounted and remounted at the new mount point.
1902 .Bl -tag -width indent
1904 Creates all the nonexistent parent datasets. Datasets created in this manner
1905 are automatically mounted according to the
1907 property inherited from their parent.
1909 Do not remount file systems during rename. If a file system's
1915 file system is not unmounted even if this option is not given.
1917 Force unmount any filesystems that need to be unmounted in the process.
1918 This flag has no effect if used together with the
1926 .Ar snapshot snapshot
1929 Recursively rename the snapshots of all descendent datasets. Snapshots are the
1930 only dataset that can be renamed recursively.
1934 .Op Fl r Ns | Ns Fl d Ar depth
1936 .Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
1937 .Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
1938 .Oo Fl s Ar property Oc Ns ...
1939 .Oo Fl S Ar property Oc Ns ...
1940 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
1943 Lists the property information for the given datasets in tabular form. If
1944 specified, you can list property information by the absolute pathname or the
1945 relative pathname. By default, all file systems and volumes are displayed.
1946 Snapshots are displayed if the
1952 The following fields are displayed,
1953 .Sy name , used , available , referenced , mountpoint .
1954 .Bl -tag -width indent
1956 Recursively display any children of the dataset on the command line.
1958 Recursively display any children of the dataset, limiting the recursion to
1962 will display only the dataset and its direct children.
1964 Used for scripting mode. Do not print headers and separate fields by a single
1965 tab instead of arbitrary white space.
1967 Display numbers in parsable (exact) values.
1968 .It Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
1969 A comma-separated list of properties to display. The property must be:
1970 .Bl -bullet -offset 2n
1972 One of the properties described in the
1973 .Qq Sx Native Properties
1980 to display the dataset name
1984 to display space usage properties on file systems and volumes. This is a
1985 shortcut for specifying
1987 .Sy name,avail,used,usedsnap,usedds,usedrefreserv,usedchild
1989 .Sy filesystem,volume
1992 .It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
1993 A comma-separated list of types to display, where
1996 .Sy filesystem , snapshot , snap , volume , bookmark , No or Sy all .
1997 For example, specifying
1999 displays only snapshots.
2000 .It Fl s Ar property
2001 A property for sorting the output by column in ascending order based on the
2002 value of the property. The property must be one of the properties described in
2005 section, or the special value
2007 to sort by the dataset name. Multiple properties can be specified at one time
2010 property options. Multiple
2012 options are evaluated from left to right in decreasing order of importance.
2014 The following is a list of sorting criteria:
2015 .Bl -bullet -offset 2n
2017 Numeric types sort in numeric order.
2019 String types sort in alphabetical order.
2021 Types inappropriate for a row sort that row to the literal bottom, regardless
2022 of the specified ordering.
2024 If no sorting options are specified the existing behavior of
2028 .It Fl S Ar property
2031 option, but sorts by property in descending order.
2036 .Ar property Ns = Ns Ar value
2037 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2040 Sets the property to the given value for each dataset. Only some properties can
2041 be edited. See the "Properties" section for more information on what properties
2042 can be set and acceptable values. Numeric values can be specified as exact
2043 values, or in a human-readable form with a suffix of
2044 .Sy B , K , M , G , T , P , E , Z
2045 (for bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes, or
2046 zettabytes, respectively). User properties can be set on snapshots. For more
2047 information, see the
2048 .Qq Sx User Properties
2053 .Op Fl r Ns | Ns Fl d Ar depth
2055 .Op Fl o Ar all | field Ns Oo , Ns Ar field Oc Ns ...
2056 .Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2057 .Op Fl s Ar source Ns Oo , Ns Ar source Oc Ns ...
2058 .Ar all | property Ns Oo , Ns Ar property Oc Ns ...
2059 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2062 Displays properties for the given datasets. If no datasets are specified, then
2063 the command displays properties for all datasets on the system. For each
2064 property, the following columns are displayed:
2066 .Bl -hang -width "property" -offset indent -compact
2074 Property source. Can either be local, default, temporary, inherited, or none
2078 All columns except the
2080 column are displayed by default. The columns to display can be specified
2083 option. This command takes a comma-separated list of properties as described in
2085 .Qq Sx Native Properties
2087 .Qq Sx User Properties
2092 can be used to display all properties that apply to the given dataset's type
2093 (filesystem, volume, snapshot, or bookmark).
2094 .Bl -tag -width indent
2096 Recursively display properties for any children.
2098 Recursively display any children of the dataset, limiting the recursion to
2102 will display only the dataset and its direct children.
2104 Display output in a form more easily parsed by scripts. Any headers are
2105 omitted, and fields are explicitly separated by a single tab instead of an
2106 arbitrary amount of space.
2108 Display numbers in parsable (exact) values.
2109 .It Fl o Cm all | Ar field Ns Oo , Ns Ar field Oc Ns ...
2110 A comma-separated list of columns to display. Supported values are
2111 .Sy name,property,value,received,source .
2113 .Sy name,property,value,source .
2116 specifies all columns.
2117 .It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2118 A comma-separated list of types to display, where
2121 .Sy filesystem , snapshot , volume , No or Sy all .
2122 For example, specifying
2124 displays only snapshots.
2125 .It Fl s Ar source Ns Oo , Ns Ar source Oc Ns ...
2126 A comma-separated list of sources to display. Those properties coming from a
2127 source other than those in this list are ignored. Each source must be one of
2129 .Sy local,default,inherited,temporary,received,none .
2130 The default value is all sources.
2137 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2140 Clears the specified property, causing it to be inherited from an ancestor. If
2141 no ancestor has the property set, then the default value is used. See the
2143 section for a listing of default values, and details on which properties can be
2145 .Bl -tag -width indent
2147 Recursively inherit the given property for all children.
2149 For properties with a received value, revert to this value. This flag has no
2150 effect on properties that do not have a received value.
2158 Displays a list of file systems that are not the most recent version.
2159 .Bl -tag -width indent
2163 filesystem versions supported by the current software. The current
2165 filesystem version and all previous supported versions are displayed, along
2166 with an explanation of the features provided with each version.
2173 .Fl a | Ar filesystem
2176 Upgrades file systems to a new on-disk version. Once this is done, the file
2177 systems will no longer be accessible on systems running older versions of the
2180 streams generated from new snapshots of these file systems cannot be accessed
2181 on systems running older versions of the software.
2183 In general, the file system version is independent of the pool version. See
2185 for information on the
2186 .Nm zpool Cm upgrade
2189 In some cases, the file system version and the pool version are interrelated
2190 and the pool version must be upgraded before the file system version can be
2192 .Bl -tag -width indent
2194 Upgrade the specified file system and all descendent file systems.
2196 Upgrade to the specified
2200 flag is not specified, this command upgrades to the most recent version. This
2201 option can only be used to increase the version number, and only up to the most
2202 recent version supported by this software.
2204 Upgrade all file systems on all imported pools.
2206 Upgrade the specified file system.
2212 .Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
2213 .Oo Fl s Ar field Oc Ns ...
2214 .Oo Fl S Ar field Oc Ns ...
2215 .Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2216 .Ar filesystem Ns | Ns Ar snapshot
2219 Displays space consumed by, and quotas on, each user in the specified
2220 filesystem or snapshot. This corresponds to the
2221 .Sy userused@ Ns Ar user
2223 .Sy userquota@ Ns Ar user
2225 .Bl -tag -width indent
2227 Print numeric ID instead of user/group name.
2229 Do not print headers, use tab-delimited output.
2231 Use exact (parsable) numeric output.
2232 .It Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
2233 Display only the specified fields from the following set:
2234 .Sy type,name,used,quota .
2235 The default is to display all fields.
2237 Sort output by this field. The
2241 flags may be specified multiple times to sort first by one field, then by
2242 another. The default is
2243 .Fl s Cm type Fl s Cm name .
2245 Sort by this field in reverse order. See
2247 .It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2248 Print only the specified types from the following set:
2249 .Sy all,posixuser,smbuser,posixgroup,smbgroup .
2252 .Fl t Cm posixuser,smbuser .
2254 The default can be changed to include group types.
2256 Translate SID to POSIX ID. This flag currently has no effect on
2263 .Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
2264 .Oo Fl s Ar field Oc Ns ...
2265 .Oo Fl S Ar field Oc Ns ...
2266 .Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2267 .Ar filesystem Ns | Ns Ar snapshot
2270 Displays space consumed by, and quotas on, each group in the specified
2271 filesystem or snapshot. This subcommand is identical to
2272 .Qq Nm Cm userspace ,
2273 except that the default types to display are
2274 .Fl t Sy posixgroup,smbgroup .
2282 file systems currently mounted.
2283 .Bl -tag -width indent
2290 .Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
2291 .Fl a | Ar filesystem
2297 .Bl -tag -width indent
2299 Report mount progress.
2301 Perform an overlay mount. Overlay mounts are not supported on
2303 .It Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
2304 An optional, comma-separated list of mount options to use temporarily for the
2305 duration of the mount. See the
2306 .Qq Sx Temporary Mount Point Properties
2307 section for details.
2312 This command may be executed on
2316 For more information, see variable
2321 Mount the specified filesystem.
2325 .Cm unmount Ns | Ns Cm umount
2327 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
2330 Unmounts currently mounted
2333 .Bl -tag -width indent
2335 Forcefully unmount the file system, even if it is currently in use.
2337 Unmount all available
2340 .It Ar filesystem | mountpoint
2341 Unmount the specified filesystem. The command can also be given a path to a
2343 file system mount point on the system.
2348 .Fl a | Ar filesystem
2353 file systems that have the
2356 .Bl -tag -width indent
2360 file systems that have the
2363 This command may be executed on
2367 For more information, see variable
2372 Share the specified filesystem according to the
2374 property. File systems are shared when the
2381 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
2386 file systems that have the
2389 .Bl -tag -width indent
2393 file systems that have the
2396 This command may be executed on
2400 For more information, see variable
2404 .It Ar filesystem | mountpoint
2405 Unshare the specified filesystem. The command can also be given a path to a
2407 file system shared on the system.
2416 Creates a bookmark of the given snapshot.
2417 Bookmarks mark the point in time
2418 when the snapshot was created, and can be used as the incremental source for
2423 This feature must be enabled to be used.
2425 .Xr zpool-features 7
2426 for details on ZFS feature flags and the
2433 .Op Fl i Ar snapshot | Fl I Ar snapshot
2437 Creates a stream representation of the last
2439 argument (not part of
2443 which is written to standard output. The output can be redirected to
2444 a file or to a different system (for example, using
2446 By default, a full stream is generated.
2447 .Bl -tag -width indent
2448 .It Fl i Ar snapshot
2449 Generate an incremental stream from the first
2450 .Ar snapshot Pq the incremental source
2452 .Ar snapshot Pq the incremental target .
2453 The incremental source can be specified as the last component of the
2455 .Pq the Em @ No character and following
2457 it is assumed to be from the same file system as the incremental target.
2459 If the destination is a clone, the source may be the origin snapshot, which
2460 must be fully specified (for example,
2461 .Cm pool/fs@origin ,
2464 .It Fl I Ar snapshot
2465 Generate a stream package that sends all intermediary snapshots from the first
2472 .Ic -i @a fs@b; -i @b fs@c; -i @c fs@d .
2474 source may be specified as with the
2478 Generate a replication stream package, which will replicate the specified
2479 filesystem, and all descendent file systems, up to the named snapshot. When
2480 received, all properties, snapshots, descendent file systems, and clones are
2487 flags are used in conjunction with the
2489 flag, an incremental replication stream is generated. The current values of
2490 properties, and current snapshot and file system names are set when the stream
2493 flag is specified when this stream is received, snapshots and file systems that
2494 do not exist on the sending side are destroyed.
2496 Generate a deduplicated stream. Blocks which would have been sent multiple
2497 times in the send stream will only be sent once. The receiving system must
2498 also support this feature to receive a deduplicated stream. This flag can
2499 be used regardless of the dataset's
2501 property, but performance will be much better if the filesystem uses a
2502 dedup-capable checksum (eg.
2505 Include the dataset's properties in the stream. This flag is implicit when
2507 is specified. The receiving system must also support this feature.
2509 Do a dry-run ("No-op") send. Do not generate any actual send data. This is
2510 useful in conjunction with the
2514 flags to determine what data will be sent.
2516 Print machine-parsable verbose information about the stream package generated.
2518 Print verbose information about the stream package generated.
2519 This information includes a per-second report of how much data has been sent.
2522 The format of the stream is committed. You will be able to receive your streams
2523 on future versions of
2528 .Op Fl i Ar snapshot Ns | Ns Ar bookmark
2529 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2532 Generate a send stream, which may be of a filesystem, and may be
2533 incremental from a bookmark.
2534 If the destination is a filesystem or volume,
2535 the pool must be read-only, or the filesystem must not be mounted.
2537 stream generated from a filesystem or volume is received, the default snapshot
2540 .Bl -tag -width indent
2541 .It Fl i Ar snapshot Ns | Ns bookmark
2542 Generate an incremental send stream.
2543 The incremental source must be an earlier
2544 snapshot in the destination's history.
2545 It will commonly be an earlier
2546 snapshot in the destination's filesystem, in which case it can be
2547 specified as the last component of the name
2548 .Pq the Em # No or Em @ No character and following .
2550 If the incremental target is a clone, the incremental source can
2551 be the origin snapshot, or an earlier snapshot in the origin's filesystem,
2552 or the origin's origin, etc.
2556 .Cm receive Ns | Ns Cm recv
2558 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2562 .Cm receive Ns | Ns Cm recv
2568 Creates a snapshot whose contents are as specified in the stream provided on
2569 standard input. If a full stream is received, then a new file system is created
2570 as well. Streams are created using the
2572 subcommand, which by default creates a full stream.
2574 can be used as an alias for
2577 If an incremental stream is received, then the destination file system must
2578 already exist, and its most recent snapshot must match the incremental stream's
2581 the destination device link is destroyed and recreated, which means the
2583 cannot be accessed during the
2587 When a snapshot replication package stream that is generated by using the
2589 command is received, any snapshots that do not exist on the sending location
2590 are destroyed by using the
2591 .Qq Nm Cm destroy Fl d
2594 The name of the snapshot (and file system, if a full stream is received) that
2595 this subcommand creates depends on the argument type and the
2601 If the argument is a snapshot name, the specified
2603 is created. If the argument is a file system or volume name, a snapshot with
2604 the same name as the sent snapshot is created within the specified
2612 option is specified, the snapshot name is determined by appending the sent
2613 snapshot's name to the specified
2617 option is specified, all but the pool name of the sent snapshot path is
2618 appended (for example,
2620 appended from sent snapshot
2624 option is specified, only the tail of the sent snapshot path is appended (for
2627 appended from sent snapshot
2631 any file systems needed to replicate the path of the sent snapshot are created
2632 within the specified file system.
2633 .Bl -tag -width indent
2635 Use the full sent snapshot path without the first element (without pool name)
2636 to determine the name of the new snapshot as described in the paragraph above.
2638 Use only the last element of the sent snapshot path to determine the name of
2639 the new snapshot as described in the paragraph above.
2641 File system that is associated with the received stream is not mounted.
2643 Print verbose information about the stream and the time required to perform the
2646 Do not actually receive the stream. This can be useful in conjunction with the
2648 option to verify the name the receive operation would use.
2650 Force a rollback of the file system to the most recent snapshot before
2651 performing the receive operation. If receiving an incremental replication
2652 stream (for example, one generated by
2653 .Qq Nm Cm send Fl R Fi iI ) ,
2654 destroy snapshots and file systems that do not exist on the sending side.
2659 .Ar filesystem Ns | Ns Ar volume
2662 Displays permissions that have been delegated on the specified filesystem or
2663 volume. See the other forms of
2665 for more information.
2670 .Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ...
2671 .Ar perm Ns | Ns Ar @setname Ns
2672 .Oo Ns , Ns Ar perm Ns | Ns Ar @setname Oc Ns ...
2673 .Ar filesystem Ns | Ns Ar volume
2679 .Fl e Ns | Ns Cm everyone
2680 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
2682 .Ar filesystem Ns | Ns Ar volume
2687 administration permission for the file systems to non-privileged users.
2688 .Bl -tag -width indent
2691 .Ar user Ns | Ns Ar group Ns Oo , Ar user Ns | Ns Ar group Oc Ns ...
2693 Specifies to whom the permissions are delegated. Multiple entities can be
2694 specified as a comma-separated list. If neither of the
2696 options are specified, then the argument is interpreted preferentially as the
2699 then as a user name, and lastly as a group name. To specify
2700 a user or group named
2706 options. To specify a group with the same name as a user, use the
2709 .It Op Fl e Ns | Ns Cm everyone
2710 Specifies that the permissions be delegated to
2713 .Ar perm Ns | Ns Ar @setname Ns Oo , Ns Ar perm Ns | Ns Ar @setname Oc Ns ...
2715 The permissions to delegate. Multiple permissions
2716 may be specified as a comma-separated list. Permission names are the same as
2718 subcommand and property names. See the property list below. Property set names,
2719 which begin with an at sign
2721 may be specified. See the
2723 form below for details.
2726 .Ar filesystem Ns | Ns Ar volume
2728 Specifies where the permissions are delegated. If neither of the
2730 options are specified, or both are, then the permissions are allowed for the
2731 file system or volume, and all of its descendents. If only the
2733 option is used, then is allowed "locally" only for the specified file system.
2736 option is used, then is allowed only for the descendent file systems.
2739 Permissions are generally the ability to use a
2741 subcommand or change a
2743 property. The following permissions are available:
2744 .Bl -column -offset 4n "secondarycache" "subcommand"
2745 .It NAME Ta TYPE Ta NOTES
2746 .It allow Ta subcommand Ta Must Xo
2747 also have the permission that is being allowed
2749 .It clone Ta subcommand Ta Must Xo
2750 also have the 'create' ability and 'mount' ability in the origin file system
2752 .It create Ta subcommand Ta Must also have the 'mount' ability
2753 .It destroy Ta subcommand Ta Must also have the 'mount' ability
2754 .It diff Ta subcommand Ta Allows lookup of paths within a dataset given an
2755 object number, and the ability to create snapshots necessary to 'zfs diff'
2756 .It hold Ta subcommand Ta Allows adding a user hold to a snapshot
2757 .It mount Ta subcommand Ta Allows mount/umount of Tn ZFS No datasets
2758 .It promote Ta subcommand Ta Must Xo
2759 also have the 'mount' and 'promote' ability in the origin file system
2761 .It receive Ta subcommand Ta Must also have the 'mount' and 'create' ability
2762 .It release Ta subcommand Ta Allows Xo
2763 releasing a user hold which might destroy the snapshot
2765 .It rename Ta subcommand Ta Must Xo
2766 also have the 'mount' and 'create' ability in the new parent
2768 .It rollback Ta subcommand Ta Must also have the 'mount' ability
2769 .It send Ta subcommand
2770 .It share Ta subcommand Ta Allows Xo
2771 sharing file systems over the
2775 .It snapshot Ta subcommand Ta Must also have the 'mount' ability
2776 .It groupquota Ta other Ta Allows accessing any groupquota@... property
2777 .It groupused Ta other Ta Allows reading any groupused@... property
2778 .It userprop Ta other Ta Allows changing any user property
2779 .It userquota Ta other Ta Allows accessing any userquota@... property
2780 .It userused Ta other Ta Allows reading any userused@... property
2781 .It aclinherit Ta property
2782 .It aclmode Ta property
2783 .It atime Ta property
2784 .It canmount Ta property
2785 .It casesensitivity Ta property
2786 .It checksum Ta property
2787 .It compression Ta property
2788 .It copies Ta property
2789 .It dedup Ta property
2790 .It devices Ta property
2791 .It exec Ta property
2792 .It filesystem_limit Ta property
2793 .It logbias Ta property
2794 .It jailed Ta property
2795 .It mlslabel Ta property
2796 .It mountpoint Ta property
2797 .It nbmand Ta property
2798 .It normalization Ta property
2799 .It primarycache Ta property
2800 .It quota Ta property
2801 .It readonly Ta property
2802 .It recordsize Ta property
2803 .It refquota Ta property
2804 .It refreservation Ta property
2805 .It reservation Ta property
2806 .It secondarycache Ta property
2807 .It setuid Ta property
2808 .It sharenfs Ta property
2809 .It sharesmb Ta property
2810 .It snapdir Ta property
2811 .It snapshot_limit Ta property
2812 .It sync Ta property
2813 .It utf8only Ta property
2814 .It version Ta property
2815 .It volblocksize Ta property
2816 .It volsize Ta property
2817 .It vscan Ta property
2818 .It xattr Ta property
2824 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
2826 .Ar filesystem Ns | Ns Ar volume
2829 Sets "create time" permissions. These permissions are granted (locally) to the
2830 creator of any newly-created descendent file system.
2836 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
2838 .Ar filesystem Ns | Ns Ar volume
2841 Defines or adds permissions to a permission set. The set can be used by other
2843 commands for the specified file system and its descendents. Sets are evaluated
2844 dynamically, so changes to a set are immediately reflected. Permission sets
2845 follow the same naming restrictions as ZFS file systems, but the name must
2846 begin with an "at sign"
2848 and can be no more than 64 characters long.
2853 .Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ...
2854 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
2856 .Ar filesystem Ns | Ns Ar volume
2862 .Fl e Ns | Ns Cm everyone
2863 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
2865 .Ar filesystem Ns | Ns Ar volume
2872 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
2874 .Ar filesystem Ns | Ns Ar volume
2877 Removes permissions that were granted with the
2879 command. No permissions are explicitly denied, so other permissions granted are
2880 still in effect. For example, if the permission is granted by an ancestor. If
2881 no permissions are specified, then all permissions for the specified
2882 .Ar user , group , No or everyone
2883 are removed. Specifying
2885 .Po or using the Fl e
2887 .Pc only removes the permissions that were granted to everyone ,
2888 not all permissions for every user and group. See the
2890 command for a description of the
2893 .Bl -tag -width indent
2895 Recursively remove the permissions from this file system and all descendents.
2903 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
2905 .Ar filesystem Ns | Ns Ar volume
2908 Removes permissions from a permission set. If no permissions are specified,
2909 then all permissions are removed, thus removing the set entirely.
2914 .Ar tag snapshot Ns ...
2917 Adds a single reference, named with the
2919 argument, to the specified snapshot or snapshots. Each snapshot has its own tag
2920 namespace, and tags must be unique within that space.
2922 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
2926 .Bl -tag -width indent
2928 Specifies that a hold with the given tag is applied recursively to the
2929 snapshots of all descendent file systems.
2938 Lists all existing user references for the given snapshot or snapshots.
2939 .Bl -tag -width indent
2941 Lists the holds that are set on the named descendent snapshots, in addition to
2942 listing the holds on the named snapshot.
2948 .Ar tag snapshot Ns ...
2951 Removes a single reference, named with the
2953 argument, from the specified snapshot or snapshots. The tag must already exist
2955 .Bl -tag -width indent
2957 Recursively releases a hold with the given tag on the snapshots of all
2958 descendent file systems.
2965 .Op Ar snapshot Ns | Ns Ar filesystem
2968 Display the difference between a snapshot of a given filesystem and another
2969 snapshot of that filesystem from a later time or the current contents of the
2970 filesystem. The first column is a character indicating the type of change,
2971 the other columns indicate pathname, new pathname
2972 .Pq in case of rename ,
2973 change in link count, and optionally file type and/or change time.
2975 The types of change are:
2976 .Bl -column -offset 2n indent
2977 .It \&- Ta path was removed
2978 .It \&+ Ta path was added
2979 .It \&M Ta path was modified
2980 .It \&R Ta path was renamed
2982 .Bl -tag -width indent
2984 Display an indication of the type of file, in a manner similar to the
2988 .Bl -column -offset 2n indent
2989 .It \&B Ta block device
2990 .It \&C Ta character device
2991 .It \&F Ta regular file
2992 .It \&/ Ta directory
2993 .It \&@ Ta symbolic link
2995 .It \&> Ta door (not supported on Fx )
2996 .It \&| Ta named pipe (not supported on Fx )
2997 .It \&P Ta event port (not supported on Fx )
3000 Give more parsable tab-separated output, without header lines and without
3003 Display the path's inode change time as the first column of output.
3008 .Ar jailid filesystem
3011 Attaches the specified
3013 to the jail identified by JID
3015 From now on this file system tree can be managed from within a jail if the
3017 property has been set. To use this functionality, the jail needs the
3021 parameters set to 1 and the
3023 parameter set to a value lower than 2.
3027 for more information on managing jails and configuring the parameters above.
3031 .Ar jailid filesystem
3034 Detaches the specified
3036 from the jail identified by JID
3040 The following exit values are returned:
3041 .Bl -tag -offset 2n -width 2n
3043 Successful completion.
3047 Invalid command line options were specified.
3051 .It Sy Example 1 No Creating a Tn ZFS No File System Hierarchy
3053 The following commands create a file system named
3055 and a file system named
3059 is set for the parent file system, and is automatically inherited by the child
3061 .Bd -literal -offset 2n
3062 .Li # Ic zfs create pool/home
3063 .Li # Ic zfs set mountpoint=/home pool/home
3064 .Li # Ic zfs create pool/home/bob
3066 .It Sy Example 2 No Creating a Tn ZFS No Snapshot
3068 The following command creates a snapshot named
3070 This snapshot is mounted on demand in the
3072 directory at the root of the
3075 .Bd -literal -offset 2n
3076 .Li # Ic zfs snapshot pool/home/bob@yesterday
3078 .It Sy Example 3 No Creating and Destroying Multiple Snapshots
3080 The following command creates snapshots named
3084 and all of its descendent file systems. Each snapshot is mounted on demand in
3087 directory at the root of its file system. The second command destroys the newly
3089 .Bd -literal -offset 2n
3090 .Li # Ic zfs snapshot -r pool/home@yesterday
3091 .Li # Ic zfs destroy -r pool/home@yesterday
3093 .It Sy Example 4 No Disabling and Enabling File System Compression
3095 The following command disables the
3097 property for all file systems under
3099 The next command explicitly enables
3102 .Em pool/home/anne .
3103 .Bd -literal -offset 2n
3104 .Li # Ic zfs set compression=off pool/home
3105 .Li # Ic zfs set compression=on pool/home/anne
3107 .It Sy Example 5 No Listing Tn ZFS No Datasets
3109 The following command lists all active file systems and volumes in the system.
3110 Snapshots are displayed if the
3118 for more information on pool properties.
3119 .Bd -literal -offset 2n
3121 NAME USED AVAIL REFER MOUNTPOINT
3122 pool 450K 457G 18K /pool
3123 pool/home 315K 457G 21K /home
3124 pool/home/anne 18K 457G 18K /home/anne
3125 pool/home/bob 276K 457G 276K /home/bob
3127 .It Sy Example 6 No Setting a Quota on a Tn ZFS No File System
3129 The following command sets a quota of 50 Gbytes for
3131 .Bd -literal -offset 2n
3132 .Li # Ic zfs set quota=50G pool/home/bob
3134 .It Sy Example 7 No Listing Tn ZFS No Properties
3136 The following command lists all properties for
3138 .Bd -literal -offset 2n
3139 .Li # Ic zfs get all pool/home/bob
3140 NAME PROPERTY VALUE SOURCE
3141 pool/home/bob type filesystem -
3142 pool/home/bob creation Tue Jul 21 15:53 2009 -
3143 pool/home/bob used 21K -
3144 pool/home/bob available 20.0G -
3145 pool/home/bob referenced 21K -
3146 pool/home/bob compressratio 1.00x -
3147 pool/home/bob mounted yes -
3148 pool/home/bob quota 20G local
3149 pool/home/bob reservation none default
3150 pool/home/bob recordsize 128K default
3151 pool/home/bob mountpoint /home/bob default
3152 pool/home/bob sharenfs off default
3153 pool/home/bob checksum on default
3154 pool/home/bob compression on local
3155 pool/home/bob atime on default
3156 pool/home/bob devices on default
3157 pool/home/bob exec on default
3158 pool/home/bob filesystem_limit none default
3159 pool/home/bob setuid on default
3160 pool/home/bob readonly off default
3161 pool/home/bob jailed off default
3162 pool/home/bob snapdir hidden default
3163 pool/home/bob snapshot_limit none default
3164 pool/home/bob aclmode discard default
3165 pool/home/bob aclinherit restricted default
3166 pool/home/bob canmount on default
3167 pool/home/bob xattr on default
3168 pool/home/bob copies 1 default
3169 pool/home/bob version 5 -
3170 pool/home/bob utf8only off -
3171 pool/home/bob normalization none -
3172 pool/home/bob casesensitivity sensitive -
3173 pool/home/bob vscan off default
3174 pool/home/bob nbmand off default
3175 pool/home/bob sharesmb off default
3176 pool/home/bob refquota none default
3177 pool/home/bob refreservation none default
3178 pool/home/bob primarycache all default
3179 pool/home/bob secondarycache all default
3180 pool/home/bob usedbysnapshots 0 -
3181 pool/home/bob usedbydataset 21K -
3182 pool/home/bob usedbychildren 0 -
3183 pool/home/bob usedbyrefreservation 0 -
3184 pool/home/bob logbias latency default
3185 pool/home/bob dedup off default
3186 pool/home/bob mlslabel -
3187 pool/home/bob sync standard default
3188 pool/home/bob refcompressratio 1.00x -
3191 The following command gets a single property value.
3192 .Bd -literal -offset 2n
3193 .Li # Ic zfs get -H -o value compression pool/home/bob
3197 The following command lists all properties with local settings for
3199 .Bd -literal -offset 2n
3200 .Li # Ic zfs get -s local -o name,property,value all pool/home/bob
3202 pool/home/bob quota 20G
3203 pool/home/bob compression on
3205 .It Sy Example 8 No Rolling Back a Tn ZFS No File System
3207 The following command reverts the contents of
3209 to the snapshot named
3211 deleting all intermediate snapshots.
3212 .Bd -literal -offset 2n
3213 .Li # Ic zfs rollback -r pool/home/anne@yesterday
3215 .It Sy Example 9 No Creating a Tn ZFS No Clone
3217 The following command creates a writable file system whose initial contents are
3219 .Em pool/home/bob@yesterday .
3220 .Bd -literal -offset 2n
3221 .Li # Ic zfs clone pool/home/bob@yesterday pool/clone
3223 .It Sy Example 10 No Promoting a Tn ZFS No Clone
3225 The following commands illustrate how to test out changes to a file system, and
3226 then replace the original file system with the changed one, using clones, clone
3227 promotion, and renaming:
3228 .Bd -literal -offset 2n
3229 .Li # Ic zfs create pool/project/production
3233 .Pa /pool/project/production
3234 with data and continue with the following commands:
3235 .Bd -literal -offset 2n
3236 .Li # Ic zfs snapshot pool/project/production@today
3237 .Li # Ic zfs clone pool/project/production@today pool/project/beta
3241 .Pa /pool/project/beta
3242 and continue with the following commands:
3243 .Bd -literal -offset 2n
3244 .Li # Ic zfs promote pool/project/beta
3245 .Li # Ic zfs rename pool/project/production pool/project/legacy
3246 .Li # Ic zfs rename pool/project/beta pool/project/production
3249 Once the legacy version is no longer needed, it can be destroyed.
3250 .Bd -literal -offset 2n
3251 .Li # Ic zfs destroy pool/project/legacy
3253 .It Sy Example 11 No Inheriting Tn ZFS No Properties
3255 The following command causes
3261 property from their parent.
3262 .Bd -literal -offset 2n
3263 .Li # Ic zfs inherit checksum pool/home/bob pool/home/anne
3265 .It Sy Example 12 No Remotely Replicating Tn ZFS No Data
3267 The following commands send a full stream and then an incremental stream to a
3268 remote machine, restoring them into
3269 .Sy poolB/received/fs@a
3271 .Sy poolB/received/fs@b ,
3274 must contain the file system
3275 .Sy poolB/received ,
3276 and must not initially contain
3277 .Sy poolB/received/fs .
3278 .Bd -literal -offset 2n
3279 .Li # Ic zfs send pool/fs@a | ssh host zfs receive poolB/received/fs@a
3280 .Li # Ic zfs send -i a pool/fs@b | ssh host zfs receive poolB/received/fs
3289 The following command sends a full stream of
3290 .Sy poolA/fsA/fsB@snap
3291 to a remote machine, receiving it into
3292 .Sy poolB/received/fsA/fsB@snap .
3295 portion of the received snapshot's name is determined from the name of the sent
3298 must contain the file system
3299 .Sy poolB/received .
3301 .Sy poolB/received/fsA
3302 does not exist, it is created as an empty file system.
3303 .Bd -literal -offset 2n
3304 .Li # Ic zfs send poolA/fsA/fsB@snap | ssh host zfs receive -d poolB/received
3306 .It Sy Example 14 No Setting User Properties
3308 The following example sets the user-defined
3309 .Sy com.example:department
3310 property for a dataset.
3311 .Bd -literal -offset 2n
3312 .Li # Ic zfs set com.example:department=12345 tank/accounting
3314 .It Sy Example 15 No Performing a Rolling Snapshot
3316 The following example shows how to maintain a history of snapshots with a
3317 consistent naming scheme. To keep a week's worth of snapshots, the user
3318 destroys the oldest snapshot, renames the remaining snapshots, and then creates
3319 a new snapshot, as follows:
3320 .Bd -literal -offset 2n
3321 .Li # Ic zfs destroy -r pool/users@7daysago
3322 .Li # Ic zfs rename -r pool/users@6daysago @7daysago
3323 .Li # Ic zfs rename -r pool/users@5daysago @6daysago
3324 .Li # Ic zfs rename -r pool/users@4daysago @5daysago
3325 .Li # Ic zfs rename -r pool/users@3daysago @4daysago
3326 .Li # Ic zfs rename -r pool/users@2daysago @3daysago
3327 .Li # Ic zfs rename -r pool/users@yesterday @2daysago
3328 .Li # Ic zfs rename -r pool/users@today @yesterday
3329 .Li # Ic zfs snapshot -r pool/users@today
3335 Property Options on a ZFS File System
3338 The following command shows how to set
3340 property options to enable root access for a specific network on the
3342 file system. The contents of the
3347 .Bd -literal -offset 2n
3348 .Li # Ic zfs set sharenfs="maproot=root,network 192.168.0.0/24" tank/home
3351 Another way to write this command with the same result is:
3352 .Bd -literal -offset 2n
3353 .Li # Ic set zfs sharenfs="-maproot=root -network 192.168.0.0/24" tank/home
3359 Administration Permissions on a
3364 The following example shows how to set permissions so that user
3366 can create, destroy, mount, and take snapshots on
3371 .Bd -literal -offset 2n
3372 .Li # Ic zfs allow cindys create,destroy,mount,snapshot tank/cindys
3373 .Li # Ic zfs allow tank/cindys
3374 -------------------------------------------------------------
3375 Local+Descendent permissions on (tank/cindys)
3376 user cindys create,destroy,mount,snapshot
3377 -------------------------------------------------------------
3379 .It Sy Example 18 No Delegating Create Time Permissions on a Tn ZFS No Dataset
3381 The following example shows how to grant anyone in the group
3383 to create file systems in
3385 This syntax also allows staff members to destroy their own file systems, but
3386 not destroy anyone else's file system. The permissions on
3389 .Bd -literal -offset 2n
3390 .Li # Ic zfs allow staff create,mount tank/users
3391 .Li # Ic zfs allow -c destroy tank/users
3392 .Li # Ic zfs allow tank/users
3393 -------------------------------------------------------------
3394 Create time permissions on (tank/users)
3396 Local+Descendent permissions on (tank/users)
3397 group staff create,mount
3398 -------------------------------------------------------------
3402 Defining and Granting a Permission Set on a
3407 The following example shows how to define and grant a permission set on the
3409 file system. The permissions on
3412 .Bd -literal -offset 2n
3413 .Li # Ic zfs allow -s @pset create,destroy,snapshot,mount tank/users
3414 .Li # Ic zfs allow staff @pset tank/users
3415 .Li # Ic zfs allow tank/users
3416 -------------------------------------------------------------
3417 Permission sets on (tank/users)
3418 @pset create,destroy,mount,snapshot
3419 Create time permissions on (tank/users)
3421 Local+Descendent permissions on (tank/users)
3422 group staff @pset,create,mount
3423 -------------------------------------------------------------
3425 .It Sy Example 20 No Delegating Property Permissions on a Tn ZFS No Dataset
3427 The following example shows to grant the ability to set quotas and reservations
3430 file system. The permissions on
3433 .Bd -literal -offset 2n
3434 .Li # Ic zfs allow cindys quota,reservation users/home
3435 .Li # Ic zfs allow cindys
3436 -------------------------------------------------------------
3437 Local+Descendent permissions on (users/home)
3438 user cindys quota,reservation
3439 -------------------------------------------------------------
3440 .Li # Ic su - cindys
3441 .Li cindys% Ic zfs set quota=10G users/home/marks
3442 .Li cindys% Ic zfs get quota users/home/marks
3443 NAME PROPERTY VALUE SOURCE
3444 users/home/marks quota 10G local
3446 .It Sy Example 21 No Removing ZFS Delegated Permissions on a Tn ZFS No Dataset
3448 The following example shows how to remove the snapshot permission from the
3452 file system. The permissions on
3455 .Bd -literal -offset 2n
3456 .Li # Ic zfs unallow staff snapshot tank/users
3457 .Li # Ic zfs allow tank/users
3458 -------------------------------------------------------------
3459 Permission sets on (tank/users)
3460 @pset create,destroy,mount,snapshot
3461 Create time permissions on (tank/users)
3463 Local+Descendent permissions on (tank/users)
3464 group staff @pset,create,mount
3465 -------------------------------------------------------------
3467 .It Sy Example 22 Showing the differences between a snapshot and a ZFS Dataset
3469 The following example shows how to see what has changed between a prior
3470 snapshot of a ZFS Dataset and its current state. The
3472 option is used to indicate type information for the files affected.
3473 .Bd -literal -offset 2n
3474 .Li # Ic zfs diff tank/test@before tank/test
3476 M F /tank/test/linked (+1)
3477 R F /tank/test/oldname -> /tank/test/newname
3478 - F /tank/test/deleted
3479 + F /tank/test/created
3480 M F /tank/test/modified
3494 This manual page is a
3496 reimplementation of the
3500 modified and customized for
3502 and licensed under the
3503 Common Development and Distribution License
3508 implementation of this manual page was initially written by
3509 .An Martin Matuska Aq mm@FreeBSD.org .