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