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, Bryan Drewery <bdrewery@FreeBSD.org>
24 .\" Copyright (c) 2012, Glen Barber <gjb@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>
30 .\" Copyright (c) 2015, The FreeBSD Foundation, All Rights Reserved.
39 .Nd configures ZFS file systems
46 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... Ar filesystem
51 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
57 .Ar filesystem Ns | Ns Ar volume
62 .Ar filesystem Ns | Ns volume
65 .Op , Ns Ar snap Op % Ns Ar snap
70 .Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
72 .Cm snapshot Ns | Ns Cm snap
74 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
75 .Ar filesystem@snapname Ns | Ns Ar volume@snapname
76 .Ar filesystem@snapname Ns | Ns Ar volume@snapname Ns ...
84 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
85 .Ar snapshot filesystem Ns | Ns Ar volume
92 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
93 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
98 .Ar filesystem Ns | Ns Ar volume
99 .Ar filesystem Ns | Ns Ar volume
103 .Ar snapshot snapshot
108 .Ar filesystem filesystem
111 .Op Fl r Ns | Ns Fl d Ar depth
113 .Op Fl o Ar property Ns Oo , Ns property Ns Oc Ns ...
114 .Op Fl t Ar type Ns Oo , Ns type Ns Oc Ns ...
115 .Oo Fl s Ar property Oc Ns ...
116 .Oo Fl S Ar property Oc Ns ...
117 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
120 .Ar property Ns = Ns Ar value
121 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
124 .Op Fl r Ns | Ns Fl d Ar depth
126 .Op Fl o Ar all | field Ns Oo , Ns Ar field Oc Ns ...
127 .Op Fl t Ar type Ns Oo Ns , Ar type Oc Ns ...
128 .Op Fl s Ar source Ns Oo Ns , Ns Ar source Oc Ns ...
129 .Ar all | property Ns Oo Ns , Ns Ar property Oc Ns ...
130 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
135 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
143 .Fl a | Ar filesystem
147 .Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
148 .Oo Fl s Ar field Oc Ns ...
149 .Oo Fl S Ar field Oc Ns ...
150 .Op Fl t Ar type Ns Oo Ns , Ns Ar type Oc Ns ...
151 .Ar filesystem Ns | Ns Ar snapshot
155 .Op Fl o Ar field Ns Oo , Ns field Oc Ns ...
156 .Oo Fl s Ar field Oc Ns ...
157 .Oo Fl S Ar field Oc Ns ...
158 .Op Fl t Ar type Ns Oo Ns , Ns Ar type Oc Ns ...
159 .Ar filesystem Ns | Ns Ar snapshot
165 .Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
166 .Fl a | Ar filesystem
168 .Cm unmount Ns | Ns Cm umount
170 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
173 .Fl a | Ar filesystem
176 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
184 .Op Fl i Ar snapshot | Fl I Ar snapshot
188 .Op Fl i Ar snapshot Ns | Ns bookmark
189 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
191 .Cm receive Ns | Ns Cm recv
193 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
195 .Cm receive Ns | Ns Cm recv
201 .Ar filesystem Ns | Ns Ar volume
205 .Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ...
206 .Ar perm Ns | Ns Ar @setname Ns
207 .Oo Ns , Ns Ar perm Ns | Ns Ar @setname Oc Ns ...
208 .Ar filesystem Ns | Ns Ar volume
212 .Fl e Ns | Ns Cm everyone
213 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
215 .Ar filesystem Ns | Ns Ar volume
219 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
221 .Ar filesystem Ns | Ns Ar volume
226 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
228 .Ar filesystem Ns | Ns Ar volume
232 .Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ...
233 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
235 .Ar filesystem Ns | Ns Ar volume
239 .Fl e Ns | Ns Cm everyone
240 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
242 .Ar filesystem Ns | Ns Ar volume
247 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
249 .Ar filesystem Ns | Ns Ar volume
255 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
257 .Ar filesystem Ns | Ns Ar volume
261 .Ar tag snapshot Ns ...
269 .Ar tag snapshot Ns ...
274 .Op Ar snapshot Ns | Ns Ar filesystem
277 .Ar jailid Ns | Ns Ar jailname filesystem
280 .Ar jailid Ns | Ns Ar jailname filesystem
288 storage pool, as described in
290 A dataset is identified by a unique path within the
292 namespace. For example:
293 .Bd -ragged -offset 4n
294 .No pool/ Ns Brq filesystem,volume,snapshot
297 where the maximum length of a dataset name is
301 A dataset can be one of the following:
308 can be mounted within the standard system namespace and behaves like other file
311 file systems are designed to be
313 compliant, known issues exist that prevent compliance in some cases.
314 Applications that depend on standards conformance might fail due to nonstandard
315 behavior when checking file system free space.
317 A logical volume exported as a raw or block device. This type of dataset should
318 only be used under special circumstances. File systems are typically used in
321 A read-only version of a file system or volume at a given point in time. It is
327 .Ss ZFS File System Hierarchy
330 storage pool is a logical collection of devices that provide space for
331 datasets. A storage pool is also the root of the
333 file system hierarchy.
335 The root of the pool can be accessed as a file system, such as mounting and
336 unmounting, taking snapshots, and setting properties. The physical storage
337 characteristics, however, are managed by the
343 for more information on creating and administering pools.
345 A snapshot is a read-only copy of a file system or volume. Snapshots can be
346 created extremely quickly, and initially consume no additional space within the
347 pool. As data within the active dataset changes, the snapshot consumes more
348 data than would otherwise be shared with the active dataset.
350 Snapshots can have arbitrary names. Snapshots of volumes can be cloned or
351 rolled back, but cannot be accessed independently.
353 File system snapshots can be accessed under the
355 directory in the root of the file system. Snapshots are automatically mounted
356 on demand and may be unmounted at regular intervals. The visibility of the
358 directory can be controlled by the
362 A clone is a writable volume or file system whose initial contents are the same
363 as another dataset. As with snapshots, creating a clone is nearly
364 instantaneous, and initially consumes no additional space.
366 Clones can only be created from a snapshot. When a snapshot is cloned, it
367 creates an implicit dependency between the parent and child. Even though the
368 clone is created somewhere else in the dataset hierarchy, the original snapshot
369 cannot be destroyed as long as a clone exists. The
371 property exposes this dependency, and the
373 command lists any such dependencies, if they exist.
375 The clone parent-child dependency relationship can be reversed by using the
377 subcommand. This causes the "origin" file system to become a clone of the
378 specified file system, which makes it possible to destroy the file system that
379 the clone was created from.
383 file system is a simple operation, so the number of file systems per system is
384 likely to be numerous. To cope with this,
386 automatically manages mounting and unmounting file systems without the need to
389 file. All automatically managed file systems are mounted by
393 By default, file systems are mounted under
397 is the name of the file system in the
399 namespace. Directories are created and destroyed as needed.
401 A file system can also have a mount point set in the
403 property. This directory is created as needed, and
405 automatically mounts the file system when the
407 command is invoked (without editing
411 property can be inherited, so if
417 automatically inherits a mount point of
424 prevents the file system from being mounted.
428 file systems can also be managed with traditional tools
429 .Pq Xr mount 8 , Xr umount 8 , Xr fstab 5 .
430 If a file system's mount point is set to
433 makes no attempt to manage the file system, and the administrator is
434 responsible for mounting and unmounting the file system.
437 dataset can be attached to a jail by using the
439 subcommand. You cannot attach a dataset to one jail and the children of the
440 same dataset to another jails. To allow management of the dataset from within
443 property has to be set. The
445 property cannot be changed from within a jail.
448 dataset can be detached from a jail using the
452 After a dataset is attached to a jail and the jailed property is set, a jailed
453 file system cannot be mounted outside the jail, since the jail administrator
454 might have set the mount point to an unacceptable value.
456 Deduplication is the process for removing redundant data at the block-level,
457 reducing the total amount of data stored. If a file system has the
459 property enabled, duplicate data blocks are removed synchronously. The result
460 is that only unique data is stored and common components are shared among
462 .Ss Native Properties
463 Properties are divided into two types, native properties and user-defined (or
464 "user") properties. Native properties either export internal statistics or
467 behavior. In addition, native properties are either editable or read-only. User
468 properties have no effect on
470 behavior, but you can use them to annotate datasets in a way that is meaningful
471 in your environment. For more information about user properties, see the
472 .Qq Sx User Properties
475 Every dataset has a set of properties that export statistics about the dataset
476 as well as control various behaviors. Properties are inherited from the parent
477 unless overridden by the child. Some properties apply only to certain types of
478 datasets (file systems, volumes, or snapshots).
480 The values of numeric properties can be specified using human-readable suffixes
482 .Sy k , KB , M , Gb ,
485 for zettabyte). The following are all valid (and equal) specifications:
486 .Bd -ragged -offset 4n
490 The values of non-numeric properties are case sensitive and must be lowercase,
492 .Sy mountpoint , sharenfs , No and Sy sharesmb .
494 The following native properties consist of read-only statistics about the
495 dataset. These properties can be neither set, nor inherited. Native properties
496 apply to all dataset types unless otherwise noted.
499 The amount of space available to the dataset and all its children, assuming
500 that there is no other activity in the pool. Because space is shared within a
501 pool, availability can be limited by any number of factors, including physical
502 pool size, quotas, reservations, or other datasets within the pool.
504 This property can also be referred to by its shortened column name,
507 For non-snapshots, the compression ratio achieved for the
509 space of this dataset, expressed as a multiplier. The
511 property includes descendant datasets, and, for clones, does not include
512 the space shared with the origin snapshot. For snapshots, the
516 property. Compression can be turned on by running:
517 .Qq Nm Cm set compression=on Ar dataset
521 The time this dataset was created.
523 For snapshots, this property is a comma-separated list of filesystems or
524 volumes which are clones of this snapshot. The clones'
526 property is this snapshot. If the
528 property is not empty, then this snapshot can not be destroyed (even with the
536 if the snapshot has been marked for deferred destroy by using the
538 command. Otherwise, the property is
540 .It Sy filesystem_count
541 The total number of filesystems and volumes that exist under this location in the
543 This value is only available when a
546 been set somewhere in the tree under which the dataset resides.
547 .It Sy logicalreferenced
548 The amount of space that is
550 accessible by this dataset.
554 The logical space ignores the effect of the
558 properties, giving a quantity closer to the amount of data that applications
560 However, it does include space consumed by metadata.
562 This property can also be referred to by its shortened column name,
565 The amount of space that is
567 consumed by this dataset and all its descendents.
571 The logical space ignores the effect of the
575 properties, giving a quantity closer to the amount of data that applications
578 This property can also be referred to by its shortened column name,
581 For file systems, indicates whether the file system is currently mounted. This
582 property can be either
587 For cloned file systems or volumes, the snapshot from which the clone was
588 created. See also the
592 The amount of data that is accessible by this dataset, which may or may not be
593 shared with other datasets in the pool. When a snapshot or clone is created, it
594 initially references the same amount of space as the file system or snapshot it
595 was created from, since its contents are identical.
597 This property can also be referred to by its shortened column name,
599 .It Sy refcompressratio
600 The compression ratio achieved for the
602 space of this dataset, expressed as a multiplier. See also the
605 .It Sy snapshot_count
606 The total number of snapshots that exist under this location in the dataset tree.
607 This value is only available when a
609 has been set somewhere
610 in the tree under which the dataset resides.
613 .Sy filesystem , volume , No or Sy snapshot .
615 The amount of space consumed by this dataset and all its descendents. This is
616 the value that is checked against this dataset's quota and reservation. The
617 space used does not include this dataset's reservation, but does take into
618 account the reservations of any descendent datasets. The amount of space that a
619 dataset consumes from its parent, as well as the amount of space that are freed
620 if this dataset is recursively destroyed, is the greater of its space used and
623 When snapshots (see the
625 section) are created, their space is
626 initially shared between the snapshot and the file system, and possibly with
627 previous snapshots. As the file system changes, space that was previously
628 shared becomes unique to the snapshot, and counted in the snapshot's space
629 used. Additionally, deleting snapshots can increase the amount of space unique
630 to (and used by) other snapshots.
632 The amount of space used, available, or referenced does not take into account
633 pending changes. Pending changes are generally accounted for within a few
634 seconds. Committing a change to a disk using
638 does not necessarily guarantee that the space usage information is updated
643 properties decompose the
645 properties into the various reasons that space is used. Specifically,
647 .Sy usedbysnapshots + usedbydataset + usedbychildren + usedbyrefreservation .
648 These properties are only available for datasets created
651 pool version 13 pools and higher.
652 .It Sy usedbysnapshots
653 The amount of space consumed by snapshots of this dataset. In particular, it is
654 the amount of space that would be freed if all of this dataset's snapshots were
655 destroyed. Note that this is not simply the sum of the snapshots'
657 properties because space can be shared by multiple snapshots.
659 The amount of space used by this dataset itself, which would be freed if the
660 dataset were destroyed (after first removing any
662 and destroying any necessary snapshots or descendents).
663 .It Sy usedbychildren
664 The amount of space used by children of this dataset, which would be freed if
665 all the dataset's children were destroyed.
666 .It Sy usedbyrefreservation
667 The amount of space used by a
669 set on this dataset, which would be freed if the
672 .It Sy userused@ Ns Ar user
673 The amount of space consumed by the specified user in this dataset. Space is
674 charged to the owner of each file, as displayed by
676 The amount of space charged is displayed by
682 subcommand for more information.
684 Unprivileged users can access only their own space usage. The root user, or a
685 user who has been granted the
689 can access everyone's usage.
693 properties are not displayed by
695 The user's name must be appended after the
697 symbol, using one of the following forms:
698 .Bl -bullet -offset 2n
700 POSIX name (for example,
703 POSIX numeric ID (for example,
707 This property is set to the number of user holds on this snapshot. User holds
711 .It Sy groupused@ Ns Ar group
712 The amount of space consumed by the specified group in this dataset. Space is
713 charged to the group of each file, as displayed by
716 .Sy userused@ Ns Ar user
717 property for more information.
719 Unprivileged users can only access their own groups' space usage. The root
720 user, or a user who has been granted the
724 can access all groups' usage.
725 .It Sy volblocksize Ns = Ns Ar blocksize
726 For volumes, specifies the block size of the volume. The
728 cannot be changed once the volume has been written, so it should be set at
729 volume creation time. The default
731 for volumes is 8 Kbytes. Any
732 power of 2 from 512 bytes to 128 Kbytes is valid.
734 This property can also be referred to by its shortened column name,
739 space written to this dataset since the previous snapshot.
740 .It Sy written@ Ns Ar snapshot
743 space written to this dataset since the specified snapshot. This is the space
744 that is referenced by this dataset but was not referenced by the specified
749 may be specified as a short snapshot name (just the part after the
751 in which case it will be interpreted as a snapshot in the same filesystem as
754 may be a full snapshot name
755 .Pq Em filesystem@snapshot ,
756 which for clones may be a snapshot in the origin's filesystem (or the origin of
757 the origin's filesystem, etc).
760 The following native properties can be used to change the behavior of a
765 .Sy aclinherit Ns = Ns Cm discard |
773 entries are inherited when files and directories are created. A file system
780 entries. A file system with an
784 only inherits inheritable
786 entries that specify "deny" permissions. The property value
788 (the default) removes the
794 entry is inherited. A file system with an
798 inherits all inheritable
800 entries without any modifications made to the
802 entries when they are inherited. A file system with an
806 has the same meaning as
809 .Em owner@ , group@ , No and Em everyone@ Tn ACE Ns s
810 inherit the execute permission only if the file creation mode also requests the
813 When the property value is set to
815 files are created with a mode determined by the inheritable
819 exist that affect the mode, then the mode is set in accordance to the requested
820 mode from the application.
821 .It Sy aclmode Ns = Ns Cm discard | groupmask | passthrough | restricted
826 A file system with an
830 (the default) deletes all
832 entries that do not represent the mode of the file. An
836 reduces permissions granted in all
840 such that they are no greater than the group permissions specified by
842 A file system with an
846 indicates that no changes are made to the
848 other than creating or updating the necessary
850 entries to represent the new mode of the file or directory.
857 operation to return an error when used on any file or directory which has
860 whose entries can not be represented by a mode.
862 is required to change the set user ID, set group ID, or sticky bits on a file
863 or directory, as they do not have equivalent
868 on a file or directory with a non-trivial
874 you must first remove all
876 entries which do not represent the current mode.
877 .It Sy atime Ns = Ns Cm on | off
878 Controls whether the access time for files is updated when they are read.
879 Turning this property off avoids producing write traffic when reading files and
880 can result in significant performance gains, though it might confuse mailers
881 and other similar utilities. The default value is
883 .It Sy canmount Ns = Ns Cm on | off | noauto
884 If this property is set to
886 the file system cannot be mounted, and is ignored by
887 .Qq Nm Cm mount Fl a .
888 Setting this property to
890 is similar to setting the
894 except that the dataset still has a normal
896 property, which can be inherited. Setting this property to
898 allows datasets to be used solely as a mechanism to inherit properties. One
900 .Sy canmount Ns = Ns Cm off
901 is to have two datasets with the same
903 so that the children of both datasets appear in the same directory, but might
904 have different inherited characteristics.
908 value is set, a dataset can only be mounted and unmounted explicitly. The
909 dataset is not mounted automatically when the dataset is created or imported,
910 nor is it mounted by the
912 command or unmounted by the
913 .Qq Nm Cm umount Fl a
916 This property is not inherited.
917 .It Sy checksum Ns = Ns Cm on | off | fletcher2 | fletcher4 | sha256 | noparity
918 Controls the checksum used to verify data integrity. The default value is
920 which automatically selects an appropriate algorithm (currently,
922 but this may change in future releases). The value
924 disables integrity checking on user data.
928 disables integrity but also disables maintaining parity for user data. This
929 setting is used internally by a dump device residing on a RAID-Z pool and should
930 not be used by any other dataset.
931 Disabling checksums is
933 a recommended practice.
934 .It Sy compression Ns = Ns Cm on | off | lzjb | gzip | gzip- Ns Ar N | Cm zle | Cm lz4
935 Controls the compression algorithm used for this dataset. The
937 compression algorithm is optimized for performance while providing decent data
938 compression. Setting compression to
942 compression algorithm. The
944 compression algorithm uses the same compression as the
946 command. You can specify the
948 level by using the value
952 is an integer from 1 (fastest) to 9 (best compression ratio). Currently,
956 (which is also the default for
960 compression algorithm compresses runs of zeros.
964 compression algorithm is a high-performance replacement
967 algorithm. It features significantly faster
968 compression and decompression, as well as a moderately higher
969 compression ratio than
971 but can only be used on pools with
978 for details on ZFS feature flags and the
982 This property can also be referred to by its shortened column name
984 Changing this property affects only newly-written data.
985 .It Sy copies Ns = Ns Cm 1 | 2 | 3
986 Controls the number of copies of data stored for this dataset. These copies are
987 in addition to any redundancy provided by the pool, for example, mirroring or
988 RAID-Z. The copies are stored on different disks, if possible. The space used
989 by multiple copies is charged to the associated file and dataset, changing the
991 property and counting against quotas and reservations.
993 Changing this property only affects newly-written data. Therefore, set this
994 property at file system creation time by using the
995 .Fl o Cm copies= Ns Ar N
997 .It Sy dedup Ns = Ns Cm on | off | verify | sha256 Ns Op Cm ,verify
998 Configures deduplication for a dataset. The default value is
1000 The default deduplication checksum is
1002 (this may change in the future).
1005 is enabled, the checksum defined here overrides the
1007 property. Setting the value to
1009 has the same effect as the setting
1015 will do a byte-to-byte comparsion in case of two blocks having the same
1016 signature to make sure the block contents are identical.
1017 .It Sy devices Ns = Ns Cm on | off
1020 property is currently not supported on
1022 .It Sy exec Ns = Ns Cm on | off
1023 Controls whether processes can be executed from within this file system. The
1026 .It Sy mlslabel Ns = Ns Ar label | Cm none
1029 property is currently not supported on
1031 .It Sy filesystem_limit Ns = Ns Ar count | Cm none
1032 Limits the number of filesystems and volumes that can exist under this point in
1034 The limit is not enforced if the user is allowed to change
1037 .Sy filesystem_limit
1038 on a descendent of a filesystem that
1040 .Sy filesystem_limit
1041 does not override the ancestor's
1042 .Sy filesystem_limit ,
1043 but rather imposes an additional limit.
1044 This feature must be enabled to be used
1046 .Xr zpool-features 7
1048 .It Sy mountpoint Ns = Ns Ar path | Cm none | legacy
1049 Controls the mount point used for this file system. See the
1051 section for more information on how this property is used.
1055 property is changed for a file system, the file system and any children that
1056 inherit the mount point are unmounted. If the new value is
1058 then they remain unmounted. Otherwise, they are automatically remounted in the
1059 new location if the property was previously
1063 or if they were mounted before the property was changed. In addition, any
1064 shared file systems are unshared and shared in the new location.
1065 .It Sy nbmand Ns = Ns Cm on | off
1068 property is currently not supported on
1070 .It Sy primarycache Ns = Ns Cm all | none | metadata
1071 Controls what is cached in the primary cache (ARC). If this property is set to
1073 then both user data and metadata is cached. If this property is set to
1075 then neither user data nor metadata is cached. If this property is set to
1077 then only metadata is cached. The default value is
1079 .It Sy quota Ns = Ns Ar size | Cm none
1080 Limits the amount of space a dataset and its descendents can consume. This
1081 property enforces a hard limit on the amount of space used. This includes all
1082 space consumed by descendents, including file systems and snapshots. Setting a
1083 quota on a descendent of a dataset that already has a quota does not override
1084 the ancestor's quota, but rather imposes an additional limit.
1086 Quotas cannot be set on volumes, as the
1088 property acts as an implicit quota.
1089 .It Sy snapshot_limit Ns = Ns Ar count | Cm none
1090 Limits the number of snapshots that can be created on a dataset and its
1094 on a descendent of a dataset that already
1097 does not override the ancestor's
1098 .Sy snapshot_limit ,
1100 rather imposes an additional limit.
1101 The limit is not enforced if the user is
1102 allowed to change the limit.
1103 For example, this means that recursive snapshots
1104 taken from the global zone are counted against each delegated dataset within
1106 This feature must be enabled to be used
1108 .Xr zpool-features 7
1110 .It Sy userquota@ Ns Ar user Ns = Ns Ar size | Cm none
1111 Limits the amount of space consumed by the specified user.
1116 space calculation does not include space that is used by descendent datasets,
1117 such as snapshots and clones. User space consumption is identified by the
1118 .Sy userspace@ Ns Ar user
1121 Enforcement of user quotas may be delayed by several seconds. This delay means
1122 that a user might exceed their quota before the system notices that they are
1123 over quota and begins to refuse additional writes with the
1125 error message. See the
1127 subcommand for more information.
1129 Unprivileged users can only access their own groups' space usage. The root
1130 user, or a user who has been granted the
1134 can get and set everyone's quota.
1136 This property is not available on volumes, on file systems before version 4, or
1137 on pools before version 15. The
1138 .Sy userquota@ Ns ...
1139 properties are not displayed by
1141 The user's name must be appended after the
1143 symbol, using one of the following forms:
1144 .Bl -bullet -offset 2n
1146 POSIX name (for example,
1149 POSIX numeric ID (for example,
1152 .It Sy groupquota@ Ns Ar group Ns = Ns Ar size | Cm none
1153 Limits the amount of space consumed by the specified group. Group space
1154 consumption is identified by the
1155 .Sy userquota@ Ns Ar user
1158 Unprivileged users can access only their own groups' space usage. The root
1159 user, or a user who has been granted the
1163 can get and set all groups' quotas.
1164 .It Sy readonly Ns = Ns Cm on | off
1165 Controls whether this dataset can be modified. The default value is
1167 .It Sy recordsize Ns = Ns Ar size
1168 Specifies a suggested block size for files in the file system. This property is
1169 designed solely for use with database workloads that access files in fixed-size
1172 automatically tunes block sizes according to internal algorithms optimized for
1173 typical access patterns.
1175 For databases that create very large files but access them in small random
1176 chunks, these algorithms may be suboptimal. Specifying a
1178 greater than or equal to the record size of the database can result in
1179 significant performance gains. Use of this property for general purpose file
1180 systems is strongly discouraged, and may adversely affect performance.
1182 The size specified must be a power of two greater than or equal to 512 and less
1183 than or equal to 128 Kbytes.
1185 Changing the file system's
1187 affects only files created afterward; existing files are unaffected.
1189 This property can also be referred to by its shortened column name,
1191 .It Sy refquota Ns = Ns Ar size | Cm none
1192 Limits the amount of space a dataset can consume. This property enforces a hard
1193 limit on the amount of space used. This hard limit does not include space used
1194 by descendents, including file systems and snapshots.
1195 .It Sy refreservation Ns = Ns Ar size | Cm none
1196 The minimum amount of space guaranteed to a dataset, not including its
1197 descendents. When the amount of space used is below this value, the dataset is
1198 treated as if it were taking up the amount of space specified by
1199 .Sy refreservation .
1202 reservation is accounted for in the parent datasets' space used, and counts
1203 against the parent datasets' quotas and reservations.
1207 is set, a snapshot is only allowed if there is enough free pool space outside
1208 of this reservation to accommodate the current number of "referenced" bytes in
1211 This property can also be referred to by its shortened column name,
1213 .It Sy reservation Ns = Ns Ar size | Cm none
1214 The minimum amount of space guaranteed to a dataset and its descendents. When
1215 the amount of space used is below this value, the dataset is treated as if it
1216 were taking up the amount of space specified by its reservation. Reservations
1217 are accounted for in the parent datasets' space used, and count against the
1218 parent datasets' quotas and reservations.
1220 This property can also be referred to by its shortened column name,
1222 .It Sy secondarycache Ns = Ns Cm all | none | metadata
1223 Controls what is cached in the secondary cache (L2ARC). If this property is set
1226 then both user data and metadata is cached. If this property is set to
1228 then neither user data nor metadata is cached. If this property is set to
1230 then only metadata is cached. The default value is
1232 .It Sy setuid Ns = Ns Cm on | off
1233 Controls whether the
1235 bit is respected for the file system. The default value is
1237 .It Sy sharesmb Ns = Ns Cm on | off | Ar opts
1240 property currently has no effect on
1242 .It Sy sharenfs Ns = Ns Cm on | off | Ar opts
1243 Controls whether the file system is shared via
1245 and what options are used. A file system with a
1249 is managed the traditional way via
1251 Otherwise, the file system is automatically shared and unshared with the
1255 commands. If the property is set to
1259 export options are used. Otherwise,
1261 export options are equivalent to the contents of this property. The export
1262 options may be comma-separated. See
1264 for a list of valid options.
1268 property is changed for a dataset, the
1271 .It Sy logbias Ns = Ns Cm latency | throughput
1274 about handling of synchronous requests in this dataset.
1281 will use pool log devices (if configured) to handle the requests at low
1287 will not use configured pool log devices.
1289 will instead optimize synchronous operations for global pool throughput and
1290 efficient use of resources.
1291 .It Sy snapdir Ns = Ns Cm hidden | visible
1292 Controls whether the
1294 directory is hidden or visible in the root of the file system as discussed in
1297 section. The default value is
1299 .It Sy sync Ns = Ns Cm standard | always | disabled
1300 Controls the behavior of synchronous requests (e.g.
1302 O_DSYNC). This property accepts the following values:
1303 .Bl -tag -offset 4n -width 8n
1305 This is the POSIX specified behavior of ensuring all synchronous requests are
1306 written to stable storage and all devices are flushed to ensure data is not
1307 cached by device controllers (this is the default).
1309 All file system transactions are written and flushed before their system calls
1310 return. This has a large performance penalty.
1312 Disables synchronous requests. File system transactions are only committed to
1313 stable storage periodically. This option will give the highest performance.
1314 However, it is very dangerous as
1316 would be ignoring the synchronous transaction demands of applications such as
1319 Administrators should only use this option when the risks are understood.
1321 .It Sy volsize Ns = Ns Ar size
1322 For volumes, specifies the logical size of the volume. By default, creating a
1323 volume establishes a reservation of equal size. For storage pools with a
1324 version number of 9 or higher, a
1326 is set instead. Any changes to
1328 are reflected in an equivalent change to the reservation (or
1329 .Sy refreservation ) .
1332 can only be set to a multiple of
1336 The reservation is kept equal to the volume's logical size to prevent
1337 unexpected behavior for consumers. Without the reservation, the volume could
1338 run out of space, resulting in undefined behavior or data corruption, depending
1339 on how the volume is used. These effects can also occur when the volume size is
1340 changed while it is in use (particularly when shrinking the size). Extreme care
1341 should be used when adjusting the volume size.
1343 Though not recommended, a "sparse volume" (also known as "thin provisioning")
1344 can be created by specifying the
1347 .Qq Nm Cm create Fl V
1348 command, or by changing the reservation after the volume has been created. A
1349 "sparse volume" is a volume where the reservation is less then the volume size.
1350 Consequently, writes to a sparse volume can fail with
1352 when the pool is low on space. For a sparse volume, changes to
1354 are not reflected in the reservation.
1355 .It Sy vscan Ns = Ns Cm off | on
1358 property is currently not supported on
1360 .It Sy xattr Ns = Ns Cm off | on
1363 property is currently not supported on
1365 .It Sy jailed Ns = Ns Cm off | on
1366 Controls whether the dataset is managed from a jail. See the
1368 section for more information. The default value is
1372 The following three properties cannot be changed after the file system is
1373 created, and therefore, should be set when the file system is created. If the
1374 properties are not set with the
1378 commands, these properties are inherited from the parent dataset. If the parent
1379 dataset lacks these properties due to having been created prior to these
1380 features being supported, the new file system will have the default values for
1383 .It Sy casesensitivity Ns = Ns Cm sensitive | insensitive | mixed
1384 Indicates whether the file name matching algorithm used by the file system
1385 should be case-sensitive, case-insensitive, or allow a combination of both
1386 styles of matching. The default value for the
1390 Traditionally, UNIX and POSIX file systems have case-sensitive file names.
1396 property indicates that the
1397 file system can support requests for both case-sensitive and case-insensitive
1399 .It Sy normalization Ns = Ns Cm none | formC | formD | formKC | formKD
1400 Indicates whether the file system should perform a
1402 normalization of file names whenever two file names are compared, and which
1403 normalization algorithm should be used. File names are always stored
1404 unmodified, names are normalized as part of any comparison process. If this
1405 property is set to a legal value other than
1409 property was left unspecified, the
1411 property is automatically set to
1413 The default value of the
1417 This property cannot be changed after the file system is created.
1418 .It Sy utf8only Ns = Ns Cm on | off
1419 Indicates whether the file system should reject file names that include
1420 characters that are not present in the
1422 character code set. If this property is explicitly set to
1424 the normalization property must either not be explicitly set or be set to
1426 The default value for the
1430 This property cannot be changed after the file system is created.
1434 .Sy casesensitivity , normalization , No and Sy utf8only
1435 properties are also new permissions that can be assigned to non-privileged
1438 delegated administration feature.
1439 .Ss Temporary Mount Point Properties
1440 When a file system is mounted, either through
1442 for legacy mounts or the
1444 command for normal file systems, its mount options are set according to its
1445 properties. The correlation between properties and mount options is as follows:
1446 .Bl -column -offset 4n "PROPERTY" "MOUNT OPTION"
1447 .It PROPERTY MOUNT OPTION
1448 .It atime atime/noatime
1449 .It exec exec/noexec
1451 .It setuid suid/nosuid
1454 In addition, these options can be set on a per-mount basis using the
1456 option, without affecting the property that is stored on disk. The values
1457 specified on the command line override the values stored in the dataset. These
1458 properties are reported as "temporary" by the
1460 command. If the properties are changed while the dataset is mounted, the new
1461 setting overrides any temporary settings.
1463 In addition to the standard native properties,
1465 supports arbitrary user properties. User properties have no effect on
1467 behavior, but applications or administrators can use them to annotate datasets
1468 (file systems, volumes, and snapshots).
1470 User property names must contain a colon
1472 character to distinguish them from native properties. They may contain
1473 lowercase letters, numbers, and the following punctuation characters: colon
1481 The expected convention is that the property name is divided into two portions
1483 .Em module Ns Sy \&: Ns Em property ,
1484 but this namespace is not enforced by
1486 User property names can be at most 256 characters, and cannot begin with a dash
1489 When making programmatic use of user properties, it is strongly suggested to
1494 component of property names to reduce the chance that two
1495 independently-developed packages use the same property name for different
1496 purposes. Property names beginning with
1498 are reserved for use by Sun Microsystems.
1500 The values of user properties are arbitrary strings, are always inherited, and
1501 are never validated. All of the commands that operate on properties
1508 can be used to manipulate both native properties and user properties. Use the
1510 command to clear a user property. If the property is not defined in any parent
1511 dataset, it is removed entirely. Property values are limited to 1024
1514 All subcommands that modify state are logged persistently to the pool in their
1522 Displays a help message.
1527 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1533 file system. The file system is automatically mounted according to the
1535 property inherited from the parent.
1536 .Bl -tag -width indent
1538 Creates all the non-existing parent datasets. Datasets created in this manner
1539 are automatically mounted according to the
1541 property inherited from their parent. Any property specified on the command
1544 option is ignored. If the target filesystem already exists, the operation
1545 completes successfully.
1546 .It Fl o Ar property Ns = Ns Ar value
1547 Sets the specified property as if the command
1548 .Qq Nm Cm set Ar property Ns = Ns Ar value
1549 was invoked at the same time the dataset was created. Any editable
1551 property can also be set at creation time. Multiple
1553 options can be specified. An error results if the same property is specified in
1562 .Op Fl b Ar blocksize
1563 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1568 Creates a volume of the given size. The volume is exported as a block device in
1569 .Pa /dev/zvol/path ,
1572 is the name of the volume in the
1574 namespace. The size represents the logical size as exported by the device. By
1575 default, a reservation of equal size is created.
1578 is automatically rounded up to the nearest 128 Kbytes to ensure that
1579 the volume has an integral number of blocks regardless of
1581 .Bl -tag -width indent
1583 Creates all the non-existing parent datasets. Datasets created in this manner
1584 are automatically mounted according to the
1586 property inherited from their parent. Any property specified on the command
1589 option is ignored. If the target filesystem already exists, the operation
1590 completes successfully.
1592 Creates a sparse volume with no reservation. See
1595 .Qq Sx Native Properties
1596 section for more information about sparse volumes.
1597 .It Fl b Ar blocksize
1599 .Fl o Cm volblocksize Ns = Ns Ar blocksize .
1600 If this option is specified in conjunction with
1601 .Fl o Cm volblocksize ,
1602 the resulting behavior is undefined.
1603 .It Fl o Ar property Ns = Ns Ar value
1604 Sets the specified property as if the
1605 .Qq Nm Cm set Ar property Ns = Ns Ar value
1606 command was invoked at the same time the dataset was created. Any editable
1608 property can also be set at creation time. Multiple
1610 options can be specified. An error results if the same property is specified in
1619 .Ar filesystem Ns | Ns Ar volume
1622 Destroys the given dataset. By default, the command unshares any file systems
1623 that are currently shared, unmounts any file systems that are currently
1624 mounted, and refuses to destroy a dataset that has active dependents (children
1626 .Bl -tag -width indent
1628 Recursively destroy all children.
1630 Recursively destroy all dependents, including cloned file systems outside the
1633 Force an unmount of any file systems using the
1634 .Qq Nm Cm unmount Fl f
1635 command. This option has no effect on non-file systems or unmounted file
1638 Do a dry-run ("No-op") deletion. No data will be deleted. This is useful in
1639 conjunction with the
1643 flags to determine what data would be deleted.
1645 Print machine-parsable verbose information about the deleted data.
1647 Print verbose information about the deleted data.
1650 Extreme care should be taken when applying either the
1654 options, as they can destroy large portions of a pool and cause unexpected
1655 behavior for mounted file systems in use.
1662 .Op % Ns Ar snapname
1667 The given snapshots are destroyed immediately if and only if the
1671 option would have destroyed it. Such immediate destruction would occur, for
1672 example, if the snapshot had no clones and the user-initiated reference count
1675 If a snapshot does not qualify for immediate destruction, it is marked for
1676 deferred deletion. In this state, it exists as a usable, visible snapshot until
1677 both of the preconditions listed above are met, at which point it is destroyed.
1679 An inclusive range of snapshots may be specified by separating the
1680 first and last snapshots with a percent sign
1682 The first and/or last snapshots may be left blank, in which case the
1683 filesystem's oldest or newest snapshot will be implied.
1686 (or ranges of snapshots) of the same filesystem or volume may be specified
1687 in a comma-separated list of snapshots.
1688 Only the snapshot's short name (the
1691 should be specified when using a range or comma-separated list to identify
1693 .Bl -tag -width indent
1695 Destroy (or mark for deferred deletion) all snapshots with this name in
1696 descendent file systems.
1698 Recursively destroy all clones of these snapshots, including the clones,
1699 snapshots, and children.
1700 If this flag is specified, the
1702 flag will have no effect.
1704 Do a dry-run ("No-op") deletion. No data will be deleted. This is useful in
1705 conjunction with the
1709 flags to determine what data would be deleted.
1711 Print machine-parsable verbose information about the deleted data.
1713 Print verbose information about the deleted data.
1715 Defer snapshot deletion.
1718 Extreme care should be taken when applying either the
1722 options, as they can destroy large portions of a pool and cause unexpected
1723 behavior for mounted file systems in use.
1727 .Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
1730 The given bookmark is destroyed.
1733 .Cm snapshot Ns | Ns Cm snap
1735 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1736 .Ar filesystem@snapname Ns | Ns volume@snapname
1737 .Ar filesystem@snapname Ns | Ns volume@snapname Ns ...
1740 Creates snapshots with the given names. All previous modifications by
1741 successful system calls to the file system are part of the snapshots.
1742 Snapshots are taken atomically, so that all snapshots correspond to the same
1743 moment in time. See the
1745 section for details.
1746 .Bl -tag -width indent
1748 Recursively create snapshots of all descendent datasets
1749 .It Fl o Ar property Ns = Ns Ar value
1750 Sets the specified property; see
1761 Roll back the given dataset to a previous snapshot. When a dataset is rolled
1762 back, all data that has changed since the snapshot is discarded, and the
1763 dataset reverts to the state at the time of the snapshot. By default, the
1764 command refuses to roll back to a snapshot other than the most recent one. In
1765 order to do so, all intermediate snapshots and bookmarks must be destroyed
1772 options do not recursively destroy the child snapshots of a
1774 Only direct snapshots of the specified filesystem
1775 are destroyed by either of these options.
1776 To completely roll back a
1777 recursive snapshot, you must rollback the individual child snapshots.
1778 .Bl -tag -width indent
1780 Destroy any snapshots and bookmarks more recent than the one specified.
1782 Destroy any more recent snapshots and bookmarks, as well as any clones of those
1787 option to force an unmount of any clone file systems that are to be destroyed.
1793 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1794 .Ar snapshot filesystem Ns | Ns Ar volume
1797 Creates a clone of the given snapshot. See the
1799 section for details. The target dataset can be located anywhere in the
1801 hierarchy, and is created as the same type as the original.
1802 .Bl -tag -width indent
1804 Creates all the non-existing parent datasets. Datasets created in this manner
1805 are automatically mounted according to the
1807 property inherited from their parent. If the target filesystem or volume
1808 already exists, the operation completes successfully.
1809 .It Fl o Ar property Ns = Ns Ar value
1810 Sets the specified property; see
1817 .Ar clone-filesystem
1820 Promotes a clone file system to no longer be dependent on its "origin"
1821 snapshot. This makes it possible to destroy the file system that the clone was
1822 created from. The clone parent-child dependency relationship is reversed, so
1823 that the origin file system becomes a clone of the specified file system.
1825 The snapshot that was cloned, and any snapshots previous to this snapshot, are
1826 now owned by the promoted clone. The space they use moves from the origin file
1827 system to the promoted clone, so enough space must be available to accommodate
1828 these snapshots. No new space is consumed by this operation, but the space
1829 accounting is adjusted. The promoted clone must not have any conflicting
1830 snapshot names of its own. The
1832 subcommand can be used to rename any conflicting snapshots.
1837 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
1838 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
1845 .Ar filesystem Ns | Ns Ar volume
1846 .Ar filesystem Ns | Ns Ar volume
1853 .Ar filesystem filesystem
1856 Renames the given dataset. The new target can be located anywhere in the
1858 hierarchy, with the exception of snapshots. Snapshots can only be renamed
1859 within the parent file system or volume. When renaming a snapshot, the parent
1860 file system of the snapshot does not need to be specified as part of the second
1861 argument. Renamed file systems can inherit new mount points, in which case they
1862 are unmounted and remounted at the new mount point.
1863 .Bl -tag -width indent
1865 Creates all the nonexistent parent datasets. Datasets created in this manner
1866 are automatically mounted according to the
1868 property inherited from their parent.
1870 Do not remount file systems during rename. If a file system's
1876 file system is not unmounted even if this option is not given.
1878 Force unmount any filesystems that need to be unmounted in the process.
1879 This flag has no effect if used together with the
1887 .Ar snapshot snapshot
1890 Recursively rename the snapshots of all descendent datasets. Snapshots are the
1891 only dataset that can be renamed recursively.
1895 .Op Fl r Ns | Ns Fl d Ar depth
1897 .Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
1898 .Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
1899 .Oo Fl s Ar property Oc Ns ...
1900 .Oo Fl S Ar property Oc Ns ...
1901 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
1904 Lists the property information for the given datasets in tabular form. If
1905 specified, you can list property information by the absolute pathname or the
1906 relative pathname. By default, all file systems and volumes are displayed.
1907 Snapshots are displayed if the
1913 The following fields are displayed,
1914 .Sy name , used , available , referenced , mountpoint .
1915 .Bl -tag -width indent
1917 Recursively display any children of the dataset on the command line.
1919 Recursively display any children of the dataset, limiting the recursion to
1923 will display only the dataset and its direct children.
1925 Used for scripting mode. Do not print headers and separate fields by a single
1926 tab instead of arbitrary white space.
1928 Display numbers in parsable (exact) values.
1929 .It Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
1930 A comma-separated list of properties to display. The property must be:
1931 .Bl -bullet -offset 2n
1933 One of the properties described in the
1934 .Qq Sx Native Properties
1941 to display the dataset name
1945 to display space usage properties on file systems and volumes. This is a
1946 shortcut for specifying
1948 .Sy name,avail,used,usedsnap,usedds,usedrefreserv,usedchild
1950 .Sy filesystem,volume
1953 .It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
1954 A comma-separated list of types to display, where
1957 .Sy filesystem , snapshot , snap , volume , bookmark , No or Sy all .
1958 For example, specifying
1960 displays only snapshots.
1961 .It Fl s Ar property
1962 A property for sorting the output by column in ascending order based on the
1963 value of the property. The property must be one of the properties described in
1966 section, or the special value
1968 to sort by the dataset name. Multiple properties can be specified at one time
1971 property options. Multiple
1973 options are evaluated from left to right in decreasing order of importance.
1975 The following is a list of sorting criteria:
1976 .Bl -bullet -offset 2n
1978 Numeric types sort in numeric order.
1980 String types sort in alphabetical order.
1982 Types inappropriate for a row sort that row to the literal bottom, regardless
1983 of the specified ordering.
1985 If no sorting options are specified the existing behavior of
1989 .It Fl S Ar property
1992 option, but sorts by property in descending order.
1997 .Ar property Ns = Ns Ar value
1998 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2001 Sets the property to the given value for each dataset. Only some properties can
2002 be edited. See the "Properties" section for more information on what properties
2003 can be set and acceptable values. Numeric values can be specified as exact
2004 values, or in a human-readable form with a suffix of
2005 .Sy B , K , M , G , T , P , E , Z
2006 (for bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes, or
2007 zettabytes, respectively). User properties can be set on snapshots. For more
2008 information, see the
2009 .Qq Sx User Properties
2014 .Op Fl r Ns | Ns Fl d Ar depth
2016 .Op Fl o Ar all | field Ns Oo , Ns Ar field Oc Ns ...
2017 .Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2018 .Op Fl s Ar source Ns Oo , Ns Ar source Oc Ns ...
2019 .Ar all | property Ns Oo , Ns Ar property Oc Ns ...
2020 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2023 Displays properties for the given datasets. If no datasets are specified, then
2024 the command displays properties for all datasets on the system. For each
2025 property, the following columns are displayed:
2027 .Bl -hang -width "property" -offset indent -compact
2035 Property source. Can either be local, default, temporary, inherited, or none
2039 All columns except the
2041 column are displayed by default. The columns to display can be specified
2044 option. This command takes a comma-separated list of properties as described in
2046 .Qq Sx Native Properties
2048 .Qq Sx User Properties
2053 can be used to display all properties that apply to the given dataset's type
2054 (filesystem, volume, snapshot, or bookmark).
2055 .Bl -tag -width indent
2057 Recursively display properties for any children.
2059 Recursively display any children of the dataset, limiting the recursion to
2063 will display only the dataset and its direct children.
2065 Display output in a form more easily parsed by scripts. Any headers are
2066 omitted, and fields are explicitly separated by a single tab instead of an
2067 arbitrary amount of space.
2069 Display numbers in parsable (exact) values.
2070 .It Fl o Cm all | Ar field Ns Oo , Ns Ar field Oc Ns ...
2071 A comma-separated list of columns to display. Supported values are
2072 .Sy name,property,value,received,source .
2074 .Sy name,property,value,source .
2077 specifies all columns.
2078 .It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2079 A comma-separated list of types to display, where
2082 .Sy filesystem , snapshot , volume , No or Sy all .
2083 For example, specifying
2085 displays only snapshots.
2086 .It Fl s Ar source Ns Oo , Ns Ar source Oc Ns ...
2087 A comma-separated list of sources to display. Those properties coming from a
2088 source other than those in this list are ignored. Each source must be one of
2090 .Sy local,default,inherited,temporary,received,none .
2091 The default value is all sources.
2098 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2101 Clears the specified property, causing it to be inherited from an ancestor. If
2102 no ancestor has the property set, then the default value is used. See the
2104 section for a listing of default values, and details on which properties can be
2106 .Bl -tag -width indent
2108 Recursively inherit the given property for all children.
2110 For properties with a received value, revert to this value. This flag has no
2111 effect on properties that do not have a received value.
2119 Displays a list of file systems that are not the most recent version.
2120 .Bl -tag -width indent
2124 filesystem versions supported by the current software. The current
2126 filesystem version and all previous supported versions are displayed, along
2127 with an explanation of the features provided with each version.
2134 .Fl a | Ar filesystem
2137 Upgrades file systems to a new on-disk version. Once this is done, the file
2138 systems will no longer be accessible on systems running older versions of the
2141 streams generated from new snapshots of these file systems cannot be accessed
2142 on systems running older versions of the software.
2144 In general, the file system version is independent of the pool version. See
2146 for information on the
2147 .Nm zpool Cm upgrade
2150 In some cases, the file system version and the pool version are interrelated
2151 and the pool version must be upgraded before the file system version can be
2153 .Bl -tag -width indent
2155 Upgrade the specified file system and all descendent file systems.
2157 Upgrade to the specified
2161 flag is not specified, this command upgrades to the most recent version. This
2162 option can only be used to increase the version number, and only up to the most
2163 recent version supported by this software.
2165 Upgrade all file systems on all imported pools.
2167 Upgrade the specified file system.
2173 .Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
2174 .Oo Fl s Ar field Oc Ns ...
2175 .Oo Fl S Ar field Oc Ns ...
2176 .Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2177 .Ar filesystem Ns | Ns Ar snapshot
2180 Displays space consumed by, and quotas on, each user in the specified
2181 filesystem or snapshot. This corresponds to the
2182 .Sy userused@ Ns Ar user
2184 .Sy userquota@ Ns Ar user
2186 .Bl -tag -width indent
2188 Print numeric ID instead of user/group name.
2190 Do not print headers, use tab-delimited output.
2192 Use exact (parsable) numeric output.
2193 .It Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
2194 Display only the specified fields from the following set:
2195 .Sy type,name,used,quota .
2196 The default is to display all fields.
2198 Sort output by this field. The
2202 flags may be specified multiple times to sort first by one field, then by
2203 another. The default is
2204 .Fl s Cm type Fl s Cm name .
2206 Sort by this field in reverse order. See
2208 .It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2209 Print only the specified types from the following set:
2210 .Sy all,posixuser,smbuser,posixgroup,smbgroup .
2213 .Fl t Cm posixuser,smbuser .
2215 The default can be changed to include group types.
2217 Translate SID to POSIX ID. This flag currently has no effect on
2224 .Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
2225 .Oo Fl s Ar field Oc Ns ...
2226 .Oo Fl S Ar field Oc Ns ...
2227 .Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2228 .Ar filesystem Ns | Ns Ar snapshot
2231 Displays space consumed by, and quotas on, each group in the specified
2232 filesystem or snapshot. This subcommand is identical to
2233 .Qq Nm Cm userspace ,
2234 except that the default types to display are
2235 .Fl t Sy posixgroup,smbgroup .
2243 file systems currently mounted.
2244 .Bl -tag -width indent
2251 .Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
2252 .Fl a | Ar filesystem
2258 .Bl -tag -width indent
2260 Report mount progress.
2262 Perform an overlay mount. Overlay mounts are not supported on
2264 .It Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
2265 An optional, comma-separated list of mount options to use temporarily for the
2266 duration of the mount. See the
2267 .Qq Sx Temporary Mount Point Properties
2268 section for details.
2273 This command may be executed on
2277 For more information, see variable
2282 Mount the specified filesystem.
2286 .Cm unmount Ns | Ns Cm umount
2288 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
2291 Unmounts currently mounted
2294 .Bl -tag -width indent
2296 Forcefully unmount the file system, even if it is currently in use.
2298 Unmount all available
2301 .It Ar filesystem | mountpoint
2302 Unmount the specified filesystem. The command can also be given a path to a
2304 file system mount point on the system.
2309 .Fl a | Ar filesystem
2314 file systems that have the
2317 .Bl -tag -width indent
2321 file systems that have the
2324 This command may be executed on
2328 For more information, see variable
2333 Share the specified filesystem according to the
2335 property. File systems are shared when the
2342 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
2347 file systems that have the
2350 .Bl -tag -width indent
2354 file systems that have the
2357 This command may be executed on
2361 For more information, see variable
2365 .It Ar filesystem | mountpoint
2366 Unshare the specified filesystem. The command can also be given a path to a
2368 file system shared on the system.
2377 Creates a bookmark of the given snapshot.
2378 Bookmarks mark the point in time
2379 when the snapshot was created, and can be used as the incremental source for
2384 This feature must be enabled to be used.
2386 .Xr zpool-features 7
2387 for details on ZFS feature flags and the
2394 .Op Fl i Ar snapshot | Fl I Ar snapshot
2398 Creates a stream representation of the last
2400 argument (not part of
2404 which is written to standard output. The output can be redirected to
2405 a file or to a different system (for example, using
2407 By default, a full stream is generated.
2408 .Bl -tag -width indent
2409 .It Fl i Ar snapshot
2410 Generate an incremental stream from the first
2411 .Ar snapshot Pq the incremental source
2413 .Ar snapshot Pq the incremental target .
2414 The incremental source can be specified as the last component of the
2416 .Pq the Em @ No character and following
2418 it is assumed to be from the same file system as the incremental target.
2420 If the destination is a clone, the source may be the origin snapshot, which
2421 must be fully specified (for example,
2422 .Cm pool/fs@origin ,
2425 .It Fl I Ar snapshot
2426 Generate a stream package that sends all intermediary snapshots from the first
2433 .Ic -i @a fs@b; -i @b fs@c; -i @c fs@d .
2435 source may be specified as with the
2439 Generate a replication stream package, which will replicate the specified
2440 filesystem, and all descendent file systems, up to the named snapshot. When
2441 received, all properties, snapshots, descendent file systems, and clones are
2448 flags are used in conjunction with the
2450 flag, an incremental replication stream is generated. The current values of
2451 properties, and current snapshot and file system names are set when the stream
2454 flag is specified when this stream is received, snapshots and file systems that
2455 do not exist on the sending side are destroyed.
2457 Generate a deduplicated stream. Blocks which would have been sent multiple
2458 times in the send stream will only be sent once. The receiving system must
2459 also support this feature to receive a deduplicated stream. This flag can
2460 be used regardless of the dataset's
2462 property, but performance will be much better if the filesystem uses a
2463 dedup-capable checksum (eg.
2466 Include the dataset's properties in the stream. This flag is implicit when
2468 is specified. The receiving system must also support this feature.
2470 Do a dry-run ("No-op") send. Do not generate any actual send data. This is
2471 useful in conjunction with the
2475 flags to determine what data will be sent.
2477 Print machine-parsable verbose information about the stream package generated.
2479 Print verbose information about the stream package generated.
2480 This information includes a per-second report of how much data has been sent.
2483 The format of the stream is committed. You will be able to receive your streams
2484 on future versions of
2489 .Op Fl i Ar snapshot Ns | Ns Ar bookmark
2490 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2493 Generate a send stream, which may be of a filesystem, and may be
2494 incremental from a bookmark.
2495 If the destination is a filesystem or volume,
2496 the pool must be read-only, or the filesystem must not be mounted.
2498 stream generated from a filesystem or volume is received, the default snapshot
2501 .Bl -tag -width indent
2502 .It Fl i Ar snapshot Ns | Ns bookmark
2503 Generate an incremental send stream.
2504 The incremental source must be an earlier
2505 snapshot in the destination's history.
2506 It will commonly be an earlier
2507 snapshot in the destination's filesystem, in which case it can be
2508 specified as the last component of the name
2509 .Pq the Em # No or Em @ No character and following .
2511 If the incremental target is a clone, the incremental source can
2512 be the origin snapshot, or an earlier snapshot in the origin's filesystem,
2513 or the origin's origin, etc.
2517 .Cm receive Ns | Ns Cm recv
2519 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2523 .Cm receive Ns | Ns Cm recv
2529 Creates a snapshot whose contents are as specified in the stream provided on
2530 standard input. If a full stream is received, then a new file system is created
2531 as well. Streams are created using the
2533 subcommand, which by default creates a full stream.
2535 can be used as an alias for
2538 If an incremental stream is received, then the destination file system must
2539 already exist, and its most recent snapshot must match the incremental stream's
2542 the destination device link is destroyed and recreated, which means the
2544 cannot be accessed during the
2548 When a snapshot replication package stream that is generated by using the
2550 command is received, any snapshots that do not exist on the sending location
2551 are destroyed by using the
2552 .Qq Nm Cm destroy Fl d
2555 The name of the snapshot (and file system, if a full stream is received) that
2556 this subcommand creates depends on the argument type and the
2562 If the argument is a snapshot name, the specified
2564 is created. If the argument is a file system or volume name, a snapshot with
2565 the same name as the sent snapshot is created within the specified
2573 option is specified, the snapshot name is determined by appending the sent
2574 snapshot's name to the specified
2578 option is specified, all but the pool name of the sent snapshot path is
2579 appended (for example,
2581 appended from sent snapshot
2585 option is specified, only the tail of the sent snapshot path is appended (for
2588 appended from sent snapshot
2592 any file systems needed to replicate the path of the sent snapshot are created
2593 within the specified file system.
2594 .Bl -tag -width indent
2596 Use the full sent snapshot path without the first element (without pool name)
2597 to determine the name of the new snapshot as described in the paragraph above.
2599 Use only the last element of the sent snapshot path to determine the name of
2600 the new snapshot as described in the paragraph above.
2602 File system that is associated with the received stream is not mounted.
2604 Print verbose information about the stream and the time required to perform the
2607 Do not actually receive the stream. This can be useful in conjunction with the
2609 option to verify the name the receive operation would use.
2611 Force a rollback of the file system to the most recent snapshot before
2612 performing the receive operation. If receiving an incremental replication
2613 stream (for example, one generated by
2614 .Qq Nm Cm send Fl R Bro Fl i | Fl I Brc ) ,
2615 destroy snapshots and file systems that do not exist on the sending side.
2620 .Ar filesystem Ns | Ns Ar volume
2623 Displays permissions that have been delegated on the specified filesystem or
2624 volume. See the other forms of
2626 for more information.
2631 .Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ...
2632 .Ar perm Ns | Ns Ar @setname Ns
2633 .Oo Ns , Ns Ar perm Ns | Ns Ar @setname Oc Ns ...
2634 .Ar filesystem Ns | Ns Ar volume
2640 .Fl e Ns | Ns Cm everyone
2641 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
2643 .Ar filesystem Ns | Ns Ar volume
2648 administration permission for the file systems to non-privileged users.
2649 .Bl -tag -width indent
2652 .Ar user Ns | Ns Ar group Ns Oo , Ar user Ns | Ns Ar group Oc Ns ...
2654 Specifies to whom the permissions are delegated. Multiple entities can be
2655 specified as a comma-separated list. If neither of the
2657 options are specified, then the argument is interpreted preferentially as the
2660 then as a user name, and lastly as a group name. To specify
2661 a user or group named
2667 options. To specify a group with the same name as a user, use the
2670 .It Op Fl e Ns | Ns Cm everyone
2671 Specifies that the permissions be delegated to
2674 .Ar perm Ns | Ns Ar @setname Ns Oo , Ns Ar perm Ns | Ns Ar @setname Oc Ns ...
2676 The permissions to delegate. Multiple permissions
2677 may be specified as a comma-separated list. Permission names are the same as
2679 subcommand and property names. See the property list below. Property set names,
2680 which begin with an at sign
2682 may be specified. See the
2684 form below for details.
2687 .Ar filesystem Ns | Ns Ar volume
2689 Specifies where the permissions are delegated. If neither of the
2691 options are specified, or both are, then the permissions are allowed for the
2692 file system or volume, and all of its descendents. If only the
2694 option is used, then is allowed "locally" only for the specified file system.
2697 option is used, then is allowed only for the descendent file systems.
2700 Permissions are generally the ability to use a
2702 subcommand or change a
2704 property. The following permissions are available:
2705 .Bl -column -offset 4n "secondarycache" "subcommand"
2706 .It NAME Ta TYPE Ta NOTES
2707 .It allow Ta subcommand Ta Must Xo
2708 also have the permission that is being allowed
2710 .It clone Ta subcommand Ta Must Xo
2711 also have the 'create' ability and 'mount' ability in the origin file system
2713 .It create Ta subcommand Ta Must also have the 'mount' ability
2714 .It destroy Ta subcommand Ta Must also have the 'mount' ability
2715 .It diff Ta subcommand Ta Allows lookup of paths within a dataset given an
2716 object number, and the ability to create snapshots necessary to 'zfs diff'
2717 .It hold Ta subcommand Ta Allows adding a user hold to a snapshot
2718 .It mount Ta subcommand Ta Allows mount/umount of Tn ZFS No datasets
2719 .It promote Ta subcommand Ta Must Xo
2720 also have the 'mount' and 'promote' ability in the origin file system
2722 .It receive Ta subcommand Ta Must also have the 'mount' and 'create' ability
2723 .It release Ta subcommand Ta Allows Xo
2724 releasing a user hold which might destroy the snapshot
2726 .It rename Ta subcommand Ta Must Xo
2727 also have the 'mount' and 'create' ability in the new parent
2729 .It rollback Ta subcommand Ta Must also have the 'mount' ability
2730 .It send Ta subcommand
2731 .It share Ta subcommand Ta Allows Xo
2732 sharing file systems over the
2736 .It snapshot Ta subcommand Ta Must also have the 'mount' ability
2737 .It groupquota Ta other Ta Allows accessing any groupquota@... property
2738 .It groupused Ta other Ta Allows reading any groupused@... property
2739 .It userprop Ta other Ta Allows changing any user property
2740 .It userquota Ta other Ta Allows accessing any userquota@... property
2741 .It userused Ta other Ta Allows reading any userused@... property
2742 .It aclinherit Ta property
2743 .It aclmode Ta property
2744 .It atime Ta property
2745 .It canmount Ta property
2746 .It casesensitivity Ta property
2747 .It checksum Ta property
2748 .It compression Ta property
2749 .It copies Ta property
2750 .It dedup Ta property
2751 .It devices Ta property
2752 .It exec Ta property
2753 .It filesystem_limit Ta property
2754 .It logbias Ta property
2755 .It jailed Ta property
2756 .It mlslabel Ta property
2757 .It mountpoint Ta property
2758 .It nbmand Ta property
2759 .It normalization Ta property
2760 .It primarycache Ta property
2761 .It quota Ta property
2762 .It readonly Ta property
2763 .It recordsize Ta property
2764 .It refquota Ta property
2765 .It refreservation Ta property
2766 .It reservation Ta property
2767 .It secondarycache Ta property
2768 .It setuid Ta property
2769 .It sharenfs Ta property
2770 .It sharesmb Ta property
2771 .It snapdir Ta property
2772 .It snapshot_limit Ta property
2773 .It sync Ta property
2774 .It utf8only Ta property
2775 .It version Ta property
2776 .It volblocksize Ta property
2777 .It volsize Ta property
2778 .It vscan Ta property
2779 .It xattr Ta property
2785 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
2787 .Ar filesystem Ns | Ns Ar volume
2790 Sets "create time" permissions. These permissions are granted (locally) to the
2791 creator of any newly-created descendent file system.
2797 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
2799 .Ar filesystem Ns | Ns Ar volume
2802 Defines or adds permissions to a permission set. The set can be used by other
2804 commands for the specified file system and its descendents. Sets are evaluated
2805 dynamically, so changes to a set are immediately reflected. Permission sets
2806 follow the same naming restrictions as ZFS file systems, but the name must
2807 begin with an "at sign"
2809 and can be no more than 64 characters long.
2814 .Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ...
2815 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
2817 .Ar filesystem Ns | Ns Ar volume
2823 .Fl e Ns | Ns Cm everyone
2824 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
2826 .Ar filesystem Ns | Ns Ar volume
2833 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
2835 .Ar filesystem Ns | Ns Ar volume
2838 Removes permissions that were granted with the
2840 command. No permissions are explicitly denied, so other permissions granted are
2841 still in effect. For example, if the permission is granted by an ancestor. If
2842 no permissions are specified, then all permissions for the specified
2843 .Ar user , group , No or everyone
2844 are removed. Specifying
2846 .Po or using the Fl e
2848 .Pc only removes the permissions that were granted to everyone ,
2849 not all permissions for every user and group. See the
2851 command for a description of the
2854 .Bl -tag -width indent
2856 Recursively remove the permissions from this file system and all descendents.
2864 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
2866 .Ar filesystem Ns | Ns Ar volume
2869 Removes permissions from a permission set. If no permissions are specified,
2870 then all permissions are removed, thus removing the set entirely.
2875 .Ar tag snapshot Ns ...
2878 Adds a single reference, named with the
2880 argument, to the specified snapshot or snapshots. Each snapshot has its own tag
2881 namespace, and tags must be unique within that space.
2883 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
2887 .Bl -tag -width indent
2889 Specifies that a hold with the given tag is applied recursively to the
2890 snapshots of all descendent file systems.
2899 Lists all existing user references for the given snapshot or snapshots.
2900 .Bl -tag -width indent
2902 Lists the holds that are set on the named descendent snapshots, in addition to
2903 listing the holds on the named snapshot.
2909 .Ar tag snapshot Ns ...
2912 Removes a single reference, named with the
2914 argument, from the specified snapshot or snapshots. The tag must already exist
2916 .Bl -tag -width indent
2918 Recursively releases a hold with the given tag on the snapshots of all
2919 descendent file systems.
2926 .Op Ar snapshot Ns | Ns Ar filesystem
2929 Display the difference between a snapshot of a given filesystem and another
2930 snapshot of that filesystem from a later time or the current contents of the
2931 filesystem. The first column is a character indicating the type of change,
2932 the other columns indicate pathname, new pathname
2933 .Pq in case of rename ,
2934 change in link count, and optionally file type and/or change time.
2936 The types of change are:
2937 .Bl -column -offset 2n indent
2938 .It \&- Ta path was removed
2939 .It \&+ Ta path was added
2940 .It \&M Ta path was modified
2941 .It \&R Ta path was renamed
2943 .Bl -tag -width indent
2945 Display an indication of the type of file, in a manner similar to the
2949 .Bl -column -offset 2n indent
2950 .It \&B Ta block device
2951 .It \&C Ta character device
2952 .It \&F Ta regular file
2953 .It \&/ Ta directory
2954 .It \&@ Ta symbolic link
2956 .It \&> Ta door (not supported on Fx )
2957 .It \&| Ta named pipe (not supported on Fx )
2958 .It \&P Ta event port (not supported on Fx )
2961 Give more parsable tab-separated output, without header lines and without
2964 Display the path's inode change time as the first column of output.
2969 .Ar jailid filesystem
2972 Attaches the specified
2974 to the jail identified by JID
2976 From now on this file system tree can be managed from within a jail if the
2978 property has been set. To use this functionality, the jail needs the
2989 for more information on managing jails and configuring the parameters above.
2993 .Ar jailid filesystem
2996 Detaches the specified
2998 from the jail identified by JID
3002 The following exit values are returned:
3003 .Bl -tag -offset 2n -width 2n
3005 Successful completion.
3009 Invalid command line options were specified.
3013 .It Sy Example 1 No Creating a Tn ZFS No File System Hierarchy
3015 The following commands create a file system named
3017 and a file system named
3021 is set for the parent file system, and is automatically inherited by the child
3023 .Bd -literal -offset 2n
3024 .Li # Ic zfs create pool/home
3025 .Li # Ic zfs set mountpoint=/home pool/home
3026 .Li # Ic zfs create pool/home/bob
3028 .It Sy Example 2 No Creating a Tn ZFS No Snapshot
3030 The following command creates a snapshot named
3032 This snapshot is mounted on demand in the
3034 directory at the root of the
3037 .Bd -literal -offset 2n
3038 .Li # Ic zfs snapshot pool/home/bob@yesterday
3040 .It Sy Example 3 No Creating and Destroying Multiple Snapshots
3042 The following command creates snapshots named
3046 and all of its descendent file systems. Each snapshot is mounted on demand in
3049 directory at the root of its file system. The second command destroys the newly
3051 .Bd -literal -offset 2n
3052 .Li # Ic zfs snapshot -r pool/home@yesterday
3053 .Li # Ic zfs destroy -r pool/home@yesterday
3055 .It Sy Example 4 No Disabling and Enabling File System Compression
3057 The following command disables the
3059 property for all file systems under
3061 The next command explicitly enables
3064 .Em pool/home/anne .
3065 .Bd -literal -offset 2n
3066 .Li # Ic zfs set compression=off pool/home
3067 .Li # Ic zfs set compression=on pool/home/anne
3069 .It Sy Example 5 No Listing Tn ZFS No Datasets
3071 The following command lists all active file systems and volumes in the system.
3072 Snapshots are displayed if the
3080 for more information on pool properties.
3081 .Bd -literal -offset 2n
3083 NAME USED AVAIL REFER MOUNTPOINT
3084 pool 450K 457G 18K /pool
3085 pool/home 315K 457G 21K /home
3086 pool/home/anne 18K 457G 18K /home/anne
3087 pool/home/bob 276K 457G 276K /home/bob
3089 .It Sy Example 6 No Setting a Quota on a Tn ZFS No File System
3091 The following command sets a quota of 50 Gbytes for
3093 .Bd -literal -offset 2n
3094 .Li # Ic zfs set quota=50G pool/home/bob
3096 .It Sy Example 7 No Listing Tn ZFS No Properties
3098 The following command lists all properties for
3100 .Bd -literal -offset 2n
3101 .Li # Ic zfs get all pool/home/bob
3102 NAME PROPERTY VALUE SOURCE
3103 pool/home/bob type filesystem -
3104 pool/home/bob creation Tue Jul 21 15:53 2009 -
3105 pool/home/bob used 21K -
3106 pool/home/bob available 20.0G -
3107 pool/home/bob referenced 21K -
3108 pool/home/bob compressratio 1.00x -
3109 pool/home/bob mounted yes -
3110 pool/home/bob quota 20G local
3111 pool/home/bob reservation none default
3112 pool/home/bob recordsize 128K default
3113 pool/home/bob mountpoint /home/bob default
3114 pool/home/bob sharenfs off default
3115 pool/home/bob checksum on default
3116 pool/home/bob compression on local
3117 pool/home/bob atime on default
3118 pool/home/bob devices on default
3119 pool/home/bob exec on default
3120 pool/home/bob filesystem_limit none default
3121 pool/home/bob setuid on default
3122 pool/home/bob readonly off default
3123 pool/home/bob jailed off default
3124 pool/home/bob snapdir hidden default
3125 pool/home/bob snapshot_limit none default
3126 pool/home/bob aclmode discard default
3127 pool/home/bob aclinherit restricted default
3128 pool/home/bob canmount on default
3129 pool/home/bob xattr on default
3130 pool/home/bob copies 1 default
3131 pool/home/bob version 5 -
3132 pool/home/bob utf8only off -
3133 pool/home/bob normalization none -
3134 pool/home/bob casesensitivity sensitive -
3135 pool/home/bob vscan off default
3136 pool/home/bob nbmand off default
3137 pool/home/bob sharesmb off default
3138 pool/home/bob refquota none default
3139 pool/home/bob refreservation none default
3140 pool/home/bob primarycache all default
3141 pool/home/bob secondarycache all default
3142 pool/home/bob usedbysnapshots 0 -
3143 pool/home/bob usedbydataset 21K -
3144 pool/home/bob usedbychildren 0 -
3145 pool/home/bob usedbyrefreservation 0 -
3146 pool/home/bob logbias latency default
3147 pool/home/bob dedup off default
3148 pool/home/bob mlslabel -
3149 pool/home/bob sync standard default
3150 pool/home/bob refcompressratio 1.00x -
3153 The following command gets a single property value.
3154 .Bd -literal -offset 2n
3155 .Li # Ic zfs get -H -o value compression pool/home/bob
3159 The following command lists all properties with local settings for
3161 .Bd -literal -offset 2n
3162 .Li # Ic zfs get -s local -o name,property,value all pool/home/bob
3164 pool/home/bob quota 20G
3165 pool/home/bob compression on
3167 .It Sy Example 8 No Rolling Back a Tn ZFS No File System
3169 The following command reverts the contents of
3171 to the snapshot named
3173 deleting all intermediate snapshots.
3174 .Bd -literal -offset 2n
3175 .Li # Ic zfs rollback -r pool/home/anne@yesterday
3177 .It Sy Example 9 No Creating a Tn ZFS No Clone
3179 The following command creates a writable file system whose initial contents are
3181 .Em pool/home/bob@yesterday .
3182 .Bd -literal -offset 2n
3183 .Li # Ic zfs clone pool/home/bob@yesterday pool/clone
3185 .It Sy Example 10 No Promoting a Tn ZFS No Clone
3187 The following commands illustrate how to test out changes to a file system, and
3188 then replace the original file system with the changed one, using clones, clone
3189 promotion, and renaming:
3190 .Bd -literal -offset 2n
3191 .Li # Ic zfs create pool/project/production
3195 .Pa /pool/project/production
3196 with data and continue with the following commands:
3197 .Bd -literal -offset 2n
3198 .Li # Ic zfs snapshot pool/project/production@today
3199 .Li # Ic zfs clone pool/project/production@today pool/project/beta
3203 .Pa /pool/project/beta
3204 and continue with the following commands:
3205 .Bd -literal -offset 2n
3206 .Li # Ic zfs promote pool/project/beta
3207 .Li # Ic zfs rename pool/project/production pool/project/legacy
3208 .Li # Ic zfs rename pool/project/beta pool/project/production
3211 Once the legacy version is no longer needed, it can be destroyed.
3212 .Bd -literal -offset 2n
3213 .Li # Ic zfs destroy pool/project/legacy
3215 .It Sy Example 11 No Inheriting Tn ZFS No Properties
3217 The following command causes
3223 property from their parent.
3224 .Bd -literal -offset 2n
3225 .Li # Ic zfs inherit checksum pool/home/bob pool/home/anne
3227 .It Sy Example 12 No Remotely Replicating Tn ZFS No Data
3229 The following commands send a full stream and then an incremental stream to a
3230 remote machine, restoring them into
3231 .Sy poolB/received/fs@a
3233 .Sy poolB/received/fs@b ,
3236 must contain the file system
3237 .Sy poolB/received ,
3238 and must not initially contain
3239 .Sy poolB/received/fs .
3240 .Bd -literal -offset 2n
3241 .Li # Ic zfs send pool/fs@a | ssh host zfs receive poolB/received/fs@a
3242 .Li # Ic zfs send -i a pool/fs@b | ssh host zfs receive poolB/received/fs
3251 The following command sends a full stream of
3252 .Sy poolA/fsA/fsB@snap
3253 to a remote machine, receiving it into
3254 .Sy poolB/received/fsA/fsB@snap .
3257 portion of the received snapshot's name is determined from the name of the sent
3260 must contain the file system
3261 .Sy poolB/received .
3263 .Sy poolB/received/fsA
3264 does not exist, it is created as an empty file system.
3265 .Bd -literal -offset 2n
3266 .Li # Ic zfs send poolA/fsA/fsB@snap | ssh host zfs receive -d poolB/received
3268 .It Sy Example 14 No Setting User Properties
3270 The following example sets the user-defined
3271 .Sy com.example:department
3272 property for a dataset.
3273 .Bd -literal -offset 2n
3274 .Li # Ic zfs set com.example:department=12345 tank/accounting
3276 .It Sy Example 15 No Performing a Rolling Snapshot
3278 The following example shows how to maintain a history of snapshots with a
3279 consistent naming scheme. To keep a week's worth of snapshots, the user
3280 destroys the oldest snapshot, renames the remaining snapshots, and then creates
3281 a new snapshot, as follows:
3282 .Bd -literal -offset 2n
3283 .Li # Ic zfs destroy -r pool/users@7daysago
3284 .Li # Ic zfs rename -r pool/users@6daysago @7daysago
3285 .Li # Ic zfs rename -r pool/users@5daysago @6daysago
3286 .Li # Ic zfs rename -r pool/users@4daysago @5daysago
3287 .Li # Ic zfs rename -r pool/users@3daysago @4daysago
3288 .Li # Ic zfs rename -r pool/users@2daysago @3daysago
3289 .Li # Ic zfs rename -r pool/users@yesterday @2daysago
3290 .Li # Ic zfs rename -r pool/users@today @yesterday
3291 .Li # Ic zfs snapshot -r pool/users@today
3297 Property Options on a ZFS File System
3300 The following command shows how to set
3302 property options to enable root access for a specific network on the
3304 file system. The contents of the
3309 .Bd -literal -offset 2n
3310 .Li # Ic zfs set sharenfs="maproot=root,network 192.168.0.0/24" tank/home
3313 Another way to write this command with the same result is:
3314 .Bd -literal -offset 2n
3315 .Li # Ic set zfs sharenfs="-maproot=root -network 192.168.0.0/24" tank/home
3321 Administration Permissions on a
3326 The following example shows how to set permissions so that user
3328 can create, destroy, mount, and take snapshots on
3333 .Bd -literal -offset 2n
3334 .Li # Ic zfs allow cindys create,destroy,mount,snapshot tank/cindys
3335 .Li # Ic zfs allow tank/cindys
3336 -------------------------------------------------------------
3337 Local+Descendent permissions on (tank/cindys)
3338 user cindys create,destroy,mount,snapshot
3339 -------------------------------------------------------------
3341 .It Sy Example 18 No Delegating Create Time Permissions on a Tn ZFS No Dataset
3343 The following example shows how to grant anyone in the group
3345 to create file systems in
3347 This syntax also allows staff members to destroy their own file systems, but
3348 not destroy anyone else's file system. The permissions on
3351 .Bd -literal -offset 2n
3352 .Li # Ic zfs allow staff create,mount tank/users
3353 .Li # Ic zfs allow -c destroy tank/users
3354 .Li # Ic zfs allow tank/users
3355 -------------------------------------------------------------
3356 Create time permissions on (tank/users)
3358 Local+Descendent permissions on (tank/users)
3359 group staff create,mount
3360 -------------------------------------------------------------
3364 Defining and Granting a Permission Set on a
3369 The following example shows how to define and grant a permission set on the
3371 file system. The permissions on
3374 .Bd -literal -offset 2n
3375 .Li # Ic zfs allow -s @pset create,destroy,snapshot,mount tank/users
3376 .Li # Ic zfs allow staff @pset tank/users
3377 .Li # Ic zfs allow tank/users
3378 -------------------------------------------------------------
3379 Permission sets on (tank/users)
3380 @pset create,destroy,mount,snapshot
3381 Create time permissions on (tank/users)
3383 Local+Descendent permissions on (tank/users)
3384 group staff @pset,create,mount
3385 -------------------------------------------------------------
3387 .It Sy Example 20 No Delegating Property Permissions on a Tn ZFS No Dataset
3389 The following example shows to grant the ability to set quotas and reservations
3392 file system. The permissions on
3395 .Bd -literal -offset 2n
3396 .Li # Ic zfs allow cindys quota,reservation users/home
3397 .Li # Ic zfs allow cindys
3398 -------------------------------------------------------------
3399 Local+Descendent permissions on (users/home)
3400 user cindys quota,reservation
3401 -------------------------------------------------------------
3402 .Li # Ic su - cindys
3403 .Li cindys% Ic zfs set quota=10G users/home/marks
3404 .Li cindys% Ic zfs get quota users/home/marks
3405 NAME PROPERTY VALUE SOURCE
3406 users/home/marks quota 10G local
3408 .It Sy Example 21 No Removing ZFS Delegated Permissions on a Tn ZFS No Dataset
3410 The following example shows how to remove the snapshot permission from the
3414 file system. The permissions on
3417 .Bd -literal -offset 2n
3418 .Li # Ic zfs unallow staff snapshot tank/users
3419 .Li # Ic zfs allow tank/users
3420 -------------------------------------------------------------
3421 Permission sets on (tank/users)
3422 @pset create,destroy,mount,snapshot
3423 Create time permissions on (tank/users)
3425 Local+Descendent permissions on (tank/users)
3426 group staff @pset,create,mount
3427 -------------------------------------------------------------
3429 .It Sy Example 22 Showing the differences between a snapshot and a ZFS Dataset
3431 The following example shows how to see what has changed between a prior
3432 snapshot of a ZFS Dataset and its current state. The
3434 option is used to indicate type information for the files affected.
3435 .Bd -literal -offset 2n
3436 .Li # Ic zfs diff tank/test@before tank/test
3438 M F /tank/test/linked (+1)
3439 R F /tank/test/oldname -> /tank/test/newname
3440 - F /tank/test/deleted
3441 + F /tank/test/created
3442 M F /tank/test/modified
3456 This manual page is a
3458 reimplementation of the
3462 modified and customized for
3464 and licensed under the
3465 Common Development and Distribution License
3470 implementation of this manual page was initially written by
3471 .An Martin Matuska Aq mm@FreeBSD.org .