xref: /freebsd/sys/contrib/openzfs/man/man7/zfsprops.7 (revision c7046f76)
1.\"
2.\" CDDL HEADER START
3.\"
4.\" The contents of this file are subject to the terms of the
5.\" Common Development and Distribution License (the "License").
6.\" You may not use this file except in compliance with the License.
7.\"
8.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9.\" or https://opensource.org/licenses/CDDL-1.0.
10.\" See the License for the specific language governing permissions
11.\" and limitations under the License.
12.\"
13.\" When distributing Covered Code, include this CDDL HEADER in each
14.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15.\" If applicable, add the following below this CDDL HEADER, with the
16.\" fields enclosed by brackets "[]" replaced with your own identifying
17.\" information: Portions Copyright [yyyy] [name of copyright owner]
18.\"
19.\" CDDL HEADER END
20.\"
21.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
22.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
23.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
24.\" Copyright (c) 2011, Pawel Jakub Dawidek <pjd@FreeBSD.org>
25.\" Copyright (c) 2012, Glen Barber <gjb@FreeBSD.org>
26.\" Copyright (c) 2012, Bryan Drewery <bdrewery@FreeBSD.org>
27.\" Copyright (c) 2013, Steven Hartland <smh@FreeBSD.org>
28.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
29.\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
30.\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
31.\" Copyright (c) 2014 Integros [integros.com]
32.\" Copyright (c) 2016 Nexenta Systems, Inc. All Rights Reserved.
33.\" Copyright (c) 2014, Xin LI <delphij@FreeBSD.org>
34.\" Copyright (c) 2014-2015, The FreeBSD Foundation, All Rights Reserved.
35.\" Copyright 2019 Richard Laager. All rights reserved.
36.\" Copyright 2018 Nexenta Systems, Inc.
37.\" Copyright 2019 Joyent, Inc.
38.\" Copyright (c) 2019, Kjeld Schouten-Lebbing
39.\"
40.Dd May 24, 2021
41.Dt ZFSPROPS 7
42.Os
43.
44.Sh NAME
45.Nm zfsprops
46.Nd native and user-defined properties of ZFS datasets
47.
48.Sh DESCRIPTION
49Properties are divided into two types, native properties and user-defined
50.Po or
51.Qq user
52.Pc
53properties.
54Native properties either export internal statistics or control ZFS behavior.
55In addition, native properties are either editable or read-only.
56User properties have no effect on ZFS behavior, but you can use them to annotate
57datasets in a way that is meaningful in your environment.
58For more information about user properties, see the
59.Sx User Properties
60section, below.
61.
62.Ss Native Properties
63Every dataset has a set of properties that export statistics about the dataset
64as well as control various behaviors.
65Properties are inherited from the parent unless overridden by the child.
66Some properties apply only to certain types of datasets
67.Pq file systems, volumes, or snapshots .
68.Pp
69The values of numeric properties can be specified using human-readable suffixes
70.Po for example,
71.Sy k ,
72.Sy KB ,
73.Sy M ,
74.Sy Gb ,
75and so forth, up to
76.Sy Z
77for zettabyte
78.Pc .
79The following are all valid
80.Pq and equal
81specifications:
82.Li 1536M, 1.5g, 1.50GB .
83.Pp
84The values of non-numeric properties are case sensitive and must be lowercase,
85except for
86.Sy mountpoint ,
87.Sy sharenfs ,
88and
89.Sy sharesmb .
90.Pp
91The following native properties consist of read-only statistics about the
92dataset.
93These properties can be neither set, nor inherited.
94Native properties apply to all dataset types unless otherwise noted.
95.Bl -tag -width "usedbyrefreservation"
96.It Sy available
97The amount of space available to the dataset and all its children, assuming that
98there is no other activity in the pool.
99Because space is shared within a pool, availability can be limited by any number
100of factors, including physical pool size, quotas, reservations, or other
101datasets within the pool.
102.Pp
103This property can also be referred to by its shortened column name,
104.Sy avail .
105.It Sy compressratio
106For non-snapshots, the compression ratio achieved for the
107.Sy used
108space of this dataset, expressed as a multiplier.
109The
110.Sy used
111property includes descendant datasets, and, for clones, does not include the
112space shared with the origin snapshot.
113For snapshots, the
114.Sy compressratio
115is the same as the
116.Sy refcompressratio
117property.
118Compression can be turned on by running:
119.Nm zfs Cm set Sy compression Ns = Ns Sy on Ar dataset .
120The default value is
121.Sy off .
122.It Sy createtxg
123The transaction group (txg) in which the dataset was created.
124Bookmarks have the same
125.Sy createtxg
126as the snapshot they are initially tied to.
127This property is suitable for ordering a list of snapshots,
128e.g. for incremental send and receive.
129.It Sy creation
130The time this dataset was created.
131.It Sy clones
132For snapshots, this property is a comma-separated list of filesystems or volumes
133which are clones of this snapshot.
134The clones'
135.Sy origin
136property is this snapshot.
137If the
138.Sy clones
139property is not empty, then this snapshot can not be destroyed
140.Po even with the
141.Fl r
142or
143.Fl f
144options
145.Pc .
146The roles of origin and clone can be swapped by promoting the clone with the
147.Nm zfs Cm promote
148command.
149.It Sy defer_destroy
150This property is
151.Sy on
152if the snapshot has been marked for deferred destroy by using the
153.Nm zfs Cm destroy Fl d
154command.
155Otherwise, the property is
156.Sy off .
157.It Sy encryptionroot
158For encrypted datasets, indicates where the dataset is currently inheriting its
159encryption key from.
160Loading or unloading a key for the
161.Sy encryptionroot
162will implicitly load / unload the key for any inheriting datasets (see
163.Nm zfs Cm load-key
164and
165.Nm zfs Cm unload-key
166for details).
167Clones will always share an
168encryption key with their origin.
169See the
170.Sx Encryption
171section of
172.Xr zfs-load-key 8
173for details.
174.It Sy filesystem_count
175The total number of filesystems and volumes that exist under this location in
176the dataset tree.
177This value is only available when a
178.Sy filesystem_limit
179has been set somewhere in the tree under which the dataset resides.
180.It Sy keystatus
181Indicates if an encryption key is currently loaded into ZFS.
182The possible values are
183.Sy none ,
184.Sy available ,
185and
186.Sy unavailable .
187See
188.Nm zfs Cm load-key
189and
190.Nm zfs Cm unload-key .
191.It Sy guid
192The 64 bit GUID of this dataset or bookmark which does not change over its
193entire lifetime.
194When a snapshot is sent to another pool, the received snapshot has the same GUID.
195Thus, the
196.Sy guid
197is suitable to identify a snapshot across pools.
198.It Sy logicalreferenced
199The amount of space that is
200.Qq logically
201accessible by this dataset.
202See the
203.Sy referenced
204property.
205The logical space ignores the effect of the
206.Sy compression
207and
208.Sy copies
209properties, giving a quantity closer to the amount of data that applications
210see.
211However, it does include space consumed by metadata.
212.Pp
213This property can also be referred to by its shortened column name,
214.Sy lrefer .
215.It Sy logicalused
216The amount of space that is
217.Qq logically
218consumed by this dataset and all its descendents.
219See the
220.Sy used
221property.
222The logical space ignores the effect of the
223.Sy compression
224and
225.Sy copies
226properties, giving a quantity closer to the amount of data that applications
227see.
228However, it does include space consumed by metadata.
229.Pp
230This property can also be referred to by its shortened column name,
231.Sy lused .
232.It Sy mounted
233For file systems, indicates whether the file system is currently mounted.
234This property can be either
235.Sy yes
236or
237.Sy no .
238.It Sy objsetid
239A unique identifier for this dataset within the pool.
240Unlike the dataset's
241.Sy guid , No the Sy objsetid
242of a dataset is not transferred to other pools when the snapshot is copied
243with a send/receive operation.
244The
245.Sy objsetid
246can be reused (for a new dataset) after the dataset is deleted.
247.It Sy origin
248For cloned file systems or volumes, the snapshot from which the clone was
249created.
250See also the
251.Sy clones
252property.
253.It Sy receive_resume_token
254For filesystems or volumes which have saved partially-completed state from
255.Nm zfs Cm receive Fl s ,
256this opaque token can be provided to
257.Nm zfs Cm send Fl t
258to resume and complete the
259.Nm zfs Cm receive .
260.It Sy redact_snaps
261For bookmarks, this is the list of snapshot guids the bookmark contains a redaction
262list for.
263For snapshots, this is the list of snapshot guids the snapshot is redacted with
264respect to.
265.It Sy referenced
266The amount of data that is accessible by this dataset, which may or may not be
267shared with other datasets in the pool.
268When a snapshot or clone is created, it initially references the same amount of
269space as the file system or snapshot it was created from, since its contents are
270identical.
271.Pp
272This property can also be referred to by its shortened column name,
273.Sy refer .
274.It Sy refcompressratio
275The compression ratio achieved for the
276.Sy referenced
277space of this dataset, expressed as a multiplier.
278See also the
279.Sy compressratio
280property.
281.It Sy snapshot_count
282The total number of snapshots that exist under this location in the dataset
283tree.
284This value is only available when a
285.Sy snapshot_limit
286has been set somewhere in the tree under which the dataset resides.
287.It Sy type
288The type of dataset:
289.Sy filesystem ,
290.Sy volume ,
291.Sy snapshot ,
292or
293.Sy bookmark .
294.It Sy used
295The amount of space consumed by this dataset and all its descendents.
296This is the value that is checked against this dataset's quota and reservation.
297The space used does not include this dataset's reservation, but does take into
298account the reservations of any descendent datasets.
299The amount of space that a dataset consumes from its parent, as well as the
300amount of space that is freed if this dataset is recursively destroyed, is the
301greater of its space used and its reservation.
302.Pp
303The used space of a snapshot
304.Po see the
305.Sx Snapshots
306section of
307.Xr zfsconcepts 7
308.Pc
309is space that is referenced exclusively by this snapshot.
310If this snapshot is destroyed, the amount of
311.Sy used
312space will be freed.
313Space that is shared by multiple snapshots isn't accounted for in this metric.
314When a snapshot is destroyed, space that was previously shared with this
315snapshot can become unique to snapshots adjacent to it, thus changing the used
316space of those snapshots.
317The used space of the latest snapshot can also be affected by changes in the
318file system.
319Note that the
320.Sy used
321space of a snapshot is a subset of the
322.Sy written
323space of the snapshot.
324.Pp
325The amount of space used, available, or referenced does not take into account
326pending changes.
327Pending changes are generally accounted for within a few seconds.
328Committing a change to a disk using
329.Xr fsync 2
330or
331.Sy O_SYNC
332does not necessarily guarantee that the space usage information is updated
333immediately.
334.It Sy usedby*
335The
336.Sy usedby*
337properties decompose the
338.Sy used
339properties into the various reasons that space is used.
340Specifically,
341.Sy used No =
342.Sy usedbychildren No +
343.Sy usedbydataset No +
344.Sy usedbyrefreservation No +
345.Sy usedbysnapshots .
346These properties are only available for datasets created on
347.Nm zpool
348.Qo version 13 Qc
349pools.
350.It Sy usedbychildren
351The amount of space used by children of this dataset, which would be freed if
352all the dataset's children were destroyed.
353.It Sy usedbydataset
354The amount of space used by this dataset itself, which would be freed if the
355dataset were destroyed
356.Po after first removing any
357.Sy refreservation
358and destroying any necessary snapshots or descendents
359.Pc .
360.It Sy usedbyrefreservation
361The amount of space used by a
362.Sy refreservation
363set on this dataset, which would be freed if the
364.Sy refreservation
365was removed.
366.It Sy usedbysnapshots
367The amount of space consumed by snapshots of this dataset.
368In particular, it is the amount of space that would be freed if all of this
369dataset's snapshots were destroyed.
370Note that this is not simply the sum of the snapshots'
371.Sy used
372properties because space can be shared by multiple snapshots.
373.It Sy userused Ns @ Ns Ar user
374The amount of space consumed by the specified user in this dataset.
375Space is charged to the owner of each file, as displayed by
376.Nm ls Fl l .
377The amount of space charged is displayed by
378.Nm du No and Nm ls Fl s .
379See the
380.Nm zfs Cm userspace
381command for more information.
382.Pp
383Unprivileged users can access only their own space usage.
384The root user, or a user who has been granted the
385.Sy userused
386privilege with
387.Nm zfs Cm allow ,
388can access everyone's usage.
389.Pp
390The
391.Sy userused Ns @ Ns Ar …
392properties are not displayed by
393.Nm zfs Cm get Sy all .
394The user's name must be appended after the
395.Sy @
396symbol, using one of the following forms:
397.Bl -bullet -compact -offset 4n
398.It
399POSIX name
400.Pq Qq joe
401.It
402POSIX numeric ID
403.Pq Qq 789
404.It
405SID name
406.Pq Qq joe.smith@mydomain
407.It
408SID numeric ID
409.Pq Qq S-1-123-456-789
410.El
411.Pp
412Files created on Linux always have POSIX owners.
413.It Sy userobjused Ns @ Ns Ar user
414The
415.Sy userobjused
416property is similar to
417.Sy userused
418but instead it counts the number of objects consumed by a user.
419This property counts all objects allocated on behalf of the user,
420it may differ from the results of system tools such as
421.Nm df Fl i .
422.Pp
423When the property
424.Sy xattr Ns = Ns Sy on
425is set on a file system additional objects will be created per-file to store
426extended attributes.
427These additional objects are reflected in the
428.Sy userobjused
429value and are counted against the user's
430.Sy userobjquota .
431When a file system is configured to use
432.Sy xattr Ns = Ns Sy sa
433no additional internal objects are normally required.
434.It Sy userrefs
435This property is set to the number of user holds on this snapshot.
436User holds are set by using the
437.Nm zfs Cm hold
438command.
439.It Sy groupused Ns @ Ns Ar group
440The amount of space consumed by the specified group in this dataset.
441Space is charged to the group of each file, as displayed by
442.Nm ls Fl l .
443See the
444.Sy userused Ns @ Ns Ar user
445property for more information.
446.Pp
447Unprivileged users can only access their own groups' space usage.
448The root user, or a user who has been granted the
449.Sy groupused
450privilege with
451.Nm zfs Cm allow ,
452can access all groups' usage.
453.It Sy groupobjused Ns @ Ns Ar group
454The number of objects consumed by the specified group in this dataset.
455Multiple objects may be charged to the group for each file when extended
456attributes are in use.
457See the
458.Sy userobjused Ns @ Ns Ar user
459property for more information.
460.Pp
461Unprivileged users can only access their own groups' space usage.
462The root user, or a user who has been granted the
463.Sy groupobjused
464privilege with
465.Nm zfs Cm allow ,
466can access all groups' usage.
467.It Sy projectused Ns @ Ns Ar project
468The amount of space consumed by the specified project in this dataset.
469Project is identified via the project identifier (ID) that is object-based
470numeral attribute.
471An object can inherit the project ID from its parent object (if the
472parent has the flag of inherit project ID that can be set and changed via
473.Nm chattr Fl /+P
474or
475.Nm zfs project Fl s )
476when being created.
477The privileged user can set and change object's project
478ID via
479.Nm chattr Fl p
480or
481.Nm zfs project Fl s
482anytime.
483Space is charged to the project of each file, as displayed by
484.Nm lsattr Fl p
485or
486.Nm zfs project .
487See the
488.Sy userused Ns @ Ns Ar user
489property for more information.
490.Pp
491The root user, or a user who has been granted the
492.Sy projectused
493privilege with
494.Nm zfs allow ,
495can access all projects' usage.
496.It Sy projectobjused Ns @ Ns Ar project
497The
498.Sy projectobjused
499is similar to
500.Sy projectused
501but instead it counts the number of objects consumed by project.
502When the property
503.Sy xattr Ns = Ns Sy on
504is set on a fileset, ZFS will create additional objects per-file to store
505extended attributes.
506These additional objects are reflected in the
507.Sy projectobjused
508value and are counted against the project's
509.Sy projectobjquota .
510When a filesystem is configured to use
511.Sy xattr Ns = Ns Sy sa
512no additional internal objects are required.
513See the
514.Sy userobjused Ns @ Ns Ar user
515property for more information.
516.Pp
517The root user, or a user who has been granted the
518.Sy projectobjused
519privilege with
520.Nm zfs allow ,
521can access all projects' objects usage.
522.It Sy snapshots_changed
523Provides a mechanism to quickly determine whether snapshot list has
524changed without having to mount a dataset or iterate the snapshot list.
525Specifies the time at which a snapshot for a dataset was last
526created or deleted.
527.Pp
528This allows us to be more efficient how often we query snapshots.
529The property is persistent across mount and unmount operations only if the
530.Sy extensible_dataset
531feature is enabled.
532.It Sy volblocksize
533For volumes, specifies the block size of the volume.
534The
535.Sy blocksize
536cannot be changed once the volume has been written, so it should be set at
537volume creation time.
538The default
539.Sy blocksize
540for volumes is 16 Kbytes.
541Any power of 2 from 512 bytes to 128 Kbytes is valid.
542.Pp
543This property can also be referred to by its shortened column name,
544.Sy volblock .
545.It Sy written
546The amount of space
547.Sy referenced
548by this dataset, that was written since the previous snapshot
549.Pq i.e. that is not referenced by the previous snapshot .
550.It Sy written Ns @ Ns Ar snapshot
551The amount of
552.Sy referenced
553space written to this dataset since the specified snapshot.
554This is the space that is referenced by this dataset but was not referenced by
555the specified snapshot.
556.Pp
557The
558.Ar snapshot
559may be specified as a short snapshot name
560.Pq just the part after the Sy @ ,
561in which case it will be interpreted as a snapshot in the same filesystem as
562this dataset.
563The
564.Ar snapshot
565may be a full snapshot name
566.Pq Ar filesystem Ns @ Ns Ar snapshot ,
567which for clones may be a snapshot in the origin's filesystem
568.Pq or the origin of the origin's filesystem, etc.
569.El
570.Pp
571The following native properties can be used to change the behavior of a ZFS
572dataset.
573.Bl -tag -width ""
574.It Xo
575.Sy aclinherit Ns = Ns Sy discard Ns | Ns Sy noallow Ns | Ns
576.Sy restricted Ns | Ns Sy passthrough Ns | Ns Sy passthrough-x
577.Xc
578Controls how ACEs are inherited when files and directories are created.
579.Bl -tag -compact -offset 4n -width "passthrough-x"
580.It Sy discard
581does not inherit any ACEs.
582.It Sy noallow
583only inherits inheritable ACEs that specify
584.Qq deny
585permissions.
586.It Sy restricted
587default, removes the
588.Sy write_acl
589and
590.Sy write_owner
591permissions when the ACE is inherited.
592.It Sy passthrough
593inherits all inheritable ACEs without any modifications.
594.It Sy passthrough-x
595same meaning as
596.Sy passthrough ,
597except that the
598.Sy owner@ , group@ , No and Sy everyone@
599ACEs inherit the execute permission only if the file creation mode also requests
600the execute bit.
601.El
602.Pp
603When the property value is set to
604.Sy passthrough ,
605files are created with a mode determined by the inheritable ACEs.
606If no inheritable ACEs exist that affect the mode, then the mode is set in
607accordance to the requested mode from the application.
608.Pp
609The
610.Sy aclinherit
611property does not apply to POSIX ACLs.
612.It Xo
613.Sy aclmode Ns = Ns Sy discard Ns | Ns Sy groupmask Ns | Ns
614.Sy passthrough Ns | Ns Sy restricted Ns
615.Xc
616Controls how an ACL is modified during chmod(2) and how inherited ACEs
617are modified by the file creation mode:
618.Bl -tag -compact -offset 4n -width "passthrough"
619.It Sy discard
620default, deletes all
621.Sy ACEs
622except for those representing
623the mode of the file or directory requested by
624.Xr chmod 2 .
625.It Sy groupmask
626reduces permissions granted in all
627.Sy ALLOW
628entries found in the
629.Sy ACL
630such that they are no greater than the group permissions specified by
631.Xr chmod 2 .
632.It Sy passthrough
633indicates that no changes are made to the ACL other than creating or updating
634the necessary ACL entries to represent the new mode of the file or directory.
635.It Sy restricted
636will cause the
637.Xr chmod 2
638operation to return an error when used on any file or directory which has
639a non-trivial ACL whose entries can not be represented by a mode.
640.Xr chmod 2
641is required to change the set user ID, set group ID, or sticky bits on a file
642or directory, as they do not have equivalent ACL entries.
643In order to use
644.Xr chmod 2
645on a file or directory with a non-trivial ACL when
646.Sy aclmode
647is set to
648.Sy restricted ,
649you must first remove all ACL entries which do not represent the current mode.
650.El
651.It Sy acltype Ns = Ns Sy off Ns | Ns Sy nfsv4 Ns | Ns Sy posix
652Controls whether ACLs are enabled and if so what type of ACL to use.
653When this property is set to a type of ACL not supported by the current
654platform, the behavior is the same as if it were set to
655.Sy off .
656.Bl -tag -compact -offset 4n -width "posixacl"
657.It Sy off
658default on Linux, when a file system has the
659.Sy acltype
660property set to off then ACLs are disabled.
661.It Sy noacl
662an alias for
663.Sy off
664.It Sy nfsv4
665default on
666.Fx ,
667indicates that NFSv4-style ZFS ACLs should be used.
668These ACLs can be managed with the
669.Xr getfacl 1
670and
671.Xr setfacl 1 .
672The
673.Sy nfsv4
674ZFS ACL type is not yet supported on Linux.
675.It Sy posix
676indicates POSIX ACLs should be used.
677POSIX ACLs are specific to Linux and are not functional on other platforms.
678POSIX ACLs are stored as an extended
679attribute and therefore will not overwrite any existing NFSv4 ACLs which
680may be set.
681.It Sy posixacl
682an alias for
683.Sy posix
684.El
685.Pp
686To obtain the best performance when setting
687.Sy posix
688users are strongly encouraged to set the
689.Sy xattr Ns = Ns Sy sa
690property.
691This will result in the POSIX ACL being stored more efficiently on disk.
692But as a consequence, all new extended attributes will only be
693accessible from OpenZFS implementations which support the
694.Sy xattr Ns = Ns Sy sa
695property.
696See the
697.Sy xattr
698property for more details.
699.It Sy atime Ns = Ns Sy on Ns | Ns Sy off
700Controls whether the access time for files is updated when they are read.
701Turning this property off avoids producing write traffic when reading files and
702can result in significant performance gains, though it might confuse mailers
703and other similar utilities.
704The values
705.Sy on
706and
707.Sy off
708are equivalent to the
709.Sy atime
710and
711.Sy noatime
712mount options.
713The default value is
714.Sy on .
715See also
716.Sy relatime
717below.
718.It Sy canmount Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy noauto
719If this property is set to
720.Sy off ,
721the file system cannot be mounted, and is ignored by
722.Nm zfs Cm mount Fl a .
723Setting this property to
724.Sy off
725is similar to setting the
726.Sy mountpoint
727property to
728.Sy none ,
729except that the dataset still has a normal
730.Sy mountpoint
731property, which can be inherited.
732Setting this property to
733.Sy off
734allows datasets to be used solely as a mechanism to inherit properties.
735One example of setting
736.Sy canmount Ns = Ns Sy off
737is to have two datasets with the same
738.Sy mountpoint ,
739so that the children of both datasets appear in the same directory, but might
740have different inherited characteristics.
741.Pp
742When set to
743.Sy noauto ,
744a dataset can only be mounted and unmounted explicitly.
745The dataset is not mounted automatically when the dataset is created or
746imported, nor is it mounted by the
747.Nm zfs Cm mount Fl a
748command or unmounted by the
749.Nm zfs Cm unmount Fl a
750command.
751.Pp
752This property is not inherited.
753.It Xo
754.Sy checksum Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy fletcher2 Ns | Ns
755.Sy fletcher4 Ns | Ns Sy sha256 Ns | Ns Sy noparity Ns | Ns
756.Sy sha512 Ns | Ns Sy skein Ns | Ns Sy edonr Ns | Ns Sy blake3
757.Xc
758Controls the checksum used to verify data integrity.
759The default value is
760.Sy on ,
761which automatically selects an appropriate algorithm
762.Po currently,
763.Sy fletcher4 ,
764but this may change in future releases
765.Pc .
766The value
767.Sy off
768disables integrity checking on user data.
769The value
770.Sy noparity
771not only disables integrity but also disables maintaining parity for user data.
772This setting is used internally by a dump device residing on a RAID-Z pool and
773should not be used by any other dataset.
774Disabling checksums is
775.Em NOT
776a recommended practice.
777.Pp
778The
779.Sy sha512 ,
780.Sy skein ,
781.Sy edonr ,
782and
783.Sy blake3
784checksum algorithms require enabling the appropriate features on the pool.
785.Pp
786Please see
787.Xr zpool-features 7
788for more information on these algorithms.
789.Pp
790Changing this property affects only newly-written data.
791.It Xo
792.Sy compression Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy gzip Ns | Ns
793.Sy gzip- Ns Ar N Ns | Ns Sy lz4 Ns | Ns Sy lzjb Ns | Ns Sy zle Ns | Ns Sy zstd Ns | Ns
794.Sy zstd- Ns Ar N Ns | Ns Sy zstd-fast Ns | Ns Sy zstd-fast- Ns Ar N
795.Xc
796Controls the compression algorithm used for this dataset.
797.Pp
798When set to
799.Sy on
800(the default), indicates that the current default compression algorithm should be used.
801The default balances compression and decompression speed, with compression ratio
802and is expected to work well on a wide variety of workloads.
803Unlike all other settings for this property,
804.Sy on
805does not select a fixed compression type.
806As new compression algorithms are added to ZFS and enabled on a pool, the
807default compression algorithm may change.
808The current default compression algorithm is either
809.Sy lzjb
810or, if the
811.Sy lz4_compress
812feature is enabled,
813.Sy lz4 .
814.Pp
815The
816.Sy lz4
817compression algorithm is a high-performance replacement for the
818.Sy lzjb
819algorithm.
820It features significantly faster compression and decompression, as well as a
821moderately higher compression ratio than
822.Sy lzjb ,
823but can only be used on pools with the
824.Sy lz4_compress
825feature set to
826.Sy enabled .
827See
828.Xr zpool-features 7
829for details on ZFS feature flags and the
830.Sy lz4_compress
831feature.
832.Pp
833The
834.Sy lzjb
835compression algorithm is optimized for performance while providing decent data
836compression.
837.Pp
838The
839.Sy gzip
840compression algorithm uses the same compression as the
841.Xr gzip 1
842command.
843You can specify the
844.Sy gzip
845level by using the value
846.Sy gzip- Ns Ar N ,
847where
848.Ar N
849is an integer from 1
850.Pq fastest
851to 9
852.Pq best compression ratio .
853Currently,
854.Sy gzip
855is equivalent to
856.Sy gzip-6
857.Po which is also the default for
858.Xr gzip 1
859.Pc .
860.Pp
861The
862.Sy zstd
863compression algorithm provides both high compression ratios and good performance.
864You can specify the
865.Sy zstd
866level by using the value
867.Sy zstd- Ns Ar N ,
868where
869.Ar N
870is an integer from 1
871.Pq fastest
872to 19
873.Pq best compression ratio .
874.Sy zstd
875is equivalent to
876.Sy zstd-3 .
877.Pp
878Faster speeds at the cost of the compression ratio can be requested by
879setting a negative
880.Sy zstd
881level.
882This is done using
883.Sy zstd-fast- Ns Ar N ,
884where
885.Ar N
886is an integer in
887.Bq Sy 1 Ns - Ns Sy 10 , 20 , 30 , No … , Sy 100 , 500 , 1000
888which maps to a negative
889.Sy zstd
890level.
891The lower the level the faster the compression \(em
892.Sy 1000
893provides the fastest compression and lowest compression ratio.
894.Sy zstd-fast
895is equivalent to
896.Sy zstd-fast- Ns Ar 1 .
897.Pp
898The
899.Sy zle
900compression algorithm compresses runs of zeros.
901.Pp
902This property can also be referred to by its shortened column name
903.Sy compress .
904Changing this property affects only newly-written data.
905.Pp
906When any setting except
907.Sy off
908is selected, compression will explicitly check for blocks consisting of only
909zeroes (the NUL byte).
910When a zero-filled block is detected, it is stored as
911a hole and not compressed using the indicated compression algorithm.
912.Pp
913Any block being compressed must be no larger than 7/8 of its original size
914after compression, otherwise the compression will not be considered worthwhile
915and the block saved uncompressed.
916Note that when the logical block is less than
9178 times the disk sector size this effectively reduces the necessary compression
918ratio; for example, 8 KiB blocks on disks with 4 KiB disk sectors must compress to 1/2
919or less of their original size.
920.It Xo
921.Sy context Ns = Ns Sy none Ns | Ns
922.Ar SELinux-User : Ns Ar SELinux-Role : Ns Ar SELinux-Type : Ns Ar Sensitivity-Level
923.Xc
924This flag sets the SELinux context for all files in the file system under
925a mount point for that file system.
926See
927.Xr selinux 8
928for more information.
929.It Xo
930.Sy fscontext Ns = Ns Sy none Ns | Ns
931.Ar SELinux-User : Ns Ar SELinux-Role : Ns Ar SELinux-Type : Ns Ar Sensitivity-Level
932.Xc
933This flag sets the SELinux context for the file system file system being
934mounted.
935See
936.Xr selinux 8
937for more information.
938.It Xo
939.Sy defcontext Ns = Ns Sy none Ns | Ns
940.Ar SELinux-User : Ns Ar SELinux-Role : Ns Ar SELinux-Type : Ns Ar Sensitivity-Level
941.Xc
942This flag sets the SELinux default context for unlabeled files.
943See
944.Xr selinux 8
945for more information.
946.It Xo
947.Sy rootcontext Ns = Ns Sy none Ns | Ns
948.Ar SELinux-User : Ns Ar SELinux-Role : Ns Ar SELinux-Type : Ns Ar Sensitivity-Level
949.Xc
950This flag sets the SELinux context for the root inode of the file system.
951See
952.Xr selinux 8
953for more information.
954.It Sy copies Ns = Ns Sy 1 Ns | Ns Sy 2 Ns | Ns Sy 3
955Controls the number of copies of data stored for this dataset.
956These copies are in addition to any redundancy provided by the pool, for
957example, mirroring or RAID-Z.
958The copies are stored on different disks, if possible.
959The space used by multiple copies is charged to the associated file and dataset,
960changing the
961.Sy used
962property and counting against quotas and reservations.
963.Pp
964Changing this property only affects newly-written data.
965Therefore, set this property at file system creation time by using the
966.Fl o Sy copies Ns = Ns Ar N
967option.
968.Pp
969Remember that ZFS will not import a pool with a missing top-level vdev.
970Do
971.Em NOT
972create, for example a two-disk striped pool and set
973.Sy copies Ns = Ns Ar 2
974on some datasets thinking you have setup redundancy for them.
975When a disk fails you will not be able to import the pool
976and will have lost all of your data.
977.Pp
978Encrypted datasets may not have
979.Sy copies Ns = Ns Ar 3
980since the implementation stores some encryption metadata where the third copy
981would normally be.
982.It Sy devices Ns = Ns Sy on Ns | Ns Sy off
983Controls whether device nodes can be opened on this file system.
984The default value is
985.Sy on .
986The values
987.Sy on
988and
989.Sy off
990are equivalent to the
991.Sy dev
992and
993.Sy nodev
994mount options.
995.It Xo
996.Sy dedup Ns = Ns Sy off Ns | Ns Sy on Ns | Ns Sy verify Ns | Ns
997.Sy sha256 Ns Oo , Ns Sy verify Oc Ns | Ns Sy sha512 Ns Oo , Ns Sy verify Oc Ns | Ns Sy skein Ns Oo , Ns Sy verify Oc Ns | Ns
998.Sy edonr , Ns Sy verify Ns | Ns Sy blake3 Ns Oo , Ns Sy verify Oc Ns
999.Xc
1000Configures deduplication for a dataset.
1001The default value is
1002.Sy off .
1003The default deduplication checksum is
1004.Sy sha256
1005(this may change in the future).
1006When
1007.Sy dedup
1008is enabled, the checksum defined here overrides the
1009.Sy checksum
1010property.
1011Setting the value to
1012.Sy verify
1013has the same effect as the setting
1014.Sy sha256 , Ns Sy verify .
1015.Pp
1016If set to
1017.Sy verify ,
1018ZFS will do a byte-to-byte comparison in case of two blocks having the same
1019signature to make sure the block contents are identical.
1020Specifying
1021.Sy verify
1022is mandatory for the
1023.Sy edonr
1024algorithm.
1025.Pp
1026Unless necessary, deduplication should
1027.Em not
1028be enabled on a system.
1029See the
1030.Sx Deduplication
1031section of
1032.Xr zfsconcepts 7 .
1033.It Xo
1034.Sy dnodesize Ns = Ns Sy legacy Ns | Ns Sy auto Ns | Ns Sy 1k Ns | Ns
1035.Sy 2k Ns | Ns Sy 4k Ns | Ns Sy 8k Ns | Ns Sy 16k
1036.Xc
1037Specifies a compatibility mode or literal value for the size of dnodes in the
1038file system.
1039The default value is
1040.Sy legacy .
1041Setting this property to a value other than
1042.Sy legacy No requires the Sy large_dnode No pool feature to be enabled.
1043.Pp
1044Consider setting
1045.Sy dnodesize
1046to
1047.Sy auto
1048if the dataset uses the
1049.Sy xattr Ns = Ns Sy sa
1050property setting and the workload makes heavy use of extended attributes.
1051This
1052may be applicable to SELinux-enabled systems, Lustre servers, and Samba
1053servers, for example.
1054Literal values are supported for cases where the optimal
1055size is known in advance and for performance testing.
1056.Pp
1057Leave
1058.Sy dnodesize
1059set to
1060.Sy legacy
1061if you need to receive a send stream of this dataset on a pool that doesn't
1062enable the
1063.Sy large_dnode
1064feature, or if you need to import this pool on a system that doesn't support the
1065.Sy large_dnode No feature.
1066.Pp
1067This property can also be referred to by its shortened column name,
1068.Sy dnsize .
1069.It Xo
1070.Sy encryption Ns = Ns Sy off Ns | Ns Sy on Ns | Ns Sy aes-128-ccm Ns | Ns
1071.Sy aes-192-ccm Ns | Ns Sy aes-256-ccm Ns | Ns Sy aes-128-gcm Ns | Ns
1072.Sy aes-192-gcm Ns | Ns Sy aes-256-gcm
1073.Xc
1074Controls the encryption cipher suite (block cipher, key length, and mode) used
1075for this dataset.
1076Requires the
1077.Sy encryption
1078feature to be enabled on the pool.
1079Requires a
1080.Sy keyformat
1081to be set at dataset creation time.
1082.Pp
1083Selecting
1084.Sy encryption Ns = Ns Sy on
1085when creating a dataset indicates that the default encryption suite will be
1086selected, which is currently
1087.Sy aes-256-gcm .
1088In order to provide consistent data protection, encryption must be specified at
1089dataset creation time and it cannot be changed afterwards.
1090.Pp
1091For more details and caveats about encryption see the
1092.Sx Encryption
1093section of
1094.Xr zfs-load-key 8 .
1095.It Sy keyformat Ns = Ns Sy raw Ns | Ns Sy hex Ns | Ns Sy passphrase
1096Controls what format the user's encryption key will be provided as.
1097This property is only set when the dataset is encrypted.
1098.Pp
1099Raw keys and hex keys must be 32 bytes long (regardless of the chosen
1100encryption suite) and must be randomly generated.
1101A raw key can be generated with the following command:
1102.Dl # Nm dd Sy if=/dev/urandom bs=32 count=1 Sy of= Ns Pa /path/to/output/key
1103.Pp
1104Passphrases must be between 8 and 512 bytes long and will be processed through
1105PBKDF2 before being used (see the
1106.Sy pbkdf2iters
1107property).
1108Even though the encryption suite cannot be changed after dataset creation,
1109the keyformat can be with
1110.Nm zfs Cm change-key .
1111.It Xo
1112.Sy keylocation Ns = Ns Sy prompt Ns | Ns Sy file:// Ns Ar /absolute/file/path Ns | Ns Sy https:// Ns Ar address Ns | Ns Sy http:// Ns Ar address
1113.Xc
1114Controls where the user's encryption key will be loaded from by default for
1115commands such as
1116.Nm zfs Cm load-key
1117and
1118.Nm zfs Cm mount Fl l .
1119This property is only set for encrypted datasets which are encryption roots.
1120If unspecified, the default is
1121.Sy prompt .
1122.Pp
1123Even though the encryption suite cannot be changed after dataset creation, the
1124keylocation can be with either
1125.Nm zfs Cm set
1126or
1127.Nm zfs Cm change-key .
1128If
1129.Sy prompt
1130is selected ZFS will ask for the key at the command prompt when it is required
1131to access the encrypted data (see
1132.Nm zfs Cm load-key
1133for details).
1134This setting will also allow the key to be passed in via the standard input stream,
1135but users should be careful not to place keys which should be kept secret on
1136the command line.
1137If a file URI is selected, the key will be loaded from the
1138specified absolute file path.
1139If an HTTPS or HTTP URL is selected, it will be GETted using
1140.Xr fetch 3 ,
1141libcurl, or nothing, depending on compile-time configuration and run-time availability.
1142The
1143.Sy SSL_CA_CERT_FILE
1144environment variable can be set to set the location
1145of the concatenated certificate store.
1146The
1147.Sy SSL_CA_CERT_PATH
1148environment variable can be set to override the location
1149of the directory containing the certificate authority bundle.
1150The
1151.Sy SSL_CLIENT_CERT_FILE
1152and
1153.Sy SSL_CLIENT_KEY_FILE
1154environment variables can be set to configure the path
1155to the client certificate and its key.
1156.It Sy pbkdf2iters Ns = Ns Ar iterations
1157Controls the number of PBKDF2 iterations that a
1158.Sy passphrase
1159encryption key should be run through when processing it into an encryption key.
1160This property is only defined when encryption is enabled and a keyformat of
1161.Sy passphrase
1162is selected.
1163The goal of PBKDF2 is to significantly increase the
1164computational difficulty needed to brute force a user's passphrase.
1165This is accomplished by forcing the attacker to run each passphrase through a
1166computationally expensive hashing function many times before they arrive at the
1167resulting key.
1168A user who actually knows the passphrase will only have to pay this cost once.
1169As CPUs become better at processing, this number should be
1170raised to ensure that a brute force attack is still not possible.
1171The current default is
1172.Sy 350000
1173and the minimum is
1174.Sy 100000 .
1175This property may be changed with
1176.Nm zfs Cm change-key .
1177.It Sy exec Ns = Ns Sy on Ns | Ns Sy off
1178Controls whether processes can be executed from within this file system.
1179The default value is
1180.Sy on .
1181The values
1182.Sy on
1183and
1184.Sy off
1185are equivalent to the
1186.Sy exec
1187and
1188.Sy noexec
1189mount options.
1190.It Sy filesystem_limit Ns = Ns Ar count Ns | Ns Sy none
1191Limits the number of filesystems and volumes that can exist under this point in
1192the dataset tree.
1193The limit is not enforced if the user is allowed to change the limit.
1194Setting a
1195.Sy filesystem_limit
1196to
1197.Sy on
1198a descendent of a filesystem that already has a
1199.Sy filesystem_limit
1200does not override the ancestor's
1201.Sy filesystem_limit ,
1202but rather imposes an additional limit.
1203This feature must be enabled to be used
1204.Po see
1205.Xr zpool-features 7
1206.Pc .
1207.It Sy special_small_blocks Ns = Ns Ar size
1208This value represents the threshold block size for including small file
1209blocks into the special allocation class.
1210Blocks smaller than or equal to this
1211value will be assigned to the special allocation class while greater blocks
1212will be assigned to the regular class.
1213Valid values are zero or a power of two from 512 up to 1048576 (1 MiB).
1214The default size is 0 which means no small file blocks
1215will be allocated in the special class.
1216.Pp
1217Before setting this property, a special class vdev must be added to the
1218pool.
1219See
1220.Xr zpoolconcepts 7
1221for more details on the special allocation class.
1222.It Sy mountpoint Ns = Ns Pa path Ns | Ns Sy none Ns | Ns Sy legacy
1223Controls the mount point used for this file system.
1224See the
1225.Sx Mount Points
1226section of
1227.Xr zfsconcepts 7
1228for more information on how this property is used.
1229.Pp
1230When the
1231.Sy mountpoint
1232property is changed for a file system, the file system and any children that
1233inherit the mount point are unmounted.
1234If the new value is
1235.Sy legacy ,
1236then they remain unmounted.
1237Otherwise, they are automatically remounted in the new location if the property
1238was previously
1239.Sy legacy
1240or
1241.Sy none ,
1242or if they were mounted before the property was changed.
1243In addition, any shared file systems are unshared and shared in the new
1244location.
1245.It Sy nbmand Ns = Ns Sy on Ns | Ns Sy off
1246Controls whether the file system should be mounted with
1247.Sy nbmand
1248.Pq Non-blocking mandatory locks .
1249This is used for SMB clients.
1250Changes to this property only take effect when the file system is umounted and
1251remounted.
1252Support for these locks is scarce and not described by POSIX.
1253.It Sy overlay Ns = Ns Sy on Ns | Ns Sy off
1254Allow mounting on a busy directory or a directory which already contains
1255files or directories.
1256This is the default mount behavior for Linux and
1257.Fx
1258file systems.
1259On these platforms the property is
1260.Sy on
1261by default.
1262Set to
1263.Sy off
1264to disable overlay mounts for consistency with OpenZFS on other platforms.
1265.It Sy primarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
1266Controls what is cached in the primary cache
1267.Pq ARC .
1268If this property is set to
1269.Sy all ,
1270then both user data and metadata is cached.
1271If this property is set to
1272.Sy none ,
1273then neither user data nor metadata is cached.
1274If this property is set to
1275.Sy metadata ,
1276then only metadata is cached.
1277The default value is
1278.Sy all .
1279.It Sy quota Ns = Ns Ar size Ns | Ns Sy none
1280Limits the amount of space a dataset and its descendents can consume.
1281This property enforces a hard limit on the amount of space used.
1282This includes all space consumed by descendents, including file systems and
1283snapshots.
1284Setting a quota on a descendent of a dataset that already has a quota does not
1285override the ancestor's quota, but rather imposes an additional limit.
1286.Pp
1287Quotas cannot be set on volumes, as the
1288.Sy volsize
1289property acts as an implicit quota.
1290.It Sy snapshot_limit Ns = Ns Ar count Ns | Ns Sy none
1291Limits the number of snapshots that can be created on a dataset and its
1292descendents.
1293Setting a
1294.Sy snapshot_limit
1295on a descendent of a dataset that already has a
1296.Sy snapshot_limit
1297does not override the ancestor's
1298.Sy snapshot_limit ,
1299but rather imposes an additional limit.
1300The limit is not enforced if the user is allowed to change the limit.
1301For example, this means that recursive snapshots taken from the global zone are
1302counted against each delegated dataset within a zone.
1303This feature must be enabled to be used
1304.Po see
1305.Xr zpool-features 7
1306.Pc .
1307.It Sy userquota@ Ns Ar user Ns = Ns Ar size Ns | Ns Sy none
1308Limits the amount of space consumed by the specified user.
1309User space consumption is identified by the
1310.Sy userspace@ Ns Ar user
1311property.
1312.Pp
1313Enforcement of user quotas may be delayed by several seconds.
1314This delay means that a user might exceed their quota before the system notices
1315that they are over quota and begins to refuse additional writes with the
1316.Er EDQUOT
1317error message.
1318See the
1319.Nm zfs Cm userspace
1320command for more information.
1321.Pp
1322Unprivileged users can only access their own groups' space usage.
1323The root user, or a user who has been granted the
1324.Sy userquota
1325privilege with
1326.Nm zfs Cm allow ,
1327can get and set everyone's quota.
1328.Pp
1329This property is not available on volumes, on file systems before version 4, or
1330on pools before version 15.
1331The
1332.Sy userquota@ Ns Ar …
1333properties are not displayed by
1334.Nm zfs Cm get Sy all .
1335The user's name must be appended after the
1336.Sy @
1337symbol, using one of the following forms:
1338.Bl -bullet -compact -offset 4n
1339.It
1340POSIX name
1341.Pq Qq joe
1342.It
1343POSIX numeric ID
1344.Pq Qq 789
1345.It
1346SID name
1347.Pq Qq joe.smith@mydomain
1348.It
1349SID numeric ID
1350.Pq Qq S-1-123-456-789
1351.El
1352.Pp
1353Files created on Linux always have POSIX owners.
1354.It Sy userobjquota@ Ns Ar user Ns = Ns Ar size Ns | Ns Sy none
1355The
1356.Sy userobjquota
1357is similar to
1358.Sy userquota
1359but it limits the number of objects a user can create.
1360Please refer to
1361.Sy userobjused
1362for more information about how objects are counted.
1363.It Sy groupquota@ Ns Ar group Ns = Ns Ar size Ns | Ns Sy none
1364Limits the amount of space consumed by the specified group.
1365Group space consumption is identified by the
1366.Sy groupused@ Ns Ar group
1367property.
1368.Pp
1369Unprivileged users can access only their own groups' space usage.
1370The root user, or a user who has been granted the
1371.Sy groupquota
1372privilege with
1373.Nm zfs Cm allow ,
1374can get and set all groups' quotas.
1375.It Sy groupobjquota@ Ns Ar group Ns = Ns Ar size Ns | Ns Sy none
1376The
1377.Sy groupobjquota
1378is similar to
1379.Sy groupquota
1380but it limits number of objects a group can consume.
1381Please refer to
1382.Sy userobjused
1383for more information about how objects are counted.
1384.It Sy projectquota@ Ns Ar project Ns = Ns Ar size Ns | Ns Sy none
1385Limits the amount of space consumed by the specified project.
1386Project space consumption is identified by the
1387.Sy projectused@ Ns Ar project
1388property.
1389Please refer to
1390.Sy projectused
1391for more information about how project is identified and set/changed.
1392.Pp
1393The root user, or a user who has been granted the
1394.Sy projectquota
1395privilege with
1396.Nm zfs allow ,
1397can access all projects' quota.
1398.It Sy projectobjquota@ Ns Ar project Ns = Ns Ar size Ns | Ns Sy none
1399The
1400.Sy projectobjquota
1401is similar to
1402.Sy projectquota
1403but it limits number of objects a project can consume.
1404Please refer to
1405.Sy userobjused
1406for more information about how objects are counted.
1407.It Sy readonly Ns = Ns Sy on Ns | Ns Sy off
1408Controls whether this dataset can be modified.
1409The default value is
1410.Sy off .
1411The values
1412.Sy on
1413and
1414.Sy off
1415are equivalent to the
1416.Sy ro
1417and
1418.Sy rw
1419mount options.
1420.Pp
1421This property can also be referred to by its shortened column name,
1422.Sy rdonly .
1423.It Sy recordsize Ns = Ns Ar size
1424Specifies a suggested block size for files in the file system.
1425This property is designed solely for use with database workloads that access
1426files in fixed-size records.
1427ZFS automatically tunes block sizes according to internal algorithms optimized
1428for typical access patterns.
1429.Pp
1430For databases that create very large files but access them in small random
1431chunks, these algorithms may be suboptimal.
1432Specifying a
1433.Sy recordsize
1434greater than or equal to the record size of the database can result in
1435significant performance gains.
1436Use of this property for general purpose file systems is strongly discouraged,
1437and may adversely affect performance.
1438.Pp
1439The size specified must be a power of two greater than or equal to
1440.Ar 512 B
1441and less than or equal to
1442.Ar 128 KiB .
1443If the
1444.Sy large_blocks
1445feature is enabled on the pool, the size may be up to
1446.Ar 1 MiB .
1447See
1448.Xr zpool-features 7
1449for details on ZFS feature flags.
1450.Pp
1451Changing the file system's
1452.Sy recordsize
1453affects only files created afterward; existing files are unaffected.
1454.Pp
1455This property can also be referred to by its shortened column name,
1456.Sy recsize .
1457.It Sy redundant_metadata Ns = Ns Sy all Ns | Ns Sy most
1458Controls what types of metadata are stored redundantly.
1459ZFS stores an extra copy of metadata, so that if a single block is corrupted,
1460the amount of user data lost is limited.
1461This extra copy is in addition to any redundancy provided at the pool level
1462.Pq e.g. by mirroring or RAID-Z ,
1463and is in addition to an extra copy specified by the
1464.Sy copies
1465property
1466.Pq up to a total of 3 copies .
1467For example if the pool is mirrored,
1468.Sy copies Ns = Ns 2 ,
1469and
1470.Sy redundant_metadata Ns = Ns Sy most ,
1471then ZFS stores 6 copies of most metadata, and 4 copies of data and some
1472metadata.
1473.Pp
1474When set to
1475.Sy all ,
1476ZFS stores an extra copy of all metadata.
1477If a single on-disk block is corrupt, at worst a single block of user data
1478.Po which is
1479.Sy recordsize
1480bytes long
1481.Pc
1482can be lost.
1483.Pp
1484When set to
1485.Sy most ,
1486ZFS stores an extra copy of most types of metadata.
1487This can improve performance of random writes, because less metadata must be
1488written.
1489In practice, at worst about 100 blocks
1490.Po of
1491.Sy recordsize
1492bytes each
1493.Pc
1494of user data can be lost if a single on-disk block is corrupt.
1495The exact behavior of which metadata blocks are stored redundantly may change in
1496future releases.
1497.Pp
1498The default value is
1499.Sy all .
1500.It Sy refquota Ns = Ns Ar size Ns | Ns Sy none
1501Limits the amount of space a dataset can consume.
1502This property enforces a hard limit on the amount of space used.
1503This hard limit does not include space used by descendents, including file
1504systems and snapshots.
1505.It Sy refreservation Ns = Ns Ar size Ns | Ns Sy none Ns | Ns Sy auto
1506The minimum amount of space guaranteed to a dataset, not including its
1507descendents.
1508When the amount of space used is below this value, the dataset is treated as if
1509it were taking up the amount of space specified by
1510.Sy refreservation .
1511The
1512.Sy refreservation
1513reservation is accounted for in the parent datasets' space used, and counts
1514against the parent datasets' quotas and reservations.
1515.Pp
1516If
1517.Sy refreservation
1518is set, a snapshot is only allowed if there is enough free pool space outside of
1519this reservation to accommodate the current number of
1520.Qq referenced
1521bytes in the dataset.
1522.Pp
1523If
1524.Sy refreservation
1525is set to
1526.Sy auto ,
1527a volume is thick provisioned
1528.Po or
1529.Qq not sparse
1530.Pc .
1531.Sy refreservation Ns = Ns Sy auto
1532is only supported on volumes.
1533See
1534.Sy volsize
1535in the
1536.Sx Native Properties
1537section for more information about sparse volumes.
1538.Pp
1539This property can also be referred to by its shortened column name,
1540.Sy refreserv .
1541.It Sy relatime Ns = Ns Sy on Ns | Ns Sy off
1542Controls the manner in which the access time is updated when
1543.Sy atime Ns = Ns Sy on
1544is set.
1545Turning this property on causes the access time to be updated relative
1546to the modify or change time.
1547Access time is only updated if the previous
1548access time was earlier than the current modify or change time or if the
1549existing access time hasn't been updated within the past 24 hours.
1550The default value is
1551.Sy on .
1552The values
1553.Sy on
1554and
1555.Sy off
1556are equivalent to the
1557.Sy relatime
1558and
1559.Sy norelatime
1560mount options.
1561.It Sy reservation Ns = Ns Ar size Ns | Ns Sy none
1562The minimum amount of space guaranteed to a dataset and its descendants.
1563When the amount of space used is below this value, the dataset is treated as if
1564it were taking up the amount of space specified by its reservation.
1565Reservations are accounted for in the parent datasets' space used, and count
1566against the parent datasets' quotas and reservations.
1567.Pp
1568This property can also be referred to by its shortened column name,
1569.Sy reserv .
1570.It Sy secondarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
1571Controls what is cached in the secondary cache
1572.Pq L2ARC .
1573If this property is set to
1574.Sy all ,
1575then both user data and metadata is cached.
1576If this property is set to
1577.Sy none ,
1578then neither user data nor metadata is cached.
1579If this property is set to
1580.Sy metadata ,
1581then only metadata is cached.
1582The default value is
1583.Sy all .
1584.It Sy setuid Ns = Ns Sy on Ns | Ns Sy off
1585Controls whether the setuid bit is respected for the file system.
1586The default value is
1587.Sy on .
1588The values
1589.Sy on
1590and
1591.Sy off
1592are equivalent to the
1593.Sy suid
1594and
1595.Sy nosuid
1596mount options.
1597.It Sy sharesmb Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Ar opts
1598Controls whether the file system is shared by using
1599.Sy Samba USERSHARES
1600and what options are to be used.
1601Otherwise, the file system is automatically shared and unshared with the
1602.Nm zfs Cm share
1603and
1604.Nm zfs Cm unshare
1605commands.
1606If the property is set to on, the
1607.Xr net 8
1608command is invoked to create a
1609.Sy USERSHARE .
1610.Pp
1611Because SMB shares requires a resource name, a unique resource name is
1612constructed from the dataset name.
1613The constructed name is a copy of the
1614dataset name except that the characters in the dataset name, which would be
1615invalid in the resource name, are replaced with underscore (_) characters.
1616Linux does not currently support additional options which might be available
1617on Solaris.
1618.Pp
1619If the
1620.Sy sharesmb
1621property is set to
1622.Sy off ,
1623the file systems are unshared.
1624.Pp
1625The share is created with the ACL (Access Control List) "Everyone:F" ("F"
1626stands for "full permissions", i.e. read and write permissions) and no guest
1627access (which means Samba must be able to authenticate a real user \(em
1628.Xr passwd 5 Ns / Ns Xr shadow 5 Ns - ,
1629LDAP- or
1630.Xr smbpasswd 5 Ns -based )
1631by default.
1632This means that any additional access control
1633(disallow specific user specific access etc) must be done on the underlying file system.
1634.It Sy sharenfs Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Ar opts
1635Controls whether the file system is shared via NFS, and what options are to be
1636used.
1637A file system with a
1638.Sy sharenfs
1639property of
1640.Sy off
1641is managed with the
1642.Xr exportfs 8
1643command and entries in the
1644.Pa /etc/exports
1645file.
1646Otherwise, the file system is automatically shared and unshared with the
1647.Nm zfs Cm share
1648and
1649.Nm zfs Cm unshare
1650commands.
1651If the property is set to
1652.Sy on ,
1653the dataset is shared using the default options:
1654.Dl sec=sys,rw,crossmnt,no_subtree_check
1655.Pp
1656Please note that the options are comma-separated, unlike those found in
1657.Xr exports 5 .
1658This is done to negate the need for quoting, as well as to make parsing
1659with scripts easier.
1660.Pp
1661See
1662.Xr exports 5
1663for the meaning of the default options.
1664Otherwise, the
1665.Xr exportfs 8
1666command is invoked with options equivalent to the contents of this property.
1667.Pp
1668When the
1669.Sy sharenfs
1670property is changed for a dataset, the dataset and any children inheriting the
1671property are re-shared with the new options, only if the property was previously
1672.Sy off ,
1673or if they were shared before the property was changed.
1674If the new property is
1675.Sy off ,
1676the file systems are unshared.
1677.It Sy logbias Ns = Ns Sy latency Ns | Ns Sy throughput
1678Provide a hint to ZFS about handling of synchronous requests in this dataset.
1679If
1680.Sy logbias
1681is set to
1682.Sy latency
1683.Pq the default ,
1684ZFS will use pool log devices
1685.Pq if configured
1686to handle the requests at low latency.
1687If
1688.Sy logbias
1689is set to
1690.Sy throughput ,
1691ZFS will not use configured pool log devices.
1692ZFS will instead optimize synchronous operations for global pool throughput and
1693efficient use of resources.
1694.It Sy snapdev Ns = Ns Sy hidden Ns | Ns Sy visible
1695Controls whether the volume snapshot devices under
1696.Pa /dev/zvol/ Ns Aq Ar pool
1697are hidden or visible.
1698The default value is
1699.Sy hidden .
1700.It Sy snapdir Ns = Ns Sy hidden Ns | Ns Sy visible
1701Controls whether the
1702.Pa .zfs
1703directory is hidden or visible in the root of the file system as discussed in
1704the
1705.Sx Snapshots
1706section of
1707.Xr zfsconcepts 7 .
1708The default value is
1709.Sy hidden .
1710.It Sy sync Ns = Ns Sy standard Ns | Ns Sy always Ns | Ns Sy disabled
1711Controls the behavior of synchronous requests
1712.Pq e.g. fsync, O_DSYNC .
1713.Sy standard
1714is the POSIX-specified behavior of ensuring all synchronous requests
1715are written to stable storage and all devices are flushed to ensure
1716data is not cached by device controllers
1717.Pq this is the default .
1718.Sy always
1719causes every file system transaction to be written and flushed before its
1720system call returns.
1721This has a large performance penalty.
1722.Sy disabled
1723disables synchronous requests.
1724File system transactions are only committed to stable storage periodically.
1725This option will give the highest performance.
1726However, it is very dangerous as ZFS would be ignoring the synchronous
1727transaction demands of applications such as databases or NFS.
1728Administrators should only use this option when the risks are understood.
1729.It Sy version Ns = Ns Ar N Ns | Ns Sy current
1730The on-disk version of this file system, which is independent of the pool
1731version.
1732This property can only be set to later supported versions.
1733See the
1734.Nm zfs Cm upgrade
1735command.
1736.It Sy volsize Ns = Ns Ar size
1737For volumes, specifies the logical size of the volume.
1738By default, creating a volume establishes a reservation of equal size.
1739For storage pools with a version number of 9 or higher, a
1740.Sy refreservation
1741is set instead.
1742Any changes to
1743.Sy volsize
1744are reflected in an equivalent change to the reservation
1745.Pq or Sy refreservation .
1746The
1747.Sy volsize
1748can only be set to a multiple of
1749.Sy volblocksize ,
1750and cannot be zero.
1751.Pp
1752The reservation is kept equal to the volume's logical size to prevent unexpected
1753behavior for consumers.
1754Without the reservation, the volume could run out of space, resulting in
1755undefined behavior or data corruption, depending on how the volume is used.
1756These effects can also occur when the volume size is changed while it is in use
1757.Pq particularly when shrinking the size .
1758Extreme care should be used when adjusting the volume size.
1759.Pp
1760Though not recommended, a
1761.Qq sparse volume
1762.Po also known as
1763.Qq thin provisioned
1764.Pc
1765can be created by specifying the
1766.Fl s
1767option to the
1768.Nm zfs Cm create Fl V
1769command, or by changing the value of the
1770.Sy refreservation
1771property
1772.Po or
1773.Sy reservation
1774property on pool version 8 or earlier
1775.Pc
1776after the volume has been created.
1777A
1778.Qq sparse volume
1779is a volume where the value of
1780.Sy refreservation
1781is less than the size of the volume plus the space required to store its
1782metadata.
1783Consequently, writes to a sparse volume can fail with
1784.Er ENOSPC
1785when the pool is low on space.
1786For a sparse volume, changes to
1787.Sy volsize
1788are not reflected in the
1789.Sy refreservation .
1790A volume that is not sparse is said to be
1791.Qq thick provisioned .
1792A sparse volume can become thick provisioned by setting
1793.Sy refreservation
1794to
1795.Sy auto .
1796.It Sy volmode Ns = Ns Sy default Ns | Ns Sy full Ns | Ns Sy geom Ns | Ns Sy dev Ns | Ns Sy none
1797This property specifies how volumes should be exposed to the OS.
1798Setting it to
1799.Sy full
1800exposes volumes as fully fledged block devices, providing maximal
1801functionality.
1802The value
1803.Sy geom
1804is just an alias for
1805.Sy full
1806and is kept for compatibility.
1807Setting it to
1808.Sy dev
1809hides its partitions.
1810Volumes with property set to
1811.Sy none
1812are not exposed outside ZFS, but can be snapshotted, cloned, replicated, etc,
1813that can be suitable for backup purposes.
1814Value
1815.Sy default
1816means that volumes exposition is controlled by system-wide tunable
1817.Sy zvol_volmode ,
1818where
1819.Sy full ,
1820.Sy dev
1821and
1822.Sy none
1823are encoded as 1, 2 and 3 respectively.
1824The default value is
1825.Sy full .
1826.It Sy vscan Ns = Ns Sy on Ns | Ns Sy off
1827Controls whether regular files should be scanned for viruses when a file is
1828opened and closed.
1829In addition to enabling this property, the virus scan service must also be
1830enabled for virus scanning to occur.
1831The default value is
1832.Sy off .
1833This property is not used by OpenZFS.
1834.It Sy xattr Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy sa
1835Controls whether extended attributes are enabled for this file system.
1836Two styles of extended attributes are supported: either directory-based
1837or system-attribute-based.
1838.Pp
1839The default value of
1840.Sy on
1841enables directory-based extended attributes.
1842This style of extended attribute imposes no practical limit
1843on either the size or number of attributes which can be set on a file.
1844Although under Linux the
1845.Xr getxattr 2
1846and
1847.Xr setxattr 2
1848system calls limit the maximum size to
1849.Sy 64K .
1850This is the most compatible
1851style of extended attribute and is supported by all ZFS implementations.
1852.Pp
1853System-attribute-based xattrs can be enabled by setting the value to
1854.Sy sa .
1855The key advantage of this type of xattr is improved performance.
1856Storing extended attributes as system attributes
1857significantly decreases the amount of disk I/O required.
1858Up to
1859.Sy 64K
1860of data may be stored per-file in the space reserved for system attributes.
1861If there is not enough space available for an extended attribute
1862then it will be automatically written as a directory-based xattr.
1863System-attribute-based extended attributes are not accessible
1864on platforms which do not support the
1865.Sy xattr Ns = Ns Sy sa
1866feature.
1867OpenZFS supports
1868.Sy xattr Ns = Ns Sy sa
1869on both
1870.Fx
1871and Linux.
1872.Pp
1873The use of system-attribute-based xattrs is strongly encouraged for users of
1874SELinux or POSIX ACLs.
1875Both of these features heavily rely on extended
1876attributes and benefit significantly from the reduced access time.
1877.Pp
1878The values
1879.Sy on
1880and
1881.Sy off
1882are equivalent to the
1883.Sy xattr
1884and
1885.Sy noxattr
1886mount options.
1887.It Sy jailed Ns = Ns Sy off Ns | Ns Sy on
1888Controls whether the dataset is managed from a jail.
1889See
1890.Xr zfs-jail 8
1891for more information.
1892Jails are a
1893.Fx
1894feature and are not relevant on other platforms.
1895The default value is
1896.Sy off .
1897.It Sy zoned Ns = Ns Sy on Ns | Ns Sy off
1898Controls whether the dataset is managed from a non-global zone or namespace.
1899The default value is
1900.Sy off .
1901.El
1902.Pp
1903The following three properties cannot be changed after the file system is
1904created, and therefore, should be set when the file system is created.
1905If the properties are not set with the
1906.Nm zfs Cm create
1907or
1908.Nm zpool Cm create
1909commands, these properties are inherited from the parent dataset.
1910If the parent dataset lacks these properties due to having been created prior to
1911these features being supported, the new file system will have the default values
1912for these properties.
1913.Bl -tag -width ""
1914.It Xo
1915.Sy casesensitivity Ns = Ns Sy sensitive Ns | Ns
1916.Sy insensitive Ns | Ns Sy mixed
1917.Xc
1918Indicates whether the file name matching algorithm used by the file system
1919should be case-sensitive, case-insensitive, or allow a combination of both
1920styles of matching.
1921The default value for the
1922.Sy casesensitivity
1923property is
1924.Sy sensitive .
1925Traditionally,
1926.Ux
1927and POSIX file systems have case-sensitive file names.
1928.Pp
1929The
1930.Sy mixed
1931value for the
1932.Sy casesensitivity
1933property indicates that the file system can support requests for both
1934case-sensitive and case-insensitive matching behavior.
1935Currently, case-insensitive matching behavior on a file system that supports
1936mixed behavior is limited to the SMB server product.
1937For more information about the
1938.Sy mixed
1939value behavior, see the "ZFS Administration Guide".
1940.It Xo
1941.Sy normalization Ns = Ns Sy none Ns | Ns Sy formC Ns | Ns
1942.Sy formD Ns | Ns Sy formKC Ns | Ns Sy formKD
1943.Xc
1944Indicates whether the file system should perform a
1945.Sy unicode
1946normalization of file names whenever two file names are compared, and which
1947normalization algorithm should be used.
1948File names are always stored unmodified, names are normalized as part of any
1949comparison process.
1950If this property is set to a legal value other than
1951.Sy none ,
1952and the
1953.Sy utf8only
1954property was left unspecified, the
1955.Sy utf8only
1956property is automatically set to
1957.Sy on .
1958The default value of the
1959.Sy normalization
1960property is
1961.Sy none .
1962This property cannot be changed after the file system is created.
1963.It Sy utf8only Ns = Ns Sy on Ns | Ns Sy off
1964Indicates whether the file system should reject file names that include
1965characters that are not present in the
1966.Sy UTF-8
1967character code set.
1968If this property is explicitly set to
1969.Sy off ,
1970the normalization property must either not be explicitly set or be set to
1971.Sy none .
1972The default value for the
1973.Sy utf8only
1974property is
1975.Sy off .
1976This property cannot be changed after the file system is created.
1977.El
1978.Pp
1979The
1980.Sy casesensitivity ,
1981.Sy normalization ,
1982and
1983.Sy utf8only
1984properties are also new permissions that can be assigned to non-privileged users
1985by using the ZFS delegated administration feature.
1986.
1987.Ss Temporary Mount Point Properties
1988When a file system is mounted, either through
1989.Xr mount 8
1990for legacy mounts or the
1991.Nm zfs Cm mount
1992command for normal file systems, its mount options are set according to its
1993properties.
1994The correlation between properties and mount options is as follows:
1995.Bl -tag -compact -offset Ds -width "rootcontext="
1996.It Sy atime
1997atime/noatime
1998.It Sy canmount
1999auto/noauto
2000.It Sy devices
2001dev/nodev
2002.It Sy exec
2003exec/noexec
2004.It Sy readonly
2005ro/rw
2006.It Sy relatime
2007relatime/norelatime
2008.It Sy setuid
2009suid/nosuid
2010.It Sy xattr
2011xattr/noxattr
2012.It Sy nbmand
2013mand/nomand
2014.It Sy context Ns =
2015context=
2016.It Sy fscontext Ns =
2017fscontext=
2018.It Sy defcontext Ns =
2019defcontext=
2020.It Sy rootcontext Ns =
2021rootcontext=
2022.El
2023.Pp
2024In addition, these options can be set on a per-mount basis using the
2025.Fl o
2026option, without affecting the property that is stored on disk.
2027The values specified on the command line override the values stored in the
2028dataset.
2029The
2030.Sy nosuid
2031option is an alias for
2032.Sy nodevices , Ns Sy nosetuid .
2033These properties are reported as
2034.Qq temporary
2035by the
2036.Nm zfs Cm get
2037command.
2038If the properties are changed while the dataset is mounted, the new setting
2039overrides any temporary settings.
2040.
2041.Ss User Properties
2042In addition to the standard native properties, ZFS supports arbitrary user
2043properties.
2044User properties have no effect on ZFS behavior, but applications or
2045administrators can use them to annotate datasets
2046.Pq file systems, volumes, and snapshots .
2047.Pp
2048User property names must contain a colon
2049.Pq Qq Sy \&:
2050character to distinguish them from native properties.
2051They may contain lowercase letters, numbers, and the following punctuation
2052characters: colon
2053.Pq Qq Sy \&: ,
2054dash
2055.Pq Qq Sy - ,
2056period
2057.Pq Qq Sy \&. ,
2058and underscore
2059.Pq Qq Sy _ .
2060The expected convention is that the property name is divided into two portions
2061such as
2062.Ar module : Ns Ar property ,
2063but this namespace is not enforced by ZFS.
2064User property names can be at most 256 characters, and cannot begin with a dash
2065.Pq Qq Sy - .
2066.Pp
2067When making programmatic use of user properties, it is strongly suggested to use
2068a reversed DNS domain name for the
2069.Ar module
2070component of property names to reduce the chance that two
2071independently-developed packages use the same property name for different
2072purposes.
2073.Pp
2074The values of user properties are arbitrary strings, are always inherited, and
2075are never validated.
2076All of the commands that operate on properties
2077.Po Nm zfs Cm list ,
2078.Nm zfs Cm get ,
2079.Nm zfs Cm set ,
2080and so forth
2081.Pc
2082can be used to manipulate both native properties and user properties.
2083Use the
2084.Nm zfs Cm inherit
2085command to clear a user property.
2086If the property is not defined in any parent dataset, it is removed entirely.
2087Property values are limited to 8192 bytes.
2088