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) 2012 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) 2013, Joyent, Inc. All rights reserved.
28 .\" Copyright (c) 2013, Steven Hartland <smh@FreeBSD.org>
37 .Nd configures ZFS file systems
44 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... Ar filesystem
49 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
55 .Ar filesystem Ns | Ns Ar volume
65 .Cm snapshot Ns | Ns Cm snap
67 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
68 .Ar filesystem@snapname Ns | Ns Ar volume@snapname
69 .Ar filesystem@snapname Ns | Ns Ar volume@snapname Ns ...
77 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
78 .Ar snapshot filesystem Ns | Ns Ar volume
85 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
86 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
91 .Ar filesystem Ns | Ns Ar volume
92 .Ar filesystem Ns | Ns Ar volume
101 .Ar filesystem filesystem
104 .Op Fl r Ns | Ns Fl d Ar depth
106 .Op Fl o Ar property Ns Oo , Ns property Ns Oc Ns ...
107 .Op Fl t Ar type Ns Oo , Ns type Ns Oc Ns ...
108 .Oo Fl s Ar property Oc Ns ...
109 .Oo Fl S Ar property Oc Ns ...
110 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
113 .Ar property Ns = Ns Ar value
114 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
117 .Op Fl r Ns | Ns Fl d Ar depth
119 .Op Fl o Ar all | field Ns Oo , Ns Ar field Oc Ns ...
120 .Op Fl t Ar type Ns Oo Ns , Ar type Oc Ns ...
121 .Op Fl s Ar source Ns Oo Ns , Ns Ar source Oc Ns ...
122 .Ar all | property Ns Oo Ns , Ns Ar property Oc Ns ...
123 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
128 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
136 .Fl a | Ar filesystem
140 .Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
141 .Oo Fl s Ar field Oc Ns ...
142 .Oo Fl S Ar field Oc Ns ...
143 .Op Fl t Ar type Ns Oo Ns , Ns Ar type Oc Ns ...
144 .Ar filesystem Ns | Ns Ar snapshot
148 .Op Fl o Ar field Ns Oo , Ns field Oc Ns ...
149 .Oo Fl s Ar field Oc Ns ...
150 .Oo Fl S Ar field Oc Ns ...
151 .Op Fl t Ar type Ns Oo Ns , Ns Ar type Oc Ns ...
152 .Ar filesystem Ns | Ns Ar snapshot
158 .Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
159 .Fl a | Ar filesystem
161 .Cm unmount Ns | Ns Cm umount
163 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
166 .Fl a | Ar filesystem
169 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
173 .Op Fl i Ar snapshot | Fl I Ar snapshot
176 .Cm receive Ns | Ns Cm recv
178 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
180 .Cm receive Ns | Ns Cm recv
186 .Ar filesystem Ns | Ns Ar volume
190 .Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ...
191 .Ar perm Ns | Ns Ar @setname Ns
192 .Oo Ns , Ns Ar perm Ns | Ns Ar @setname Oc Ns ...
193 .Ar filesystem Ns | Ns Ar volume
197 .Fl e Ns | Ns Cm everyone
198 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
200 .Ar filesystem Ns | Ns Ar volume
204 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
206 .Ar filesystem Ns | Ns Ar volume
211 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
213 .Ar filesystem Ns | Ns Ar volume
217 .Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ...
218 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
220 .Ar filesystem Ns | Ns Ar volume
224 .Fl e Ns | Ns Cm everyone
225 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
227 .Ar filesystem Ns | Ns Ar volume
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
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
246 .Ar tag snapshot Ns ...
254 .Ar tag snapshot Ns ...
259 .Op Ar snapshot Ns | Ns Ar filesystem
262 .Ar jailid Ns | Ns Ar jailname filesystem
265 .Ar jailid Ns | Ns Ar jailname filesystem
273 storage pool, as described in
275 A dataset is identified by a unique path within the
277 namespace. For example:
278 .Bd -ragged -offset 4n
279 .No pool/ Ns Brq filesystem,volume,snapshot
282 where the maximum length of a dataset name is
286 A dataset can be one of the following:
293 can be mounted within the standard system namespace and behaves like other file
296 file systems are designed to be
298 compliant, known issues exist that prevent compliance in some cases.
299 Applications that depend on standards conformance might fail due to nonstandard
300 behavior when checking file system free space.
302 A logical volume exported as a raw or block device. This type of dataset should
303 only be used under special circumstances. File systems are typically used in
306 A read-only version of a file system or volume at a given point in time. It is
312 .Ss ZFS File System Hierarchy
315 storage pool is a logical collection of devices that provide space for
316 datasets. A storage pool is also the root of the
318 file system hierarchy.
320 The root of the pool can be accessed as a file system, such as mounting and
321 unmounting, taking snapshots, and setting properties. The physical storage
322 characteristics, however, are managed by the
328 for more information on creating and administering pools.
330 A snapshot is a read-only copy of a file system or volume. Snapshots can be
331 created extremely quickly, and initially consume no additional space within the
332 pool. As data within the active dataset changes, the snapshot consumes more
333 data than would otherwise be shared with the active dataset.
335 Snapshots can have arbitrary names. Snapshots of volumes can be cloned or
336 rolled back, but cannot be accessed independently.
338 File system snapshots can be accessed under the
340 directory in the root of the file system. Snapshots are automatically mounted
341 on demand and may be unmounted at regular intervals. The visibility of the
343 directory can be controlled by the
347 A clone is a writable volume or file system whose initial contents are the same
348 as another dataset. As with snapshots, creating a clone is nearly
349 instantaneous, and initially consumes no additional space.
351 Clones can only be created from a snapshot. When a snapshot is cloned, it
352 creates an implicit dependency between the parent and child. Even though the
353 clone is created somewhere else in the dataset hierarchy, the original snapshot
354 cannot be destroyed as long as a clone exists. The
356 property exposes this dependency, and the
358 command lists any such dependencies, if they exist.
360 The clone parent-child dependency relationship can be reversed by using the
362 subcommand. This causes the "origin" file system to become a clone of the
363 specified file system, which makes it possible to destroy the file system that
364 the clone was created from.
368 file system is a simple operation, so the number of file systems per system is
369 likely to be numerous. To cope with this,
371 automatically manages mounting and unmounting file systems without the need to
374 file. All automatically managed file systems are mounted by
378 By default, file systems are mounted under
382 is the name of the file system in the
384 namespace. Directories are created and destroyed as needed.
386 A file system can also have a mount point set in the
388 property. This directory is created as needed, and
390 automatically mounts the file system when the
392 command is invoked (without editing
396 property can be inherited, so if
402 automatically inherits a mount point of
409 prevents the file system from being mounted.
413 file systems can also be managed with traditional tools
414 .Pq Xr mount 8 , Xr umount 8 , Xr fstab 5 .
415 If a file system's mount point is set to
418 makes no attempt to manage the file system, and the administrator is
419 responsible for mounting and unmounting the file system.
422 dataset can be attached to a jail by using the
424 subcommand. You cannot attach a dataset to one jail and the children of the
425 same dataset to another jails. To allow management of the dataset from within
428 property has to be set and the jail needs access to the
432 property cannot be changed from within a jail. See
434 for information on how to allow mounting
436 datasets from within a jail.
439 dataset can be detached from a jail using the
443 After a dataset is attached to a jail and the jailed property is set, a jailed
444 file system cannot be mounted outside the jail, since the jail administrator
445 might have set the mount point to an unacceptable value.
447 Deduplication is the process for removing redundant data at the block-level,
448 reducing the total amount of data stored. If a file system has the
450 property enabled, duplicate data blocks are removed synchronously. The result
451 is that only unique data is stored and common components are shared among
453 .Ss Native Properties
454 Properties are divided into two types, native properties and user-defined (or
455 "user") properties. Native properties either export internal statistics or
458 behavior. In addition, native properties are either editable or read-only. User
459 properties have no effect on
461 behavior, but you can use them to annotate datasets in a way that is meaningful
462 in your environment. For more information about user properties, see the
463 .Qq Sx User Properties
466 Every dataset has a set of properties that export statistics about the dataset
467 as well as control various behaviors. Properties are inherited from the parent
468 unless overridden by the child. Some properties apply only to certain types of
469 datasets (file systems, volumes, or snapshots).
471 The values of numeric properties can be specified using human-readable suffixes
473 .Sy k , KB , M , Gb ,
476 for zettabyte). The following are all valid (and equal) specifications:
477 .Bd -ragged -offset 4n
481 The values of non-numeric properties are case sensitive and must be lowercase,
483 .Sy mountpoint , sharenfs , No and Sy sharesmb .
485 The following native properties consist of read-only statistics about the
486 dataset. These properties can be neither set, nor inherited. Native properties
487 apply to all dataset types unless otherwise noted.
490 The amount of space available to the dataset and all its children, assuming
491 that there is no other activity in the pool. Because space is shared within a
492 pool, availability can be limited by any number of factors, including physical
493 pool size, quotas, reservations, or other datasets within the pool.
495 This property can also be referred to by its shortened column name,
498 For non-snapshots, the compression ratio achieved for the
500 space of this dataset, expressed as a multiplier. The
502 property includes descendant datasets, and, for clones, does not include
503 the space shared with the origin snapshot. For snapshots, the
507 property. Compression can be turned on by running:
508 .Qq Nm Cm set compression=on Ar dataset
512 The time this dataset was created.
514 For snapshots, this property is a comma-separated list of filesystems or
515 volumes which are clones of this snapshot. The clones'
517 property is this snapshot. If the
519 property is not empty, then this snapshot can not be destroyed (even with the
527 if the snapshot has been marked for deferred destroy by using the
529 command. Otherwise, the property is
531 .It Sy logicalreferenced
532 The amount of space that is
534 accessible by this dataset.
538 The logical space ignores the effect of the
542 properties, giving a quantity closer to the amount of data that applications
544 However, it does include space consumed by metadata.
546 This property can also be referred to by its shortened column name,
549 The amount of space that is
551 consumed by this dataset and all its descendents.
555 The logical space ignores the effect of the
559 properties, giving a quantity closer to the amount of data that applications
562 This property can also be referred to by its shortened column name,
565 For file systems, indicates whether the file system is currently mounted. This
566 property can be either
571 For cloned file systems or volumes, the snapshot from which the clone was
572 created. See also the
576 The amount of data that is accessible by this dataset, which may or may not be
577 shared with other datasets in the pool. When a snapshot or clone is created, it
578 initially references the same amount of space as the file system or snapshot it
579 was created from, since its contents are identical.
581 This property can also be referred to by its shortened column name,
583 .It Sy refcompressratio
584 The compression ratio achieved for the
586 space of this dataset, expressed as a multiplier. See also the
591 .Sy filesystem , volume , No or Sy snapshot .
593 The amount of space consumed by this dataset and all its descendents. This is
594 the value that is checked against this dataset's quota and reservation. The
595 space used does not include this dataset's reservation, but does take into
596 account the reservations of any descendent datasets. The amount of space that a
597 dataset consumes from its parent, as well as the amount of space that are freed
598 if this dataset is recursively destroyed, is the greater of its space used and
601 When snapshots (see the
603 section) are created, their space is
604 initially shared between the snapshot and the file system, and possibly with
605 previous snapshots. As the file system changes, space that was previously
606 shared becomes unique to the snapshot, and counted in the snapshot's space
607 used. Additionally, deleting snapshots can increase the amount of space unique
608 to (and used by) other snapshots.
610 The amount of space used, available, or referenced does not take into account
611 pending changes. Pending changes are generally accounted for within a few
612 seconds. Committing a change to a disk using
616 does not necessarily guarantee that the space usage information is updated
621 properties decompose the
623 properties into the various reasons that space is used. Specifically,
625 .Sy usedbysnapshots + usedbydataset + usedbychildren + usedbyrefreservation .
626 These properties are only available for datasets created
629 pool version 13 pools and higher.
630 .It Sy usedbysnapshots
631 The amount of space consumed by snapshots of this dataset. In particular, it is
632 the amount of space that would be freed if all of this dataset's snapshots were
633 destroyed. Note that this is not simply the sum of the snapshots'
635 properties because space can be shared by multiple snapshots.
637 The amount of space used by this dataset itself, which would be freed if the
638 dataset were destroyed (after first removing any
640 and destroying any necessary snapshots or descendents).
641 .It Sy usedbychildren
642 The amount of space used by children of this dataset, which would be freed if
643 all the dataset's children were destroyed.
644 .It Sy usedbyrefreservation
645 The amount of space used by a
647 set on this dataset, which would be freed if the
650 .It Sy userused@ Ns Ar user
651 The amount of space consumed by the specified user in this dataset. Space is
652 charged to the owner of each file, as displayed by
654 The amount of space charged is displayed by
660 subcommand for more information.
662 Unprivileged users can access only their own space usage. The root user, or a
663 user who has been granted the
667 can access everyone's usage.
671 properties are not displayed by
673 The user's name must be appended after the
675 symbol, using one of the following forms:
676 .Bl -bullet -offset 2n
678 POSIX name (for example,
681 POSIX numeric ID (for example,
685 This property is set to the number of user holds on this snapshot. User holds
689 .It Sy groupused@ Ns Ar group
690 The amount of space consumed by the specified group in this dataset. Space is
691 charged to the group of each file, as displayed by
694 .Sy userused@ Ns Ar user
695 property for more information.
697 Unprivileged users can only access their own groups' space usage. The root
698 user, or a user who has been granted the
702 can access all groups' usage.
703 .It Sy volblocksize Ns = Ns Ar blocksize
704 For volumes, specifies the block size of the volume. The
706 cannot be changed once the volume has been written, so it should be set at
707 volume creation time. The default
709 for volumes is 8 Kbytes. Any
710 power of 2 from 512 bytes to 128 Kbytes is valid.
712 This property can also be referred to by its shortened column name,
717 space written to this dataset since the previous snapshot.
718 .It Sy written@ Ns Ar snapshot
721 space written to this dataset since the specified snapshot. This is the space
722 that is referenced by this dataset but was not referenced by the specified
727 may be specified as a short snapshot name (just the part after the
729 in which case it will be interpreted as a snapshot in the same filesystem as
732 may be a full snapshot name
733 .Pq Em filesystem@snapshot ,
734 which for clones may be a snapshot in the origin's filesystem (or the origin of
735 the origin's filesystem, etc).
738 The following native properties can be used to change the behavior of a
743 .Sy aclinherit Ns = Ns Cm discard |
751 entries are inherited when files and directories are created. A file system
758 entries. A file system with an
762 only inherits inheritable
764 entries that specify "deny" permissions. The property value
766 (the default) removes the
772 entry is inherited. A file system with an
776 inherits all inheritable
778 entries without any modifications made to the
780 entries when they are inherited. A file system with an
784 has the same meaning as
787 .Em owner@ , group@ , No and Em everyone@ Tn ACE Ns s
788 inherit the execute permission only if the file creation mode also requests the
791 When the property value is set to
793 files are created with a mode determined by the inheritable
797 exist that affect the mode, then the mode is set in accordance to the requested
798 mode from the application.
799 .It Sy aclmode Ns = Ns Cm discard | groupmask | passthrough | restricted
804 A file system with an
808 (the default) deletes all
810 entries that do not represent the mode of the file. An
814 reduces permissions granted in all
818 such that they are no greater than the group permissions specified by
820 A file system with an
824 indicates that no changes are made to the
826 other than creating or updating the necessary
828 entries to represent the new mode of the file or directory.
835 operation to return an error when used on any file or directory which has
838 whose entries can not be represented by a mode.
840 is required to change the set user ID, set group ID, or sticky bits on a file
841 or directory, as they do not have equivalent
846 on a file or directory with a non-trivial
852 you must first remove all
854 entries which do not represent the current mode.
855 .It Sy atime Ns = Ns Cm on | off
856 Controls whether the access time for files is updated when they are read.
857 Turning this property off avoids producing write traffic when reading files and
858 can result in significant performance gains, though it might confuse mailers
859 and other similar utilities. The default value is
861 .It Sy canmount Ns = Ns Cm on | off | noauto
862 If this property is set to
864 the file system cannot be mounted, and is ignored by
865 .Qq Nm Cm mount Fl a .
866 Setting this property to
868 is similar to setting the
872 except that the dataset still has a normal
874 property, which can be inherited. Setting this property to
876 allows datasets to be used solely as a mechanism to inherit properties. One
878 .Sy canmount Ns = Ns Cm off
879 is to have two datasets with the same
881 so that the children of both datasets appear in the same directory, but might
882 have different inherited characteristics.
886 value is set, a dataset can only be mounted and unmounted explicitly. The
887 dataset is not mounted automatically when the dataset is created or imported,
888 nor is it mounted by the
890 command or unmounted by the
891 .Qq Nm Cm umount Fl a
894 This property is not inherited.
895 .It Sy checksum Ns = Ns Cm on | off | fletcher2 | fletcher4 | sha256 | noparity
896 Controls the checksum used to verify data integrity. The default value is
898 which automatically selects an appropriate algorithm (currently,
900 but this may change in future releases). The value
902 disables integrity checking on user data.
906 disables integrity but also disables maintaining parity for user data. This
907 setting is used internally by a dump device residing on a RAID-Z pool and should
908 not be used by any other dataset.
909 Disabling checksums is
911 a recommended practice.
912 .It Sy compression Ns = Ns Cm on | off | lzjb | gzip | gzip- Ns Ar N | zle | Cm lz4
913 Controls the compression algorithm used for this dataset. The
915 compression algorithm is optimized for performance while providing decent data
916 compression. Setting compression to
920 compression algorithm. The
922 compression algorithm uses the same compression as the
924 command. You can specify the
926 level by using the value
930 is an integer from 1 (fastest) to 9 (best compression ratio). Currently,
934 (which is also the default for
938 compression algorithm compresses runs of zeros.
942 compression algorithm is a high-performance replacement
945 algorithm. It features significantly faster
946 compression and decompression, as well as a moderately higher
947 compression ratio than
949 but can only be used on pools with
956 for details on ZFS feature flags and the
960 This property can also be referred to by its shortened column name
962 Changing this property affects only newly-written data.
963 .It Sy copies Ns = Ns Cm 1 | 2 | 3
964 Controls the number of copies of data stored for this dataset. These copies are
965 in addition to any redundancy provided by the pool, for example, mirroring or
966 RAID-Z. The copies are stored on different disks, if possible. The space used
967 by multiple copies is charged to the associated file and dataset, changing the
969 property and counting against quotas and reservations.
971 Changing this property only affects newly-written data. Therefore, set this
972 property at file system creation time by using the
973 .Fl o Cm copies= Ns Ar N
975 .It Sy dedup Ns = Ns Cm on | off | verify | sha256 Ns Op Cm ,verify
976 Configures deduplication for a dataset. The default value is
978 The default deduplication checksum is
980 (this may change in the future).
983 is enabled, the checksum defined here overrides the
985 property. Setting the value to
987 has the same effect as the setting
993 will do a byte-to-byte comparsion in case of two blocks having the same
994 signature to make sure the block contents are identical.
995 .It Sy devices Ns = Ns Cm on | off
998 property is currently not supported on
1000 .It Sy exec Ns = Ns Cm on | off
1001 Controls whether processes can be executed from within this file system. The
1004 .It Sy mlslabel Ns = Ns Ar label | Cm none
1007 property is currently not supported on
1009 .It Sy mountpoint Ns = Ns Ar path | Cm none | legacy
1010 Controls the mount point used for this file system. See the
1012 section for more information on how this property is used.
1016 property is changed for a file system, the file system and any children that
1017 inherit the mount point are unmounted. If the new value is
1019 then they remain unmounted. Otherwise, they are automatically remounted in the
1020 new location if the property was previously
1024 or if they were mounted before the property was changed. In addition, any
1025 shared file systems are unshared and shared in the new location.
1026 .It Sy nbmand Ns = Ns Cm on | off
1029 property is currently not supported on
1031 .It Sy primarycache Ns = Ns Cm all | none | metadata
1032 Controls what is cached in the primary cache (ARC). If this property is set to
1034 then both user data and metadata is cached. If this property is set to
1036 then neither user data nor metadata is cached. If this property is set to
1038 then only metadata is cached. The default value is
1040 .It Sy quota Ns = Ns Ar size | Cm none
1041 Limits the amount of space a dataset and its descendents can consume. This
1042 property enforces a hard limit on the amount of space used. This includes all
1043 space consumed by descendents, including file systems and snapshots. Setting a
1044 quota on a descendent of a dataset that already has a quota does not override
1045 the ancestor's quota, but rather imposes an additional limit.
1047 Quotas cannot be set on volumes, as the
1049 property acts as an implicit quota.
1050 .It Sy userquota@ Ns Ar user Ns = Ns Ar size | Cm none
1051 Limits the amount of space consumed by the specified user.
1056 space calculation does not include space that is used by descendent datasets,
1057 such as snapshots and clones. User space consumption is identified by the
1058 .Sy userspace@ Ns Ar user
1061 Enforcement of user quotas may be delayed by several seconds. This delay means
1062 that a user might exceed their quota before the system notices that they are
1063 over quota and begins to refuse additional writes with the
1065 error message. See the
1067 subcommand for more information.
1069 Unprivileged users can only access their own groups' space usage. The root
1070 user, or a user who has been granted the
1074 can get and set everyone's quota.
1076 This property is not available on volumes, on file systems before version 4, or
1077 on pools before version 15. The
1078 .Sy userquota@ Ns ...
1079 properties are not displayed by
1081 The user's name must be appended after the
1083 symbol, using one of the following forms:
1084 .Bl -bullet -offset 2n
1086 POSIX name (for example,
1089 POSIX numeric ID (for example,
1092 .It Sy groupquota@ Ns Ar group Ns = Ns Ar size | Cm none
1093 Limits the amount of space consumed by the specified group. Group space
1094 consumption is identified by the
1095 .Sy userquota@ Ns Ar user
1098 Unprivileged users can access only their own groups' space usage. The root
1099 user, or a user who has been granted the
1103 can get and set all groups' quotas.
1104 .It Sy readonly Ns = Ns Cm on | off
1105 Controls whether this dataset can be modified. The default value is
1107 .It Sy recordsize Ns = Ns Ar size
1108 Specifies a suggested block size for files in the file system. This property is
1109 designed solely for use with database workloads that access files in fixed-size
1112 automatically tunes block sizes according to internal algorithms optimized for
1113 typical access patterns.
1115 For databases that create very large files but access them in small random
1116 chunks, these algorithms may be suboptimal. Specifying a
1118 greater than or equal to the record size of the database can result in
1119 significant performance gains. Use of this property for general purpose file
1120 systems is strongly discouraged, and may adversely affect performance.
1122 The size specified must be a power of two greater than or equal to 512 and less
1123 than or equal to 128 Kbytes.
1125 Changing the file system's
1127 affects only files created afterward; existing files are unaffected.
1129 This property can also be referred to by its shortened column name,
1131 .It Sy refquota Ns = Ns Ar size | Cm none
1132 Limits the amount of space a dataset can consume. This property enforces a hard
1133 limit on the amount of space used. This hard limit does not include space used
1134 by descendents, including file systems and snapshots.
1135 .It Sy refreservation Ns = Ns Ar size | Cm none
1136 The minimum amount of space guaranteed to a dataset, not including its
1137 descendents. When the amount of space used is below this value, the dataset is
1138 treated as if it were taking up the amount of space specified by
1139 .Sy refreservation .
1142 reservation is accounted for in the parent datasets' space used, and counts
1143 against the parent datasets' quotas and reservations.
1147 is set, a snapshot is only allowed if there is enough free pool space outside
1148 of this reservation to accommodate the current number of "referenced" bytes in
1151 This property can also be referred to by its shortened column name,
1153 .It Sy reservation Ns = Ns Ar size | Cm none
1154 The minimum amount of space guaranteed to a dataset and its descendents. When
1155 the amount of space used is below this value, the dataset is treated as if it
1156 were taking up the amount of space specified by its reservation. Reservations
1157 are accounted for in the parent datasets' space used, and count against the
1158 parent datasets' quotas and reservations.
1160 This property can also be referred to by its shortened column name,
1162 .It Sy secondarycache Ns = Ns Cm all | none | metadata
1163 Controls what is cached in the secondary cache (L2ARC). If this property is set
1166 then both user data and metadata is cached. If this property is set to
1168 then neither user data nor metadata is cached. If this property is set to
1170 then only metadata is cached. The default value is
1172 .It Sy setuid Ns = Ns Cm on | off
1173 Controls whether the
1175 bit is respected for the file system. The default value is
1177 .It Sy sharesmb Ns = Ns Cm on | off | Ar opts
1180 property currently has no effect on
1182 .It Sy sharenfs Ns = Ns Cm on | off | Ar opts
1183 Controls whether the file system is shared via
1185 and what options are used. A file system with a
1189 is managed the traditional way via
1191 Otherwise, the file system is automatically shared and unshared with the
1195 commands. If the property is set to
1199 export options are used. Otherwise,
1201 export options are equivalent to the contents of this property. The export
1202 options may be comma-separated. See
1204 for a list of valid options.
1208 property is changed for a dataset, the
1211 .It Sy logbias Ns = Ns Cm latency | throughput
1214 about handling of synchronous requests in this dataset.
1221 will use pool log devices (if configured) to handle the requests at low
1227 will not use configured pool log devices.
1229 will instead optimize synchronous operations for global pool throughput and
1230 efficient use of resources.
1231 .It Sy snapdir Ns = Ns Cm hidden | visible
1232 Controls whether the
1234 directory is hidden or visible in the root of the file system as discussed in
1237 section. The default value is
1239 .It Sy sync Ns = Ns Cm standard | always | disabled
1240 Controls the behavior of synchronous requests (e.g.
1242 O_DSYNC). This property accepts the following values:
1243 .Bl -tag -offset 4n -width 8n
1245 This is the POSIX specified behavior of ensuring all synchronous requests are
1246 written to stable storage and all devices are flushed to ensure data is not
1247 cached by device controllers (this is the default).
1249 All file system transactions are written and flushed before their system calls
1250 return. This has a large performance penalty.
1252 Disables synchronous requests. File system transactions are only committed to
1253 stable storage periodically. This option will give the highest performance.
1254 However, it is very dangerous as
1256 would be ignoring the synchronous transaction demands of applications such as
1259 Administrators should only use this option when the risks are understood.
1261 .It Sy volsize Ns = Ns Ar size
1262 For volumes, specifies the logical size of the volume. By default, creating a
1263 volume establishes a reservation of equal size. For storage pools with a
1264 version number of 9 or higher, a
1266 is set instead. Any changes to
1268 are reflected in an equivalent change to the reservation (or
1269 .Sy refreservation ) .
1272 can only be set to a multiple of
1276 The reservation is kept equal to the volume's logical size to prevent
1277 unexpected behavior for consumers. Without the reservation, the volume could
1278 run out of space, resulting in undefined behavior or data corruption, depending
1279 on how the volume is used. These effects can also occur when the volume size is
1280 changed while it is in use (particularly when shrinking the size). Extreme care
1281 should be used when adjusting the volume size.
1283 Though not recommended, a "sparse volume" (also known as "thin provisioning")
1284 can be created by specifying the
1287 .Qq Nm Cm create Fl V
1288 command, or by changing the reservation after the volume has been created. A
1289 "sparse volume" is a volume where the reservation is less then the volume size.
1290 Consequently, writes to a sparse volume can fail with
1292 when the pool is low on space. For a sparse volume, changes to
1294 are not reflected in the reservation.
1295 .It Sy vscan Ns = Ns Cm off | on
1298 property is currently not supported on
1300 .It Sy xattr Ns = Ns Cm off | on
1303 property is currently not supported on
1305 .It Sy jailed Ns = Ns Cm off | on
1306 Controls whether the dataset is managed from a jail. See the
1308 section for more information. The default value is
1312 The following three properties cannot be changed after the file system is
1313 created, and therefore, should be set when the file system is created. If the
1314 properties are not set with the
1318 commands, these properties are inherited from the parent dataset. If the parent
1319 dataset lacks these properties due to having been created prior to these
1320 features being supported, the new file system will have the default values for
1323 .It Sy casesensitivity Ns = Ns Cm sensitive | insensitive | mixed
1326 property is currently not supported on
1328 .It Sy normalization Ns = Ns Cm none | formC | formD | formKC | formKD
1329 Indicates whether the file system should perform a
1331 normalization of file names whenever two file names are compared, and which
1332 normalization algorithm should be used. File names are always stored
1333 unmodified, names are normalized as part of any comparison process. If this
1334 property is set to a legal value other than
1338 property was left unspecified, the
1340 property is automatically set to
1342 The default value of the
1346 This property cannot be changed after the file system is created.
1347 .It Sy utf8only Ns = Ns Cm on | off
1348 Indicates whether the file system should reject file names that include
1349 characters that are not present in the
1351 character code set. If this property is explicitly set to
1353 the normalization property must either not be explicitly set or be set to
1355 The default value for the
1359 This property cannot be changed after the file system is created.
1363 .Sy casesensitivity , normalization , No and Sy utf8only
1364 properties are also new permissions that can be assigned to non-privileged
1367 delegated administration feature.
1368 .Ss Temporary Mount Point Properties
1369 When a file system is mounted, either through
1371 for legacy mounts or the
1373 command for normal file systems, its mount options are set according to its
1374 properties. The correlation between properties and mount options is as follows:
1375 .Bl -column -offset 4n "PROPERTY" "MOUNT OPTION"
1376 .It "PROPERTY MOUNT OPTION"
1377 .It "atime atime/noatime"
1378 .It "exec exec/noexec"
1379 .It "readonly ro/rw"
1380 .It "setuid suid/nosuid"
1383 In addition, these options can be set on a per-mount basis using the
1385 option, without affecting the property that is stored on disk. The values
1386 specified on the command line override the values stored in the dataset. These
1387 properties are reported as "temporary" by the
1389 command. If the properties are changed while the dataset is mounted, the new
1390 setting overrides any temporary settings.
1392 In addition to the standard native properties,
1394 supports arbitrary user properties. User properties have no effect on
1396 behavior, but applications or administrators can use them to annotate datasets
1397 (file systems, volumes, and snapshots).
1399 User property names must contain a colon
1401 character to distinguish them from native properties. They may contain
1402 lowercase letters, numbers, and the following punctuation characters: colon
1410 The expected convention is that the property name is divided into two portions
1412 .Em module Ns Sy \&: Ns Em property ,
1413 but this namespace is not enforced by
1415 User property names can be at most 256 characters, and cannot begin with a dash
1418 When making programmatic use of user properties, it is strongly suggested to
1423 component of property names to reduce the chance that two
1424 independently-developed packages use the same property name for different
1425 purposes. Property names beginning with
1427 are reserved for use by Sun Microsystems.
1429 The values of user properties are arbitrary strings, are always inherited, and
1430 are never validated. All of the commands that operate on properties
1437 can be used to manipulate both native properties and user properties. Use the
1439 command to clear a user property. If the property is not defined in any parent
1440 dataset, it is removed entirely. Property values are limited to 1024
1443 All subcommands that modify state are logged persistently to the pool in their
1451 Displays a help message.
1456 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1462 file system. The file system is automatically mounted according to the
1464 property inherited from the parent.
1465 .Bl -tag -width indent
1467 Creates all the non-existing parent datasets. Datasets created in this manner
1468 are automatically mounted according to the
1470 property inherited from their parent. Any property specified on the command
1473 option is ignored. If the target filesystem already exists, the operation
1474 completes successfully.
1476 Newly created file system is not mounted.
1477 .It Fl o Ar property Ns = Ns Ar value
1478 Sets the specified property as if the command
1479 .Qq Nm Cm set Ar property Ns = Ns Ar value
1480 was invoked at the same time the dataset was created. Any editable
1482 property can also be set at creation time. Multiple
1484 options can be specified. An error results if the same property is specified in
1493 .Op Fl b Ar blocksize
1494 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1499 Creates a volume of the given size. The volume is exported as a block device in
1500 .Pa /dev/zvol/path ,
1503 is the name of the volume in the
1505 namespace. The size represents the logical size as exported by the device. By
1506 default, a reservation of equal size is created.
1509 is automatically rounded up to the nearest 128 Kbytes to ensure that
1510 the volume has an integral number of blocks regardless of
1512 .Bl -tag -width indent
1514 Creates all the non-existing parent datasets. Datasets created in this manner
1515 are automatically mounted according to the
1517 property inherited from their parent. Any property specified on the command
1520 option is ignored. If the target filesystem already exists, the operation
1521 completes successfully.
1523 Creates a sparse volume with no reservation. See
1526 .Qq Sx Native Properties
1527 section for more information about sparse volumes.
1528 .It Fl b Ar blocksize
1530 .Fl o Cm volblocksize Ns = Ns Ar blocksize .
1531 If this option is specified in conjunction with
1532 .Fl o Cm volblocksize ,
1533 the resulting behavior is undefined.
1534 .It Fl o Ar property Ns = Ns Ar value
1535 Sets the specified property as if the
1536 .Qq Nm Cm set Ar property Ns = Ns Ar value
1537 command was invoked at the same time the dataset was created. Any editable
1539 property can also be set at creation time. Multiple
1541 options can be specified. An error results if the same property is specified in
1550 .Ar filesystem Ns | Ns Ar volume
1553 Destroys the given dataset. By default, the command unshares any file systems
1554 that are currently shared, unmounts any file systems that are currently
1555 mounted, and refuses to destroy a dataset that has active dependents (children
1557 .Bl -tag -width indent
1559 Recursively destroy all children.
1561 Recursively destroy all dependents, including cloned file systems outside the
1564 Force an unmount of any file systems using the
1565 .Qq Nm Cm unmount Fl f
1566 command. This option has no effect on non-file systems or unmounted file
1569 Do a dry-run ("No-op") deletion. No data will be deleted. This is useful in
1570 conjunction with the
1574 flags to determine what data would be deleted.
1576 Print machine-parsable verbose information about the deleted data.
1578 Print verbose information about the deleted data.
1581 Extreme care should be taken when applying either the
1585 options, as they can destroy large portions of a pool and cause unexpected
1586 behavior for mounted file systems in use.
1593 .Op % Ns Ar snapname
1598 The given snapshots are destroyed immediately if and only if the
1602 option would have destroyed it. Such immediate destruction would occur, for
1603 example, if the snapshot had no clones and the user-initiated reference count
1606 If a snapshot does not qualify for immediate destruction, it is marked for
1607 deferred deletion. In this state, it exists as a usable, visible snapshot until
1608 both of the preconditions listed above are met, at which point it is destroyed.
1610 An inclusive range of snapshots may be specified by separating the
1611 first and last snapshots with a percent sign
1613 The first and/or last snapshots may be left blank, in which case the
1614 filesystem's oldest or newest snapshot will be implied.
1617 (or ranges of snapshots) of the same filesystem or volume may be specified
1618 in a comma-separated list of snapshots.
1619 Only the snapshot's short name (the
1622 should be specified when using a range or comma-separated list to identify
1624 .Bl -tag -width indent
1626 Destroy (or mark for deferred deletion) all snapshots with this name in
1627 descendent file systems.
1629 Recursively destroy all clones of these snapshots, including the clones,
1630 snapshots, and children.
1631 If this flag is specified, the
1633 flag will have no effect.
1635 Do a dry-run ("No-op") deletion. No data will be deleted. This is useful in
1636 conjunction with the
1640 flags to determine what data would be deleted.
1642 Print machine-parsable verbose information about the deleted data.
1644 Print verbose information about the deleted data.
1646 Defer snapshot deletion.
1649 Extreme care should be taken when applying either the
1653 options, as they can destroy large portions of a pool and cause unexpected
1654 behavior for mounted file systems in use.
1657 .Cm snapshot Ns | Ns Cm snap
1659 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1660 .Ar filesystem@snapname Ns | Ns volume@snapname
1661 .Ar filesystem@snapname Ns | Ns volume@snapname Ns ...
1664 Creates snapshots with the given names. All previous modifications by
1665 successful system calls to the file system are part of the snapshots.
1666 Snapshots are taken atomically, so that all snapshots correspond to the same
1667 moment in time. See the
1669 section for details.
1670 .Bl -tag -width indent
1672 Recursively create snapshots of all descendent datasets
1673 .It Fl o Ar property Ns = Ns Ar value
1674 Sets the specified property; see
1685 Roll back the given dataset to a previous snapshot. When a dataset is rolled
1686 back, all data that has changed since the snapshot is discarded, and the
1687 dataset reverts to the state at the time of the snapshot. By default, the
1688 command refuses to roll back to a snapshot other than the most recent one. In
1689 order to do so, all intermediate snapshots must be destroyed by specifying the
1692 .Bl -tag -width indent
1694 Recursively destroy any snapshots more recent than the one specified.
1696 Recursively destroy any more recent snapshots, as well as any clones of those
1701 option to force an unmount of any clone file systems that are to be destroyed.
1707 .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1708 .Ar snapshot filesystem Ns | Ns Ar volume
1711 Creates a clone of the given snapshot. See the
1713 section for details. The target dataset can be located anywhere in the
1715 hierarchy, and is created as the same type as the original.
1716 .Bl -tag -width indent
1718 Creates all the non-existing parent datasets. Datasets created in this manner
1719 are automatically mounted according to the
1721 property inherited from their parent. If the target filesystem or volume
1722 already exists, the operation completes successfully.
1723 .It Fl o Ar property Ns = Ns Ar value
1724 Sets the specified property; see
1731 .Ar clone-filesystem
1734 Promotes a clone file system to no longer be dependent on its "origin"
1735 snapshot. This makes it possible to destroy the file system that the clone was
1736 created from. The clone parent-child dependency relationship is reversed, so
1737 that the origin file system becomes a clone of the specified file system.
1739 The snapshot that was cloned, and any snapshots previous to this snapshot, are
1740 now owned by the promoted clone. The space they use moves from the origin file
1741 system to the promoted clone, so enough space must be available to accommodate
1742 these snapshots. No new space is consumed by this operation, but the space
1743 accounting is adjusted. The promoted clone must not have any conflicting
1744 snapshot names of its own. The
1746 subcommand can be used to rename any conflicting snapshots.
1751 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
1752 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
1759 .Ar filesystem Ns | Ns Ar volume
1760 .Ar filesystem Ns | Ns Ar volume
1767 .Ar filesystem filesystem
1770 Renames the given dataset. The new target can be located anywhere in the
1772 hierarchy, with the exception of snapshots. Snapshots can only be renamed
1773 within the parent file system or volume. When renaming a snapshot, the parent
1774 file system of the snapshot does not need to be specified as part of the second
1775 argument. Renamed file systems can inherit new mount points, in which case they
1776 are unmounted and remounted at the new mount point.
1777 .Bl -tag -width indent
1779 Creates all the nonexistent parent datasets. Datasets created in this manner
1780 are automatically mounted according to the
1782 property inherited from their parent.
1784 Do not remount file systems during rename. If a file system's
1790 file system is not unmounted even if this option is not given.
1792 Force unmount any filesystems that need to be unmounted in the process.
1793 This flag has no effect if used together with the
1801 .Ar snapshot snapshot
1804 Recursively rename the snapshots of all descendent datasets. Snapshots are the
1805 only dataset that can be renamed recursively.
1809 .Op Fl r Ns | Ns Fl d Ar depth
1811 .Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
1812 .Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
1813 .Oo Fl s Ar property Oc Ns ...
1814 .Oo Fl S Ar property Oc Ns ...
1815 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
1818 Lists the property information for the given datasets in tabular form. If
1819 specified, you can list property information by the absolute pathname or the
1820 relative pathname. By default, all file systems and volumes are displayed.
1821 Snapshots are displayed if the
1827 The following fields are displayed,
1828 .Sy name , used , available , referenced , mountpoint .
1829 .Bl -tag -width indent
1831 Recursively display any children of the dataset on the command line.
1833 Recursively display any children of the dataset, limiting the recursion to
1837 will display only the dataset and its direct children.
1839 Used for scripting mode. Do not print headers and separate fields by a single
1840 tab instead of arbitrary white space.
1842 Display numbers in parsable (exact) values.
1843 .It Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
1844 A comma-separated list of properties to display. The property must be:
1845 .Bl -bullet -offset 2n
1847 One of the properties described in the
1848 .Qq Sx Native Properties
1855 to display the dataset name
1859 to display space usage properties on file systems and volumes. This is a
1860 shortcut for specifying
1862 .Sy name,avail,used,usedsnap,usedds,usedrefreserv,usedchild
1864 .Sy filesystem,volume
1867 .It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
1868 A comma-separated list of types to display, where
1871 .Sy filesystem , snapshot , snap, volume , No or Sy all .
1872 For example, specifying
1874 displays only snapshots.
1875 .It Fl s Ar property
1876 A property for sorting the output by column in ascending order based on the
1877 value of the property. The property must be one of the properties described in
1880 section, or the special value
1882 to sort by the dataset name. Multiple properties can be specified at one time
1885 property options. Multiple
1887 options are evaluated from left to right in decreasing order of importance.
1889 The following is a list of sorting criteria:
1890 .Bl -bullet -offset 2n
1892 Numeric types sort in numeric order.
1894 String types sort in alphabetical order.
1896 Types inappropriate for a row sort that row to the literal bottom, regardless
1897 of the specified ordering.
1899 If no sorting options are specified the existing behavior of
1903 .It Fl S Ar property
1906 option, but sorts by property in descending order.
1911 .Ar property Ns = Ns Ar value
1912 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
1915 Sets the property to the given value for each dataset. Only some properties can
1916 be edited. See the "Properties" section for more information on what properties
1917 can be set and acceptable values. Numeric values can be specified as exact
1918 values, or in a human-readable form with a suffix of
1919 .Sy B , K , M , G , T , P , E , Z
1920 (for bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes, or
1921 zettabytes, respectively). User properties can be set on snapshots. For more
1922 information, see the
1923 .Qq Sx User Properties
1928 .Op Fl r Ns | Ns Fl d Ar depth
1930 .Op Fl o Ar all | field Ns Oo , Ns Ar field Oc Ns ...
1931 .Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
1932 .Op Fl s Ar source Ns Oo , Ns Ar source Oc Ns ...
1933 .Ar all | property Ns Oo , Ns Ar property Oc Ns ...
1934 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
1937 Displays properties for the given datasets. If no datasets are specified, then
1938 the command displays properties for all datasets on the system. For each
1939 property, the following columns are displayed:
1941 .Bl -hang -width "property" -offset indent -compact
1949 Property source. Can either be local, default, temporary, inherited, or none
1953 All columns except the
1955 column are displayed by default. The columns to display can be specified
1958 option. This command takes a comma-separated list of properties as described in
1960 .Qq Sx Native Properties
1962 .Qq Sx User Properties
1967 can be used to display all properties that apply to the given dataset's type
1968 (filesystem, volume, or snapshot).
1969 .Bl -tag -width indent
1971 Recursively display properties for any children.
1973 Recursively display any children of the dataset, limiting the recursion to
1977 will display only the dataset and its direct children.
1979 Display output in a form more easily parsed by scripts. Any headers are
1980 omitted, and fields are explicitly separated by a single tab instead of an
1981 arbitrary amount of space.
1983 Display numbers in parsable (exact) values.
1984 .It Fl o Cm all | Ar field Ns Oo , Ns Ar field Oc Ns ...
1985 A comma-separated list of columns to display. Supported values are
1986 .Sy name,property,value,received,source .
1988 .Sy name,property,value,source .
1991 specifies all columns.
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 , volume , No or Sy all .
1997 For example, specifying
1999 displays only snapshots.
2000 .It Fl s Ar source Ns Oo , Ns Ar source Oc Ns ...
2001 A comma-separated list of sources to display. Those properties coming from a
2002 source other than those in this list are ignored. Each source must be one of
2004 .Sy local,default,inherited,temporary,received,none .
2005 The default value is all sources.
2012 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2015 Clears the specified property, causing it to be inherited from an ancestor. If
2016 no ancestor has the property set, then the default value is used. See the
2018 section for a listing of default values, and details on which properties can be
2020 .Bl -tag -width indent
2022 Recursively inherit the given property for all children.
2024 For properties with a received value, revert to this value. This flag has no
2025 effect on properties that do not have a received value.
2033 Displays a list of file systems that are not the most recent version.
2034 .Bl -tag -width indent
2038 filesystem versions supported by the current software. The current
2040 filesystem version and all previous supported versions are displayed, along
2041 with an explanation of the features provided with each version.
2048 .Fl a | Ar filesystem
2051 Upgrades file systems to a new on-disk version. Once this is done, the file
2052 systems will no longer be accessible on systems running older versions of the
2055 streams generated from new snapshots of these file systems cannot be accessed
2056 on systems running older versions of the software.
2058 In general, the file system version is independent of the pool version. See
2060 for information on the
2061 .Nm zpool Cm upgrade
2064 In some cases, the file system version and the pool version are interrelated
2065 and the pool version must be upgraded before the file system version can be
2067 .Bl -tag -width indent
2069 Upgrade the specified file system and all descendent file systems.
2071 Upgrade to the specified
2075 flag is not specified, this command upgrades to the most recent version. This
2076 option can only be used to increase the version number, and only up to the most
2077 recent version supported by this software.
2079 Upgrade all file systems on all imported pools.
2081 Upgrade the specified file system.
2087 .Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
2088 .Oo Fl s Ar field Oc Ns ...
2089 .Oo Fl S Ar field Oc Ns ...
2090 .Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2091 .Ar filesystem Ns | Ns Ar snapshot
2094 Displays space consumed by, and quotas on, each user in the specified
2095 filesystem or snapshot. This corresponds to the
2096 .Sy userused@ Ns Ar user
2098 .Sy userquota@ Ns Ar user
2100 .Bl -tag -width indent
2102 Print numeric ID instead of user/group name.
2104 Do not print headers, use tab-delimited output.
2106 Use exact (parsable) numeric output.
2107 .It Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
2108 Display only the specified fields from the following set:
2109 .Sy type,name,used,quota .
2110 The default is to display all fields.
2112 Sort output by this field. The
2116 flags may be specified multiple times to sort first by one field, then by
2117 another. The default is
2118 .Fl s Cm type Fl s Cm name .
2120 Sort by this field in reverse order. See
2122 .It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2123 Print only the specified types from the following set:
2124 .Sy all,posixuser,smbuser,posixgroup,smbgroup .
2127 .Fl t Cm posixuser,smbuser .
2129 The default can be changed to include group types.
2131 Translate SID to POSIX ID. This flag currently has no effect on
2138 .Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
2139 .Oo Fl s Ar field Oc Ns ...
2140 .Oo Fl S Ar field Oc Ns ...
2141 .Op Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2142 .Ar filesystem Ns | Ns Ar snapshot
2145 Displays space consumed by, and quotas on, each group in the specified
2146 filesystem or snapshot. This subcommand is identical to
2147 .Qq Nm Cm userspace ,
2148 except that the default types to display are
2149 .Fl t Sy posixgroup,smbgroup .
2157 file systems currently mounted.
2158 .Bl -tag -width indent
2165 .Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
2166 .Fl a | Ar filesystem
2172 .Bl -tag -width indent
2174 Report mount progress.
2176 Perform an overlay mount. Overlay mounts are not supported on
2178 .It Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
2179 An optional, comma-separated list of mount options to use temporarily for the
2180 duration of the mount. See the
2181 .Qq Sx Temporary Mount Point Properties
2182 section for details.
2187 This command may be executed on
2191 For more information, see variable
2196 Mount the specified filesystem.
2200 .Cm unmount Ns | Ns Cm umount
2202 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
2205 Unmounts currently mounted
2208 .Bl -tag -width indent
2210 Forcefully unmount the file system, even if it is currently in use.
2212 Unmount all available
2215 .It Ar filesystem | mountpoint
2216 Unmount the specified filesystem. The command can also be given a path to a
2218 file system mount point on the system.
2223 .Fl a | Ar filesystem
2228 file systems that have the
2231 .Bl -tag -width indent
2235 file systems that have the
2238 This command may be executed on
2242 For more information, see variable
2247 Share the specified filesystem according to the
2249 property. File systems are shared when the
2256 .Fl a | Ar filesystem Ns | Ns Ar mountpoint
2261 file systems that have the
2264 .Bl -tag -width indent
2268 file systems that have the
2271 This command may be executed on
2275 For more information, see variable
2279 .It Ar filesystem | mountpoint
2280 Unshare the specified filesystem. The command can also be given a path to a
2282 file system shared on the system.
2288 .Op Fl i Ar snapshot | Fl I Ar snapshot
2292 Creates a stream representation of the last
2294 argument (not part of
2298 which is written to standard output. The output can be redirected to
2299 a file or to a different system (for example, using
2301 By default, a full stream is generated.
2302 .Bl -tag -width indent
2303 .It Fl i Ar snapshot
2304 Generate an incremental stream from the
2308 The incremental source (the
2310 can be specified as the last component of the snapshot name (for example, the
2313 and it is assumed to be from the same file system as the last
2316 If the destination is a clone, the source may be the origin snapshot, which
2317 must be fully specified (for example,
2318 .Cm pool/fs@origin ,
2321 .It Fl I Ar snapshot
2322 Generate a stream package that sends all intermediary snapshots from the
2329 .Ic -i @a fs@b; -i @b fs@c; -i @c fs@d .
2330 The incremental source snapshot may be specified as with the
2334 Generate a replication stream package, which will replicate the specified
2335 filesystem, and all descendent file systems, up to the named snapshot. When
2336 received, all properties, snapshots, descendent file systems, and clones are
2343 flags are used in conjunction with the
2345 flag, an incremental replication stream is generated. The current values of
2346 properties, and current snapshot and file system names are set when the stream
2349 flag is specified when this stream is received, snapshots and file systems that
2350 do not exist on the sending side are destroyed.
2352 Generate a deduplicated stream. Blocks which would have been sent multiple
2353 times in the send stream will only be sent once. The receiving system must
2354 also support this feature to receive a deduplicated stream. This flag can
2355 be used regardless of the dataset's
2357 property, but performance will be much better if the filesystem uses a
2358 dedup-capable checksum (eg.
2361 Include the dataset's properties in the stream. This flag is implicit when
2363 is specified. The receiving system must also support this feature.
2365 Do a dry-run ("No-op") send. Do not generate any actual send data. This is
2366 useful in conjunction with the
2370 flags to determine what data will be sent.
2372 Print machine-parsable verbose information about the stream package generated.
2374 Print verbose information about the stream package generated.
2375 This information includes a per-second report of how much data has been sent.
2378 The format of the stream is committed. You will be able to receive your streams
2379 on future versions of
2383 .Cm receive Ns | Ns Cm recv
2385 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2389 .Cm receive Ns | Ns Cm recv
2395 Creates a snapshot whose contents are as specified in the stream provided on
2396 standard input. If a full stream is received, then a new file system is created
2397 as well. Streams are created using the
2399 subcommand, which by default creates a full stream.
2401 can be used as an alias for
2404 If an incremental stream is received, then the destination file system must
2405 already exist, and its most recent snapshot must match the incremental stream's
2408 the destination device link is destroyed and recreated, which means the
2410 cannot be accessed during the
2414 When a snapshot replication package stream that is generated by using the
2416 command is received, any snapshots that do not exist on the sending location
2417 are destroyed by using the
2418 .Qq Nm Cm destroy Fl d
2421 The name of the snapshot (and file system, if a full stream is received) that
2422 this subcommand creates depends on the argument type and the
2428 If the argument is a snapshot name, the specified
2430 is created. If the argument is a file system or volume name, a snapshot with
2431 the same name as the sent snapshot is created within the specified
2439 option is specified, the snapshot name is determined by appending the sent
2440 snapshot's name to the specified
2444 option is specified, all but the pool name of the sent snapshot path is
2445 appended (for example,
2447 appended from sent snapshot
2451 option is specified, only the tail of the sent snapshot path is appended (for
2454 appended from sent snapshot
2458 any file systems needed to replicate the path of the sent snapshot are created
2459 within the specified file system.
2460 .Bl -tag -width indent
2462 Use the full sent snapshot path without the first element (without pool name)
2463 to determine the name of the new snapshot as described in the paragraph above.
2465 Use only the last element of the sent snapshot path to determine the name of
2466 the new snapshot as described in the paragraph above.
2468 File system that is associated with the received stream is not mounted.
2470 Print verbose information about the stream and the time required to perform the
2473 Do not actually receive the stream. This can be useful in conjunction with the
2475 option to verify the name the receive operation would use.
2477 Force a rollback of the file system to the most recent snapshot before
2478 performing the receive operation. If receiving an incremental replication
2479 stream (for example, one generated by
2480 .Qq Nm Cm send Fl R Fi iI ) ,
2481 destroy snapshots and file systems that do not exist on the sending side.
2486 .Ar filesystem Ns | Ns Ar volume
2489 Displays permissions that have been delegated on the specified filesystem or
2490 volume. See the other forms of
2492 for more information.
2497 .Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ...
2498 .Ar perm Ns | Ns Ar @setname Ns
2499 .Oo Ns , Ns Ar perm Ns | Ns Ar @setname Oc Ns ...
2500 .Ar filesystem Ns | Ns Ar volume
2506 .Fl e Ns | Ns Cm everyone
2507 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
2509 .Ar filesystem Ns | Ns Ar volume
2514 administration permission for the file systems to non-privileged users.
2515 .Bl -tag -width indent
2518 .Ar user Ns | Ns Ar group Ns Oo , Ar user Ns | Ns Ar group Oc Ns ...
2520 Specifies to whom the permissions are delegated. Multiple entities can be
2521 specified as a comma-separated list. If neither of the
2523 options are specified, then the argument is interpreted preferentially as the
2526 then as a user name, and lastly as a group name. To specify
2527 a user or group named
2533 options. To specify a group with the same name as a user, use the
2536 .It Op Fl e Ns | Ns Cm everyone
2537 Specifies that the permissions be delegated to
2540 .Ar perm Ns | Ns Ar @setname Ns Oo , Ns Ar perm Ns | Ns Ar @setname Oc Ns ...
2542 The permissions to delegate. Multiple permissions
2543 may be specified as a comma-separated list. Permission names are the same as
2545 subcommand and property names. See the property list below. Property set names,
2546 which begin with an at sign
2548 may be specified. See the
2550 form below for details.
2553 .Ar filesystem Ns | Ns Ar volume
2555 Specifies where the permissions are delegated. If neither of the
2557 options are specified, or both are, then the permissions are allowed for the
2558 file system or volume, and all of its descendents. If only the
2560 option is used, then is allowed "locally" only for the specified file system.
2563 option is used, then is allowed only for the descendent file systems.
2566 Permissions are generally the ability to use a
2568 subcommand or change a
2570 property. The following permissions are available:
2571 .Bl -column -offset 4n "secondarycache" "subcommand"
2572 .It NAME Ta TYPE Ta NOTES
2573 .It allow Ta subcommand Ta Must Xo
2574 also have the permission that is being allowed
2576 .It clone Ta subcommand Ta Must Xo
2577 also have the 'create' ability and 'mount' ability in the origin file system
2579 .It create Ta subcommand Ta Must also have the 'mount' ability
2580 .It destroy Ta subcommand Ta Must also have the 'mount' ability
2581 .It diff Ta subcommand Ta Allows lookup of paths within a dataset given an
2582 object number, and the ability to create snapshots necessary to 'zfs diff'
2583 .It hold Ta subcommand Ta Allows adding a user hold to a snapshot
2584 .It mount Ta subcommand Ta Allows mount/umount of Tn ZFS No datasets
2585 .It promote Ta subcommand Ta Must Xo
2586 also have the 'mount' and 'promote' ability in the origin file system
2588 .It receive Ta subcommand Ta Must also have the 'mount' and 'create' ability
2589 .It release Ta subcommand Ta Allows Xo
2590 releasing a user hold which might destroy the snapshot
2592 .It rename Ta subcommand Ta Must Xo
2593 also have the 'mount' and 'create' ability in the new parent
2595 .It rollback Ta subcommand Ta Must also have the 'mount' ability
2596 .It send Ta subcommand
2597 .It share Ta subcommand Ta Allows Xo
2598 sharing file systems over the
2602 .It snapshot Ta subcommand Ta Must also have the 'mount' ability
2603 .It groupquota Ta other Ta Allows accessing any groupquota@... property
2604 .It groupused Ta other Ta Allows reading any groupused@... property
2605 .It userprop Ta other Ta Allows changing any user property
2606 .It userquota Ta other Ta Allows accessing any userquota@... property
2607 .It userused Ta other Ta Allows reading any userused@... property
2608 .It aclinherit Ta property
2609 .It aclmode Ta property
2610 .It atime Ta property
2611 .It canmount Ta property
2612 .It casesensitivity Ta property
2613 .It checksum Ta property
2614 .It compression Ta property
2615 .It copies Ta property
2616 .It dedup Ta property
2617 .It devices Ta property
2618 .It exec Ta property
2619 .It logbias Ta property
2620 .It jailed Ta property
2621 .It mlslabel Ta property
2622 .It mountpoint Ta property
2623 .It nbmand Ta property
2624 .It normalization Ta property
2625 .It primarycache Ta property
2626 .It quota Ta property
2627 .It readonly Ta property
2628 .It recordsize Ta property
2629 .It refquota Ta property
2630 .It refreservation Ta property
2631 .It reservation Ta property
2632 .It secondarycache Ta property
2633 .It setuid Ta property
2634 .It sharenfs Ta property
2635 .It sharesmb Ta property
2636 .It snapdir Ta property
2637 .It sync Ta property
2638 .It utf8only Ta property
2639 .It version Ta property
2640 .It volblocksize Ta property
2641 .It volsize Ta property
2642 .It vscan Ta property
2643 .It xattr Ta property
2649 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
2651 .Ar filesystem Ns | Ns Ar volume
2654 Sets "create time" permissions. These permissions are granted (locally) to the
2655 creator of any newly-created descendent file system.
2661 .Ar perm Ns | Ns Ar @setname Ns Op Ns , Ns Ar perm Ns | Ns Ar @setname Ns
2663 .Ar filesystem Ns | Ns Ar volume
2666 Defines or adds permissions to a permission set. The set can be used by other
2668 commands for the specified file system and its descendents. Sets are evaluated
2669 dynamically, so changes to a set are immediately reflected. Permission sets
2670 follow the same naming restrictions as ZFS file systems, but the name must
2671 begin with an "at sign"
2673 and can be no more than 64 characters long.
2678 .Ar user Ns | Ns Ar group Ns Oo Ns , Ns Ar user Ns | Ns Ar group Oc Ns ...
2679 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
2681 .Ar filesystem Ns | Ns Ar volume
2687 .Fl e Ns | Ns Cm everyone
2688 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
2690 .Ar filesystem Ns | Ns Ar volume
2697 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
2699 .Ar filesystem Ns | Ns Ar volume
2702 Removes permissions that were granted with the
2704 command. No permissions are explicitly denied, so other permissions granted are
2705 still in effect. For example, if the permission is granted by an ancestor. If
2706 no permissions are specified, then all permissions for the specified
2707 .Ar user , group , No or everyone
2708 are removed. Specifying
2710 .Po or using the Fl e
2712 .Pc only removes the permissions that were granted to everyone ,
2713 not all permissions for every user and group. See the
2715 command for a description of the
2718 .Bl -tag -width indent
2720 Recursively remove the permissions from this file system and all descendents.
2728 .Oo Ar perm Ns | Ns Ar @setname Ns Op , Ns Ar perm Ns | Ns Ar @setname Ns
2730 .Ar filesystem Ns | Ns Ar volume
2733 Removes permissions from a permission set. If no permissions are specified,
2734 then all permissions are removed, thus removing the set entirely.
2739 .Ar tag snapshot Ns ...
2742 Adds a single reference, named with the
2744 argument, to the specified snapshot or snapshots. Each snapshot has its own tag
2745 namespace, and tags must be unique within that space.
2747 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
2751 .Bl -tag -width indent
2753 Specifies that a hold with the given tag is applied recursively to the
2754 snapshots of all descendent file systems.
2763 Lists all existing user references for the given snapshot or snapshots.
2764 .Bl -tag -width indent
2766 Lists the holds that are set on the named descendent snapshots, in addition to
2767 listing the holds on the named snapshot.
2773 .Ar tag snapshot Ns ...
2776 Removes a single reference, named with the
2778 argument, from the specified snapshot or snapshots. The tag must already exist
2780 .Bl -tag -width indent
2782 Recursively releases a hold with the given tag on the snapshots of all
2783 descendent file systems.
2790 .Op Ar snapshot Ns | Ns Ar filesystem
2793 Display the difference between a snapshot of a given filesystem and another
2794 snapshot of that filesystem from a later time or the current contents of the
2795 filesystem. The first column is a character indicating the type of change,
2796 the other columns indicate pathname, new pathname
2797 .Pq in case of rename ,
2798 change in link count, and optionally file type and/or change time.
2800 The types of change are:
2801 .Bl -column -offset 2n indent
2802 .It \&- Ta path was removed
2803 .It \&+ Ta path was added
2804 .It \&M Ta path was modified
2805 .It \&R Ta path was renamed
2807 .Bl -tag -width indent
2809 Display an indication of the type of file, in a manner similar to the
2813 .Bl -column -offset 2n indent
2814 .It \&B Ta block device
2815 .It \&C Ta character device
2816 .It \&F Ta regular file
2817 .It \&/ Ta directory
2818 .It \&@ Ta symbolic link
2820 .It \&> Ta door (not supported on Fx )
2821 .It \&| Ta named pipe (not supported on Fx )
2822 .It \&P Ta event port (not supported on Fx )
2825 Give more parsable tab-separated output, without header lines and without
2828 Display the path's inode change time as the first column of output.
2833 .Ar jailid filesystem
2836 Attaches the specified
2838 to the jail identified by JID
2840 From now on this file system tree can be managed from within a jail if the
2842 property has been set. To use this functionality, the jail needs the
2846 parameters set to 1 and the
2848 parameter set to a value lower than 2.
2852 for more information on managing jails and configuring the parameters above.
2856 .Ar jailid filesystem
2859 Detaches the specified
2861 from the jail identified by JID
2865 The following exit values are returned:
2866 .Bl -tag -offset 2n -width 2n
2868 Successful completion.
2872 Invalid command line options were specified.
2876 .It Sy Example 1 No Creating a Tn ZFS No File System Hierarchy
2878 The following commands create a file system named
2880 and a file system named
2884 is set for the parent file system, and is automatically inherited by the child
2886 .Bd -literal -offset 2n
2887 .Li # Ic zfs create pool/home
2888 .Li # Ic zfs set mountpoint=/home pool/home
2889 .Li # Ic zfs create pool/home/bob
2891 .It Sy Example 2 No Creating a Tn ZFS No Snapshot
2893 The following command creates a snapshot named
2895 This snapshot is mounted on demand in the
2897 directory at the root of the
2900 .Bd -literal -offset 2n
2901 .Li # Ic zfs snapshot pool/home/bob@yesterday
2903 .It Sy Example 3 No Creating and Destroying Multiple Snapshots
2905 The following command creates snapshots named
2909 and all of its descendent file systems. Each snapshot is mounted on demand in
2912 directory at the root of its file system. The second command destroys the newly
2914 .Bd -literal -offset 2n
2915 .Li # Ic zfs snapshot -r pool/home@yesterday
2916 .Li # Ic zfs destroy -r pool/home@yesterday
2918 .It Sy Example 4 No Disabling and Enabling File System Compression
2920 The following command disables the
2922 property for all file systems under
2924 The next command explicitly enables
2927 .Em pool/home/anne .
2928 .Bd -literal -offset 2n
2929 .Li # Ic zfs set compression=off pool/home
2930 .Li # Ic zfs set compression=on pool/home/anne
2932 .It Sy Example 5 No Listing Tn ZFS No Datasets
2934 The following command lists all active file systems and volumes in the system.
2935 Snapshots are displayed if the
2943 for more information on pool properties.
2944 .Bd -literal -offset 2n
2946 NAME USED AVAIL REFER MOUNTPOINT
2947 pool 450K 457G 18K /pool
2948 pool/home 315K 457G 21K /home
2949 pool/home/anne 18K 457G 18K /home/anne
2950 pool/home/bob 276K 457G 276K /home/bob
2952 .It Sy Example 6 No Setting a Quota on a Tn ZFS No File System
2954 The following command sets a quota of 50 Gbytes for
2956 .Bd -literal -offset 2n
2957 .Li # Ic zfs set quota=50G pool/home/bob
2959 .It Sy Example 7 No Listing Tn ZFS No Properties
2961 The following command lists all properties for
2963 .Bd -literal -offset 2n
2964 .Li # Ic zfs get all pool/home/bob
2965 NAME PROPERTY VALUE SOURCE
2966 pool/home/bob type filesystem -
2967 pool/home/bob creation Tue Jul 21 15:53 2009 -
2968 pool/home/bob used 21K -
2969 pool/home/bob available 20.0G -
2970 pool/home/bob referenced 21K -
2971 pool/home/bob compressratio 1.00x -
2972 pool/home/bob mounted yes -
2973 pool/home/bob quota 20G local
2974 pool/home/bob reservation none default
2975 pool/home/bob recordsize 128K default
2976 pool/home/bob mountpoint /home/bob default
2977 pool/home/bob sharenfs off default
2978 pool/home/bob checksum on default
2979 pool/home/bob compression on local
2980 pool/home/bob atime on default
2981 pool/home/bob devices on default
2982 pool/home/bob exec on default
2983 pool/home/bob setuid on default
2984 pool/home/bob readonly off default
2985 pool/home/bob jailed off default
2986 pool/home/bob snapdir hidden default
2987 pool/home/bob aclmode discard default
2988 pool/home/bob aclinherit restricted default
2989 pool/home/bob canmount on default
2990 pool/home/bob xattr on default
2991 pool/home/bob copies 1 default
2992 pool/home/bob version 5 -
2993 pool/home/bob utf8only off -
2994 pool/home/bob normalization none -
2995 pool/home/bob casesensitivity sensitive -
2996 pool/home/bob vscan off default
2997 pool/home/bob nbmand off default
2998 pool/home/bob sharesmb off default
2999 pool/home/bob refquota none default
3000 pool/home/bob refreservation none default
3001 pool/home/bob primarycache all default
3002 pool/home/bob secondarycache all default
3003 pool/home/bob usedbysnapshots 0 -
3004 pool/home/bob usedbydataset 21K -
3005 pool/home/bob usedbychildren 0 -
3006 pool/home/bob usedbyrefreservation 0 -
3007 pool/home/bob logbias latency default
3008 pool/home/bob dedup off default
3009 pool/home/bob mlslabel -
3010 pool/home/bob sync standard default
3011 pool/home/bob refcompressratio 1.00x -
3014 The following command gets a single property value.
3015 .Bd -literal -offset 2n
3016 .Li # Ic zfs get -H -o value compression pool/home/bob
3020 The following command lists all properties with local settings for
3022 .Bd -literal -offset 2n
3023 .Li # Ic zfs get -s local -o name,property,value all pool/home/bob
3025 pool/home/bob quota 20G
3026 pool/home/bob compression on
3028 .It Sy Example 8 No Rolling Back a Tn ZFS No File System
3030 The following command reverts the contents of
3032 to the snapshot named
3034 deleting all intermediate snapshots.
3035 .Bd -literal -offset 2n
3036 .Li # Ic zfs rollback -r pool/home/anne@yesterday
3038 .It Sy Example 9 No Creating a Tn ZFS No Clone
3040 The following command creates a writable file system whose initial contents are
3042 .Em pool/home/bob@yesterday .
3043 .Bd -literal -offset 2n
3044 .Li # Ic zfs clone pool/home/bob@yesterday pool/clone
3046 .It Sy Example 10 No Promoting a Tn ZFS No Clone
3048 The following commands illustrate how to test out changes to a file system, and
3049 then replace the original file system with the changed one, using clones, clone
3050 promotion, and renaming:
3051 .Bd -literal -offset 2n
3052 .Li # Ic zfs create pool/project/production
3056 .Pa /pool/project/production
3057 with data and continue with the following commands:
3058 .Bd -literal -offset 2n
3059 .Li # Ic zfs snapshot pool/project/production@today
3060 .Li # Ic zfs clone pool/project/production@today pool/project/beta
3064 .Pa /pool/project/beta
3065 and continue with the following commands:
3066 .Bd -literal -offset 2n
3067 .Li # Ic zfs promote pool/project/beta
3068 .Li # Ic zfs rename pool/project/production pool/project/legacy
3069 .Li # Ic zfs rename pool/project/beta pool/project/production
3072 Once the legacy version is no longer needed, it can be destroyed.
3073 .Bd -literal -offset 2n
3074 .Li # Ic zfs destroy pool/project/legacy
3076 .It Sy Example 11 No Inheriting Tn ZFS No Properties
3078 The following command causes
3084 property from their parent.
3085 .Bd -literal -offset 2n
3086 .Li # Ic zfs inherit checksum pool/home/bob pool/home/anne
3088 .It Sy Example 12 No Remotely Replicating Tn ZFS No Data
3090 The following commands send a full stream and then an incremental stream to a
3091 remote machine, restoring them into
3092 .Sy poolB/received/fs@a
3094 .Sy poolB/received/fs@b ,
3097 must contain the file system
3098 .Sy poolB/received ,
3099 and must not initially contain
3100 .Sy poolB/received/fs .
3101 .Bd -literal -offset 2n
3102 .Li # Ic zfs send pool/fs@a | ssh host zfs receive poolB/received/fs@a
3103 .Li # Ic zfs send -i a pool/fs@b | ssh host zfs receive poolB/received/fs
3112 The following command sends a full stream of
3113 .Sy poolA/fsA/fsB@snap
3114 to a remote machine, receiving it into
3115 .Sy poolB/received/fsA/fsB@snap .
3118 portion of the received snapshot's name is determined from the name of the sent
3121 must contain the file system
3122 .Sy poolB/received .
3124 .Sy poolB/received/fsA
3125 does not exist, it is created as an empty file system.
3126 .Bd -literal -offset 2n
3127 .Li # Ic zfs send poolA/fsA/fsB@snap | ssh host zfs receive -d poolB/received
3129 .It Sy Example 14 No Setting User Properties
3131 The following example sets the user-defined
3132 .Sy com.example:department
3133 property for a dataset.
3134 .Bd -literal -offset 2n
3135 .Li # Ic zfs set com.example:department=12345 tank/accounting
3137 .It Sy Example 15 No Performing a Rolling Snapshot
3139 The following example shows how to maintain a history of snapshots with a
3140 consistent naming scheme. To keep a week's worth of snapshots, the user
3141 destroys the oldest snapshot, renames the remaining snapshots, and then creates
3142 a new snapshot, as follows:
3143 .Bd -literal -offset 2n
3144 .Li # Ic zfs destroy -r pool/users@7daysago
3145 .Li # Ic zfs rename -r pool/users@6daysago @7daysago
3146 .Li # Ic zfs rename -r pool/users@5daysago @6daysago
3147 .Li # Ic zfs rename -r pool/users@4daysago @5daysago
3148 .Li # Ic zfs rename -r pool/users@3daysago @4daysago
3149 .Li # Ic zfs rename -r pool/users@2daysago @3daysago
3150 .Li # Ic zfs rename -r pool/users@yesterday @2daysago
3151 .Li # Ic zfs rename -r pool/users@today @yesterday
3152 .Li # Ic zfs snapshot -r pool/users@today
3158 Property Options on a ZFS File System
3161 The following command shows how to set
3163 property options to enable root access for a specific network on the
3165 file system. The contents of the
3170 .Bd -literal -offset 2n
3171 .Li # Ic zfs set sharenfs="maproot=root,network 192.168.0.0/24" tank/home
3174 Another way to write this command with the same result is:
3175 .Bd -literal -offset 2n
3176 .Li # Ic set zfs sharenfs="-maproot=root -network 192.168.0.0/24" tank/home
3182 Administration Permissions on a
3187 The following example shows how to set permissions so that user
3189 can create, destroy, mount, and take snapshots on
3194 .Bd -literal -offset 2n
3195 .Li # Ic zfs allow cindys create,destroy,mount,snapshot tank/cindys
3196 .Li # Ic zfs allow tank/cindys
3197 -------------------------------------------------------------
3198 Local+Descendent permissions on (tank/cindys)
3199 user cindys create,destroy,mount,snapshot
3200 -------------------------------------------------------------
3202 .It Sy Example 18 No Delegating Create Time Permissions on a Tn ZFS No Dataset
3204 The following example shows how to grant anyone in the group
3206 to create file systems in
3208 This syntax also allows staff members to destroy their own file systems, but
3209 not destroy anyone else's file system. The permissions on
3212 .Bd -literal -offset 2n
3213 .Li # Ic zfs allow staff create,mount tank/users
3214 .Li # Ic zfs allow -c destroy tank/users
3215 .Li # Ic zfs allow tank/users
3216 -------------------------------------------------------------
3217 Create time permissions on (tank/users)
3219 Local+Descendent permissions on (tank/users)
3220 group staff create,mount
3221 -------------------------------------------------------------
3225 Defining and Granting a Permission Set on a
3230 The following example shows how to define and grant a permission set on the
3232 file system. The permissions on
3235 .Bd -literal -offset 2n
3236 .Li # Ic zfs allow -s @pset create,destroy,snapshot,mount tank/users
3237 .Li # Ic zfs allow staff @pset tank/users
3238 .Li # Ic zfs allow tank/users
3239 -------------------------------------------------------------
3240 Permission sets on (tank/users)
3241 @pset create,destroy,mount,snapshot
3242 Create time permissions on (tank/users)
3244 Local+Descendent permissions on (tank/users)
3245 group staff @pset,create,mount
3246 -------------------------------------------------------------
3248 .It Sy Example 20 No Delegating Property Permissions on a Tn ZFS No Dataset
3250 The following example shows to grant the ability to set quotas and reservations
3253 file system. The permissions on
3256 .Bd -literal -offset 2n
3257 .Li # Ic zfs allow cindys quota,reservation users/home
3258 .Li # Ic zfs allow cindys
3259 -------------------------------------------------------------
3260 Local+Descendent permissions on (users/home)
3261 user cindys quota,reservation
3262 -------------------------------------------------------------
3263 .Li # Ic su - cindys
3264 .Li cindys% Ic zfs set quota=10G users/home/marks
3265 .Li cindys% Ic zfs get quota users/home/marks
3266 NAME PROPERTY VALUE SOURCE
3267 users/home/marks quota 10G local
3269 .It Sy Example 21 No Removing ZFS Delegated Permissions on a Tn ZFS No Dataset
3271 The following example shows how to remove the snapshot permission from the
3275 file system. The permissions on
3278 .Bd -literal -offset 2n
3279 .Li # Ic zfs unallow staff snapshot tank/users
3280 .Li # Ic zfs allow tank/users
3281 -------------------------------------------------------------
3282 Permission sets on (tank/users)
3283 @pset create,destroy,mount,snapshot
3284 Create time permissions on (tank/users)
3286 Local+Descendent permissions on (tank/users)
3287 group staff @pset,create,mount
3288 -------------------------------------------------------------
3290 .It Sy Example 22 Showing the differences between a snapshot and a ZFS Dataset
3292 The following example shows how to see what has changed between a prior
3293 snapshot of a ZFS Dataset and its current state. The
3295 option is used to indicate type information for the files affected.
3296 .Bd -literal -offset 2n
3297 .Li # Ic zfs diff tank/test@before tank/test
3299 M F /tank/test/linked (+1)
3300 R F /tank/test/oldname -> /tank/test/newname
3301 - F /tank/test/deleted
3302 + F /tank/test/created
3303 M F /tank/test/modified
3317 This manual page is a
3319 reimplementation of the
3323 modified and customized for
3325 and licensed under the
3326 Common Development and Distribution License
3331 implementation of this manual page was initially written by
3332 .An Martin Matuska Aq mm@FreeBSD.org .