xref: /freebsd/sys/contrib/openzfs/man/man7/zfsprops.7 (revision 1323ec57)
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 http://www.opensolaris.org/os/licensing.
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 volblocksize
523For volumes, specifies the block size of the volume.
524The
525.Sy blocksize
526cannot be changed once the volume has been written, so it should be set at
527volume creation time.
528The default
529.Sy blocksize
530for volumes is 16 Kbytes.
531Any power of 2 from 512 bytes to 128 Kbytes is valid.
532.Pp
533This property can also be referred to by its shortened column name,
534.Sy volblock .
535.It Sy written
536The amount of space
537.Sy referenced
538by this dataset, that was written since the previous snapshot
539.Pq i.e. that is not referenced by the previous snapshot .
540.It Sy written Ns @ Ns Ar snapshot
541The amount of
542.Sy referenced
543space written to this dataset since the specified snapshot.
544This is the space that is referenced by this dataset but was not referenced by
545the specified snapshot.
546.Pp
547The
548.Ar snapshot
549may be specified as a short snapshot name
550.Pq just the part after the Sy @ ,
551in which case it will be interpreted as a snapshot in the same filesystem as
552this dataset.
553The
554.Ar snapshot
555may be a full snapshot name
556.Pq Ar filesystem Ns @ Ns Ar snapshot ,
557which for clones may be a snapshot in the origin's filesystem
558.Pq or the origin of the origin's filesystem, etc.
559.El
560.Pp
561The following native properties can be used to change the behavior of a ZFS
562dataset.
563.Bl -tag -width ""
564.It Xo
565.Sy aclinherit Ns = Ns Sy discard Ns | Ns Sy noallow Ns | Ns
566.Sy restricted Ns | Ns Sy passthrough Ns | Ns Sy passthrough-x
567.Xc
568Controls how ACEs are inherited when files and directories are created.
569.Bl -tag -compact -offset 4n -width "passthrough-x"
570.It Sy discard
571does not inherit any ACEs.
572.It Sy noallow
573only inherits inheritable ACEs that specify
574.Qq deny
575permissions.
576.It Sy restricted
577default, removes the
578.Sy write_acl
579and
580.Sy write_owner
581permissions when the ACE is inherited.
582.It Sy passthrough
583inherits all inheritable ACEs without any modifications.
584.It Sy passthrough-x
585same meaning as
586.Sy passthrough ,
587except that the
588.Sy owner@ , group@ , No and Sy everyone@
589ACEs inherit the execute permission only if the file creation mode also requests
590the execute bit.
591.El
592.Pp
593When the property value is set to
594.Sy passthrough ,
595files are created with a mode determined by the inheritable ACEs.
596If no inheritable ACEs exist that affect the mode, then the mode is set in
597accordance to the requested mode from the application.
598.Pp
599The
600.Sy aclinherit
601property does not apply to POSIX ACLs.
602.It Xo
603.Sy aclmode Ns = Ns Sy discard Ns | Ns Sy groupmask Ns | Ns
604.Sy passthrough Ns | Ns Sy restricted Ns
605.Xc
606Controls how an ACL is modified during chmod(2) and how inherited ACEs
607are modified by the file creation mode:
608.Bl -tag -compact -offset 4n -width "passthrough"
609.It Sy discard
610default, deletes all
611.Sy ACEs
612except for those representing
613the mode of the file or directory requested by
614.Xr chmod 2 .
615.It Sy groupmask
616reduces permissions granted in all
617.Sy ALLOW
618entries found in the
619.Sy ACL
620such that they are no greater than the group permissions specified by
621.Xr chmod 2 .
622.It Sy passthrough
623indicates that no changes are made to the ACL other than creating or updating
624the necessary ACL entries to represent the new mode of the file or directory.
625.It Sy restricted
626will cause the
627.Xr chmod 2
628operation to return an error when used on any file or directory which has
629a non-trivial ACL whose entries can not be represented by a mode.
630.Xr chmod 2
631is required to change the set user ID, set group ID, or sticky bits on a file
632or directory, as they do not have equivalent ACL entries.
633In order to use
634.Xr chmod 2
635on a file or directory with a non-trivial ACL when
636.Sy aclmode
637is set to
638.Sy restricted ,
639you must first remove all ACL entries which do not represent the current mode.
640.El
641.It Sy acltype Ns = Ns Sy off Ns | Ns Sy nfsv4 Ns | Ns Sy posix
642Controls whether ACLs are enabled and if so what type of ACL to use.
643When this property is set to a type of ACL not supported by the current
644platform, the behavior is the same as if it were set to
645.Sy off .
646.Bl -tag -compact -offset 4n -width "posixacl"
647.It Sy off
648default on Linux, when a file system has the
649.Sy acltype
650property set to off then ACLs are disabled.
651.It Sy noacl
652an alias for
653.Sy off
654.It Sy nfsv4
655default on
656.Fx ,
657indicates that NFSv4-style ZFS ACLs should be used.
658These ACLs can be managed with the
659.Xr getfacl 1
660and
661.Xr setfacl 1 .
662The
663.Sy nfsv4
664ZFS ACL type is not yet supported on Linux.
665.It Sy posix
666indicates POSIX ACLs should be used.
667POSIX ACLs are specific to Linux and are not functional on other platforms.
668POSIX ACLs are stored as an extended
669attribute and therefore will not overwrite any existing NFSv4 ACLs which
670may be set.
671.It Sy posixacl
672an alias for
673.Sy posix
674.El
675.Pp
676To obtain the best performance when setting
677.Sy posix
678users are strongly encouraged to set the
679.Sy xattr Ns = Ns Sy sa
680property.
681This will result in the POSIX ACL being stored more efficiently on disk.
682But as a consequence, all new extended attributes will only be
683accessible from OpenZFS implementations which support the
684.Sy xattr Ns = Ns Sy sa
685property.
686See the
687.Sy xattr
688property for more details.
689.It Sy atime Ns = Ns Sy on Ns | Ns Sy off
690Controls whether the access time for files is updated when they are read.
691Turning this property off avoids producing write traffic when reading files and
692can result in significant performance gains, though it might confuse mailers
693and other similar utilities.
694The values
695.Sy on
696and
697.Sy off
698are equivalent to the
699.Sy atime
700and
701.Sy noatime
702mount options.
703The default value is
704.Sy on .
705See also
706.Sy relatime
707below.
708.It Sy canmount Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy noauto
709If this property is set to
710.Sy off ,
711the file system cannot be mounted, and is ignored by
712.Nm zfs Cm mount Fl a .
713Setting this property to
714.Sy off
715is similar to setting the
716.Sy mountpoint
717property to
718.Sy none ,
719except that the dataset still has a normal
720.Sy mountpoint
721property, which can be inherited.
722Setting this property to
723.Sy off
724allows datasets to be used solely as a mechanism to inherit properties.
725One example of setting
726.Sy canmount Ns = Ns Sy off
727is to have two datasets with the same
728.Sy mountpoint ,
729so that the children of both datasets appear in the same directory, but might
730have different inherited characteristics.
731.Pp
732When set to
733.Sy noauto ,
734a dataset can only be mounted and unmounted explicitly.
735The dataset is not mounted automatically when the dataset is created or
736imported, nor is it mounted by the
737.Nm zfs Cm mount Fl a
738command or unmounted by the
739.Nm zfs Cm unmount Fl a
740command.
741.Pp
742This property is not inherited.
743.It Xo
744.Sy checksum Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy fletcher2 Ns | Ns
745.Sy fletcher4 Ns | Ns Sy sha256 Ns | Ns Sy noparity Ns | Ns
746.Sy sha512 Ns | Ns Sy skein Ns | Ns Sy edonr
747.Xc
748Controls the checksum used to verify data integrity.
749The default value is
750.Sy on ,
751which automatically selects an appropriate algorithm
752.Po currently,
753.Sy fletcher4 ,
754but this may change in future releases
755.Pc .
756The value
757.Sy off
758disables integrity checking on user data.
759The value
760.Sy noparity
761not only disables integrity but also disables maintaining parity for user data.
762This setting is used internally by a dump device residing on a RAID-Z pool and
763should not be used by any other dataset.
764Disabling checksums is
765.Em NOT
766a recommended practice.
767.Pp
768The
769.Sy sha512 ,
770.Sy skein ,
771and
772.Sy edonr
773checksum algorithms require enabling the appropriate features on the pool.
774.Pp
775Please see
776.Xr zpool-features 7
777for more information on these algorithms.
778.Pp
779Changing this property affects only newly-written data.
780.It Xo
781.Sy compression Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy gzip Ns | Ns
782.Sy gzip- Ns Ar N Ns | Ns Sy lz4 Ns | Ns Sy lzjb Ns | Ns Sy zle Ns | Ns Sy zstd Ns | Ns
783.Sy zstd- Ns Ar N Ns | Ns Sy zstd-fast Ns | Ns Sy zstd-fast- Ns Ar N
784.Xc
785Controls the compression algorithm used for this dataset.
786.Pp
787When set to
788.Sy on
789(the default), indicates that the current default compression algorithm should be used.
790The default balances compression and decompression speed, with compression ratio
791and is expected to work well on a wide variety of workloads.
792Unlike all other settings for this property,
793.Sy on
794does not select a fixed compression type.
795As new compression algorithms are added to ZFS and enabled on a pool, the
796default compression algorithm may change.
797The current default compression algorithm is either
798.Sy lzjb
799or, if the
800.Sy lz4_compress
801feature is enabled,
802.Sy lz4 .
803.Pp
804The
805.Sy lz4
806compression algorithm is a high-performance replacement for the
807.Sy lzjb
808algorithm.
809It features significantly faster compression and decompression, as well as a
810moderately higher compression ratio than
811.Sy lzjb ,
812but can only be used on pools with the
813.Sy lz4_compress
814feature set to
815.Sy enabled .
816See
817.Xr zpool-features 7
818for details on ZFS feature flags and the
819.Sy lz4_compress
820feature.
821.Pp
822The
823.Sy lzjb
824compression algorithm is optimized for performance while providing decent data
825compression.
826.Pp
827The
828.Sy gzip
829compression algorithm uses the same compression as the
830.Xr gzip 1
831command.
832You can specify the
833.Sy gzip
834level by using the value
835.Sy gzip- Ns Ar N ,
836where
837.Ar N
838is an integer from 1
839.Pq fastest
840to 9
841.Pq best compression ratio .
842Currently,
843.Sy gzip
844is equivalent to
845.Sy gzip-6
846.Po which is also the default for
847.Xr gzip 1
848.Pc .
849.Pp
850The
851.Sy zstd
852compression algorithm provides both high compression ratios and good performance.
853You can specify the
854.Sy zstd
855level by using the value
856.Sy zstd- Ns Ar N ,
857where
858.Ar N
859is an integer from 1
860.Pq fastest
861to 19
862.Pq best compression ratio .
863.Sy zstd
864is equivalent to
865.Sy zstd-3 .
866.Pp
867Faster speeds at the cost of the compression ratio can be requested by
868setting a negative
869.Sy zstd
870level.
871This is done using
872.Sy zstd-fast- Ns Ar N ,
873where
874.Ar N
875is an integer in [1-9,10,20,30,...,100,500,1000] which maps to a negative
876.Sy zstd
877level.
878The lower the level the faster the compression -
879.Ar 1000 No provides the fastest compression and lowest compression ratio.
880.Sy zstd-fast
881is equivalent to
882.Sy zstd-fast-1 .
883.Pp
884The
885.Sy zle
886compression algorithm compresses runs of zeros.
887.Pp
888This property can also be referred to by its shortened column name
889.Sy compress .
890Changing this property affects only newly-written data.
891.Pp
892When any setting except
893.Sy off
894is selected, compression will explicitly check for blocks consisting of only
895zeroes (the NUL byte).
896When a zero-filled block is detected, it is stored as
897a hole and not compressed using the indicated compression algorithm.
898.Pp
899Any block being compressed must be no larger than 7/8 of its original size
900after compression, otherwise the compression will not be considered worthwhile
901and the block saved uncompressed.
902Note that when the logical block is less than
9038 times the disk sector size this effectively reduces the necessary compression
904ratio; for example, 8kB blocks on disks with 4kB disk sectors must compress to 1/2
905or less of their original size.
906.It Xo
907.Sy context Ns = Ns Sy none Ns | Ns
908.Ar SELinux-User : Ns Ar SELinux-Role : Ns Ar SELinux-Type : Ns Ar Sensitivity-Level
909.Xc
910This flag sets the SELinux context for all files in the file system under
911a mount point for that file system.
912See
913.Xr selinux 8
914for more information.
915.It Xo
916.Sy fscontext Ns = Ns Sy none Ns | Ns
917.Ar SELinux-User : Ns Ar SELinux-Role : Ns Ar SELinux-Type : Ns Ar Sensitivity-Level
918.Xc
919This flag sets the SELinux context for the file system file system being
920mounted.
921See
922.Xr selinux 8
923for more information.
924.It Xo
925.Sy defcontext Ns = Ns Sy none Ns | Ns
926.Ar SELinux-User : Ns Ar SELinux-Role : Ns Ar SELinux-Type : Ns Ar Sensitivity-Level
927.Xc
928This flag sets the SELinux default context for unlabeled files.
929See
930.Xr selinux 8
931for more information.
932.It Xo
933.Sy rootcontext Ns = Ns Sy none Ns | Ns
934.Ar SELinux-User : Ns Ar SELinux-Role : Ns Ar SELinux-Type : Ns Ar Sensitivity-Level
935.Xc
936This flag sets the SELinux context for the root inode of the file system.
937See
938.Xr selinux 8
939for more information.
940.It Sy copies Ns = Ns Sy 1 Ns | Ns Sy 2 Ns | Ns Sy 3
941Controls the number of copies of data stored for this dataset.
942These copies are in addition to any redundancy provided by the pool, for
943example, mirroring or RAID-Z.
944The copies are stored on different disks, if possible.
945The space used by multiple copies is charged to the associated file and dataset,
946changing the
947.Sy used
948property and counting against quotas and reservations.
949.Pp
950Changing this property only affects newly-written data.
951Therefore, set this property at file system creation time by using the
952.Fl o Sy copies Ns = Ns Ar N
953option.
954.Pp
955Remember that ZFS will not import a pool with a missing top-level vdev.
956Do
957.Em NOT
958create, for example a two-disk striped pool and set
959.Sy copies Ns = Ns Ar 2
960on some datasets thinking you have setup redundancy for them.
961When a disk fails you will not be able to import the pool
962and will have lost all of your data.
963.Pp
964Encrypted datasets may not have
965.Sy copies Ns = Ns Ar 3
966since the implementation stores some encryption metadata where the third copy
967would normally be.
968.It Sy devices Ns = Ns Sy on Ns | Ns Sy off
969Controls whether device nodes can be opened on this file system.
970The default value is
971.Sy on .
972The values
973.Sy on
974and
975.Sy off
976are equivalent to the
977.Sy dev
978and
979.Sy nodev
980mount options.
981.It Xo
982.Sy dedup Ns = Ns Sy off Ns | Ns Sy on Ns | Ns Sy verify Ns | Ns
983.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
984.Sy edonr , Ns Sy verify
985.Xc
986Configures deduplication for a dataset.
987The default value is
988.Sy off .
989The default deduplication checksum is
990.Sy sha256
991(this may change in the future).
992When
993.Sy dedup
994is enabled, the checksum defined here overrides the
995.Sy checksum
996property.
997Setting the value to
998.Sy verify
999has the same effect as the setting
1000.Sy sha256 , Ns Sy verify .
1001.Pp
1002If set to
1003.Sy verify ,
1004ZFS will do a byte-to-byte comparison in case of two blocks having the same
1005signature to make sure the block contents are identical.
1006Specifying
1007.Sy verify
1008is mandatory for the
1009.Sy edonr
1010algorithm.
1011.Pp
1012Unless necessary, deduplication should
1013.Em not
1014be enabled on a system.
1015See the
1016.Sx Deduplication
1017section of
1018.Xr zfsconcepts 7 .
1019.It Xo
1020.Sy dnodesize Ns = Ns Sy legacy Ns | Ns Sy auto Ns | Ns Sy 1k Ns | Ns
1021.Sy 2k Ns | Ns Sy 4k Ns | Ns Sy 8k Ns | Ns Sy 16k
1022.Xc
1023Specifies a compatibility mode or literal value for the size of dnodes in the
1024file system.
1025The default value is
1026.Sy legacy .
1027Setting this property to a value other than
1028.Sy legacy No requires the Sy large_dnode No pool feature to be enabled.
1029.Pp
1030Consider setting
1031.Sy dnodesize
1032to
1033.Sy auto
1034if the dataset uses the
1035.Sy xattr Ns = Ns Sy sa
1036property setting and the workload makes heavy use of extended attributes.
1037This
1038may be applicable to SELinux-enabled systems, Lustre servers, and Samba
1039servers, for example.
1040Literal values are supported for cases where the optimal
1041size is known in advance and for performance testing.
1042.Pp
1043Leave
1044.Sy dnodesize
1045set to
1046.Sy legacy
1047if you need to receive a send stream of this dataset on a pool that doesn't
1048enable the
1049.Sy large_dnode
1050feature, or if you need to import this pool on a system that doesn't support the
1051.Sy large_dnode No feature.
1052.Pp
1053This property can also be referred to by its shortened column name,
1054.Sy dnsize .
1055.It Xo
1056.Sy encryption Ns = Ns Sy off Ns | Ns Sy on Ns | Ns Sy aes-128-ccm Ns | Ns
1057.Sy aes-192-ccm Ns | Ns Sy aes-256-ccm Ns | Ns Sy aes-128-gcm Ns | Ns
1058.Sy aes-192-gcm Ns | Ns Sy aes-256-gcm
1059.Xc
1060Controls the encryption cipher suite (block cipher, key length, and mode) used
1061for this dataset.
1062Requires the
1063.Sy encryption
1064feature to be enabled on the pool.
1065Requires a
1066.Sy keyformat
1067to be set at dataset creation time.
1068.Pp
1069Selecting
1070.Sy encryption Ns = Ns Sy on
1071when creating a dataset indicates that the default encryption suite will be
1072selected, which is currently
1073.Sy aes-256-gcm .
1074In order to provide consistent data protection, encryption must be specified at
1075dataset creation time and it cannot be changed afterwards.
1076.Pp
1077For more details and caveats about encryption see the
1078.Sx Encryption
1079section of
1080.Xr zfs-load-key 8 .
1081.It Sy keyformat Ns = Ns Sy raw Ns | Ns Sy hex Ns | Ns Sy passphrase
1082Controls what format the user's encryption key will be provided as.
1083This property is only set when the dataset is encrypted.
1084.Pp
1085Raw keys and hex keys must be 32 bytes long (regardless of the chosen
1086encryption suite) and must be randomly generated.
1087A raw key can be generated with the following command:
1088.Dl # Nm dd Sy if=/dev/urandom bs=32 count=1 Sy of= Ns Pa /path/to/output/key
1089.Pp
1090Passphrases must be between 8 and 512 bytes long and will be processed through
1091PBKDF2 before being used (see the
1092.Sy pbkdf2iters
1093property).
1094Even though the encryption suite cannot be changed after dataset creation,
1095the keyformat can be with
1096.Nm zfs Cm change-key .
1097.It Xo
1098.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
1099.Xc
1100Controls where the user's encryption key will be loaded from by default for
1101commands such as
1102.Nm zfs Cm load-key
1103and
1104.Nm zfs Cm mount Fl l .
1105This property is only set for encrypted datasets which are encryption roots.
1106If unspecified, the default is
1107.Sy prompt .
1108.Pp
1109Even though the encryption suite cannot be changed after dataset creation, the
1110keylocation can be with either
1111.Nm zfs Cm set
1112or
1113.Nm zfs Cm change-key .
1114If
1115.Sy prompt
1116is selected ZFS will ask for the key at the command prompt when it is required
1117to access the encrypted data (see
1118.Nm zfs Cm load-key
1119for details).
1120This setting will also allow the key to be passed in via the standard input stream,
1121but users should be careful not to place keys which should be kept secret on
1122the command line.
1123If a file URI is selected, the key will be loaded from the
1124specified absolute file path.
1125If an HTTPS or HTTP URL is selected, it will be GETted using
1126.Xr fetch 3 ,
1127libcurl, or nothing, depending on compile-time configuration and run-time availability.
1128The
1129.Sy SSL_CA_CERT_FILE
1130environment variable can be set to set the location
1131of the concatenated certificate store.
1132The
1133.Sy SSL_CA_CERT_PATH
1134environment variable can be set to override the location
1135of the directory containing the certificate authority bundle.
1136The
1137.Sy SSL_CLIENT_CERT_FILE
1138and
1139.Sy SSL_CLIENT_KEY_FILE
1140environment variables can be set to configure the path
1141to the client certificate and its key.
1142.It Sy pbkdf2iters Ns = Ns Ar iterations
1143Controls the number of PBKDF2 iterations that a
1144.Sy passphrase
1145encryption key should be run through when processing it into an encryption key.
1146This property is only defined when encryption is enabled and a keyformat of
1147.Sy passphrase
1148is selected.
1149The goal of PBKDF2 is to significantly increase the
1150computational difficulty needed to brute force a user's passphrase.
1151This is accomplished by forcing the attacker to run each passphrase through a
1152computationally expensive hashing function many times before they arrive at the
1153resulting key.
1154A user who actually knows the passphrase will only have to pay this cost once.
1155As CPUs become better at processing, this number should be
1156raised to ensure that a brute force attack is still not possible.
1157The current default is
1158.Sy 350000
1159and the minimum is
1160.Sy 100000 .
1161This property may be changed with
1162.Nm zfs Cm change-key .
1163.It Sy exec Ns = Ns Sy on Ns | Ns Sy off
1164Controls whether processes can be executed from within this file system.
1165The default value is
1166.Sy on .
1167The values
1168.Sy on
1169and
1170.Sy off
1171are equivalent to the
1172.Sy exec
1173and
1174.Sy noexec
1175mount options.
1176.It Sy filesystem_limit Ns = Ns Ar count Ns | Ns Sy none
1177Limits the number of filesystems and volumes that can exist under this point in
1178the dataset tree.
1179The limit is not enforced if the user is allowed to change the limit.
1180Setting a
1181.Sy filesystem_limit
1182to
1183.Sy on
1184a descendent of a filesystem that already has a
1185.Sy filesystem_limit
1186does not override the ancestor's
1187.Sy filesystem_limit ,
1188but rather imposes an additional limit.
1189This feature must be enabled to be used
1190.Po see
1191.Xr zpool-features 7
1192.Pc .
1193.It Sy special_small_blocks Ns = Ns Ar size
1194This value represents the threshold block size for including small file
1195blocks into the special allocation class.
1196Blocks smaller than or equal to this
1197value will be assigned to the special allocation class while greater blocks
1198will be assigned to the regular class.
1199Valid values are zero or a power of two from 512B up to 1M.
1200The default size is 0 which means no small file blocks
1201will be allocated in the special class.
1202.Pp
1203Before setting this property, a special class vdev must be added to the
1204pool.
1205See
1206.Xr zpoolconcepts 7
1207for more details on the special allocation class.
1208.It Sy mountpoint Ns = Ns Pa path Ns | Ns Sy none Ns | Ns Sy legacy
1209Controls the mount point used for this file system.
1210See the
1211.Sx Mount Points
1212section of
1213.Xr zfsconcepts 7
1214for more information on how this property is used.
1215.Pp
1216When the
1217.Sy mountpoint
1218property is changed for a file system, the file system and any children that
1219inherit the mount point are unmounted.
1220If the new value is
1221.Sy legacy ,
1222then they remain unmounted.
1223Otherwise, they are automatically remounted in the new location if the property
1224was previously
1225.Sy legacy
1226or
1227.Sy none ,
1228or if they were mounted before the property was changed.
1229In addition, any shared file systems are unshared and shared in the new
1230location.
1231.It Sy nbmand Ns = Ns Sy on Ns | Ns Sy off
1232Controls whether the file system should be mounted with
1233.Sy nbmand
1234.Pq Non-blocking mandatory locks .
1235This is used for SMB clients.
1236Changes to this property only take effect when the file system is umounted and
1237remounted.
1238Support for these locks is scarce and not described by POSIX.
1239.It Sy overlay Ns = Ns Sy on Ns | Ns Sy off
1240Allow mounting on a busy directory or a directory which already contains
1241files or directories.
1242This is the default mount behavior for Linux and
1243.Fx
1244file systems.
1245On these platforms the property is
1246.Sy on
1247by default.
1248Set to
1249.Sy off
1250to disable overlay mounts for consistency with OpenZFS on other platforms.
1251.It Sy primarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
1252Controls what is cached in the primary cache
1253.Pq ARC .
1254If this property is set to
1255.Sy all ,
1256then both user data and metadata is cached.
1257If this property is set to
1258.Sy none ,
1259then neither user data nor metadata is cached.
1260If this property is set to
1261.Sy metadata ,
1262then only metadata is cached.
1263The default value is
1264.Sy all .
1265.It Sy quota Ns = Ns Ar size Ns | Ns Sy none
1266Limits the amount of space a dataset and its descendents can consume.
1267This property enforces a hard limit on the amount of space used.
1268This includes all space consumed by descendents, including file systems and
1269snapshots.
1270Setting a quota on a descendent of a dataset that already has a quota does not
1271override the ancestor's quota, but rather imposes an additional limit.
1272.Pp
1273Quotas cannot be set on volumes, as the
1274.Sy volsize
1275property acts as an implicit quota.
1276.It Sy snapshot_limit Ns = Ns Ar count Ns | Ns Sy none
1277Limits the number of snapshots that can be created on a dataset and its
1278descendents.
1279Setting a
1280.Sy snapshot_limit
1281on a descendent of a dataset that already has a
1282.Sy snapshot_limit
1283does not override the ancestor's
1284.Sy snapshot_limit ,
1285but rather imposes an additional limit.
1286The limit is not enforced if the user is allowed to change the limit.
1287For example, this means that recursive snapshots taken from the global zone are
1288counted against each delegated dataset within a zone.
1289This feature must be enabled to be used
1290.Po see
1291.Xr zpool-features 7
1292.Pc .
1293.It Sy userquota@ Ns Ar user Ns = Ns Ar size Ns | Ns Sy none
1294Limits the amount of space consumed by the specified user.
1295User space consumption is identified by the
1296.Sy userspace@ Ns Ar user
1297property.
1298.Pp
1299Enforcement of user quotas may be delayed by several seconds.
1300This delay means that a user might exceed their quota before the system notices
1301that they are over quota and begins to refuse additional writes with the
1302.Er EDQUOT
1303error message.
1304See the
1305.Nm zfs Cm userspace
1306command for more information.
1307.Pp
1308Unprivileged users can only access their own groups' space usage.
1309The root user, or a user who has been granted the
1310.Sy userquota
1311privilege with
1312.Nm zfs Cm allow ,
1313can get and set everyone's quota.
1314.Pp
1315This property is not available on volumes, on file systems before version 4, or
1316on pools before version 15.
1317The
1318.Sy userquota@ Ns Ar ...
1319properties are not displayed by
1320.Nm zfs Cm get Sy all .
1321The user's name must be appended after the
1322.Sy @
1323symbol, using one of the following forms:
1324.Bl -bullet -compact -offset 4n
1325.It
1326POSIX name
1327.Pq Qq joe
1328.It
1329POSIX numeric ID
1330.Pq Qq 789
1331.It
1332SID name
1333.Pq Qq joe.smith@mydomain
1334.It
1335SID numeric ID
1336.Pq Qq S-1-123-456-789
1337.El
1338.Pp
1339Files created on Linux always have POSIX owners.
1340.It Sy userobjquota@ Ns Ar user Ns = Ns Ar size Ns | Ns Sy none
1341The
1342.Sy userobjquota
1343is similar to
1344.Sy userquota
1345but it limits the number of objects a user can create.
1346Please refer to
1347.Sy userobjused
1348for more information about how objects are counted.
1349.It Sy groupquota@ Ns Ar group Ns = Ns Ar size Ns | Ns Sy none
1350Limits the amount of space consumed by the specified group.
1351Group space consumption is identified by the
1352.Sy groupused@ Ns Ar group
1353property.
1354.Pp
1355Unprivileged users can access only their own groups' space usage.
1356The root user, or a user who has been granted the
1357.Sy groupquota
1358privilege with
1359.Nm zfs Cm allow ,
1360can get and set all groups' quotas.
1361.It Sy groupobjquota@ Ns Ar group Ns = Ns Ar size Ns | Ns Sy none
1362The
1363.Sy groupobjquota
1364is similar to
1365.Sy groupquota
1366but it limits number of objects a group can consume.
1367Please refer to
1368.Sy userobjused
1369for more information about how objects are counted.
1370.It Sy projectquota@ Ns Ar project Ns = Ns Ar size Ns | Ns Sy none
1371Limits the amount of space consumed by the specified project.
1372Project space consumption is identified by the
1373.Sy projectused@ Ns Ar project
1374property.
1375Please refer to
1376.Sy projectused
1377for more information about how project is identified and set/changed.
1378.Pp
1379The root user, or a user who has been granted the
1380.Sy projectquota
1381privilege with
1382.Nm zfs allow ,
1383can access all projects' quota.
1384.It Sy projectobjquota@ Ns Ar project Ns = Ns Ar size Ns | Ns Sy none
1385The
1386.Sy projectobjquota
1387is similar to
1388.Sy projectquota
1389but it limits number of objects a project can consume.
1390Please refer to
1391.Sy userobjused
1392for more information about how objects are counted.
1393.It Sy readonly Ns = Ns Sy on Ns | Ns Sy off
1394Controls whether this dataset can be modified.
1395The default value is
1396.Sy off .
1397The values
1398.Sy on
1399and
1400.Sy off
1401are equivalent to the
1402.Sy ro
1403and
1404.Sy rw
1405mount options.
1406.Pp
1407This property can also be referred to by its shortened column name,
1408.Sy rdonly .
1409.It Sy recordsize Ns = Ns Ar size
1410Specifies a suggested block size for files in the file system.
1411This property is designed solely for use with database workloads that access
1412files in fixed-size records.
1413ZFS automatically tunes block sizes according to internal algorithms optimized
1414for typical access patterns.
1415.Pp
1416For databases that create very large files but access them in small random
1417chunks, these algorithms may be suboptimal.
1418Specifying a
1419.Sy recordsize
1420greater than or equal to the record size of the database can result in
1421significant performance gains.
1422Use of this property for general purpose file systems is strongly discouraged,
1423and may adversely affect performance.
1424.Pp
1425The size specified must be a power of two greater than or equal to
1426.Ar 512B
1427and less than or equal to
1428.Ar 128kB .
1429If the
1430.Sy large_blocks
1431feature is enabled on the pool, the size may be up to
1432.Ar 1MB .
1433See
1434.Xr zpool-features 7
1435for details on ZFS feature flags.
1436.Pp
1437Changing the file system's
1438.Sy recordsize
1439affects only files created afterward; existing files are unaffected.
1440.Pp
1441This property can also be referred to by its shortened column name,
1442.Sy recsize .
1443.It Sy redundant_metadata Ns = Ns Sy all Ns | Ns Sy most
1444Controls what types of metadata are stored redundantly.
1445ZFS stores an extra copy of metadata, so that if a single block is corrupted,
1446the amount of user data lost is limited.
1447This extra copy is in addition to any redundancy provided at the pool level
1448.Pq e.g. by mirroring or RAID-Z ,
1449and is in addition to an extra copy specified by the
1450.Sy copies
1451property
1452.Pq up to a total of 3 copies .
1453For example if the pool is mirrored,
1454.Sy copies Ns = Ns 2 ,
1455and
1456.Sy redundant_metadata Ns = Ns Sy most ,
1457then ZFS stores 6 copies of most metadata, and 4 copies of data and some
1458metadata.
1459.Pp
1460When set to
1461.Sy all ,
1462ZFS stores an extra copy of all metadata.
1463If a single on-disk block is corrupt, at worst a single block of user data
1464.Po which is
1465.Sy recordsize
1466bytes long
1467.Pc
1468can be lost.
1469.Pp
1470When set to
1471.Sy most ,
1472ZFS stores an extra copy of most types of metadata.
1473This can improve performance of random writes, because less metadata must be
1474written.
1475In practice, at worst about 100 blocks
1476.Po of
1477.Sy recordsize
1478bytes each
1479.Pc
1480of user data can be lost if a single on-disk block is corrupt.
1481The exact behavior of which metadata blocks are stored redundantly may change in
1482future releases.
1483.Pp
1484The default value is
1485.Sy all .
1486.It Sy refquota Ns = Ns Ar size Ns | Ns Sy none
1487Limits the amount of space a dataset can consume.
1488This property enforces a hard limit on the amount of space used.
1489This hard limit does not include space used by descendents, including file
1490systems and snapshots.
1491.It Sy refreservation Ns = Ns Ar size Ns | Ns Sy none Ns | Ns Sy auto
1492The minimum amount of space guaranteed to a dataset, not including its
1493descendents.
1494When the amount of space used is below this value, the dataset is treated as if
1495it were taking up the amount of space specified by
1496.Sy refreservation .
1497The
1498.Sy refreservation
1499reservation is accounted for in the parent datasets' space used, and counts
1500against the parent datasets' quotas and reservations.
1501.Pp
1502If
1503.Sy refreservation
1504is set, a snapshot is only allowed if there is enough free pool space outside of
1505this reservation to accommodate the current number of
1506.Qq referenced
1507bytes in the dataset.
1508.Pp
1509If
1510.Sy refreservation
1511is set to
1512.Sy auto ,
1513a volume is thick provisioned
1514.Po or
1515.Qq not sparse
1516.Pc .
1517.Sy refreservation Ns = Ns Sy auto
1518is only supported on volumes.
1519See
1520.Sy volsize
1521in the
1522.Sx Native Properties
1523section for more information about sparse volumes.
1524.Pp
1525This property can also be referred to by its shortened column name,
1526.Sy refreserv .
1527.It Sy relatime Ns = Ns Sy on Ns | Ns Sy off
1528Controls the manner in which the access time is updated when
1529.Sy atime Ns = Ns Sy on
1530is set.
1531Turning this property on causes the access time to be updated relative
1532to the modify or change time.
1533Access time is only updated if the previous
1534access time was earlier than the current modify or change time or if the
1535existing access time hasn't been updated within the past 24 hours.
1536The default value is
1537.Sy off .
1538The values
1539.Sy on
1540and
1541.Sy off
1542are equivalent to the
1543.Sy relatime
1544and
1545.Sy norelatime
1546mount options.
1547.It Sy reservation Ns = Ns Ar size Ns | Ns Sy none
1548The minimum amount of space guaranteed to a dataset and its descendants.
1549When the amount of space used is below this value, the dataset is treated as if
1550it were taking up the amount of space specified by its reservation.
1551Reservations are accounted for in the parent datasets' space used, and count
1552against the parent datasets' quotas and reservations.
1553.Pp
1554This property can also be referred to by its shortened column name,
1555.Sy reserv .
1556.It Sy secondarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
1557Controls what is cached in the secondary cache
1558.Pq L2ARC .
1559If this property is set to
1560.Sy all ,
1561then both user data and metadata is cached.
1562If this property is set to
1563.Sy none ,
1564then neither user data nor metadata is cached.
1565If this property is set to
1566.Sy metadata ,
1567then only metadata is cached.
1568The default value is
1569.Sy all .
1570.It Sy setuid Ns = Ns Sy on Ns | Ns Sy off
1571Controls whether the setuid bit is respected for the file system.
1572The default value is
1573.Sy on .
1574The values
1575.Sy on
1576and
1577.Sy off
1578are equivalent to the
1579.Sy suid
1580and
1581.Sy nosuid
1582mount options.
1583.It Sy sharesmb Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Ar opts
1584Controls whether the file system is shared by using
1585.Sy Samba USERSHARES
1586and what options are to be used.
1587Otherwise, the file system is automatically shared and unshared with the
1588.Nm zfs Cm share
1589and
1590.Nm zfs Cm unshare
1591commands.
1592If the property is set to on, the
1593.Xr net 8
1594command is invoked to create a
1595.Sy USERSHARE .
1596.Pp
1597Because SMB shares requires a resource name, a unique resource name is
1598constructed from the dataset name.
1599The constructed name is a copy of the
1600dataset name except that the characters in the dataset name, which would be
1601invalid in the resource name, are replaced with underscore (_) characters.
1602Linux does not currently support additional options which might be available
1603on Solaris.
1604.Pp
1605If the
1606.Sy sharesmb
1607property is set to
1608.Sy off ,
1609the file systems are unshared.
1610.Pp
1611The share is created with the ACL (Access Control List) "Everyone:F" ("F"
1612stands for "full permissions", i.e. read and write permissions) and no guest
1613access (which means Samba must be able to authenticate a real user \(em
1614.Xr passwd 5 Ns / Ns Xr shadow 5 Ns - ,
1615LDAP- or
1616.Xr smbpasswd 5 Ns -based )
1617by default.
1618This means that any additional access control
1619(disallow specific user specific access etc) must be done on the underlying file system.
1620.It Sy sharenfs Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Ar opts
1621Controls whether the file system is shared via NFS, and what options are to be
1622used.
1623A file system with a
1624.Sy sharenfs
1625property of
1626.Sy off
1627is managed with the
1628.Xr exportfs 8
1629command and entries in the
1630.Pa /etc/exports
1631file.
1632Otherwise, the file system is automatically shared and unshared with the
1633.Nm zfs Cm share
1634and
1635.Nm zfs Cm unshare
1636commands.
1637If the property is set to
1638.Sy on ,
1639the dataset is shared using the default options:
1640.Dl sec=sys,rw,crossmnt,no_subtree_check
1641.Pp
1642Please note that the options are comma-separated, unlike those found in
1643.Xr exports 5 .
1644This is done to negate the need for quoting, as well as to make parsing
1645with scripts easier.
1646.Pp
1647See
1648.Xr exports 5
1649for the meaning of the default options.
1650Otherwise, the
1651.Xr exportfs 8
1652command is invoked with options equivalent to the contents of this property.
1653.Pp
1654When the
1655.Sy sharenfs
1656property is changed for a dataset, the dataset and any children inheriting the
1657property are re-shared with the new options, only if the property was previously
1658.Sy off ,
1659or if they were shared before the property was changed.
1660If the new property is
1661.Sy off ,
1662the file systems are unshared.
1663.It Sy logbias Ns = Ns Sy latency Ns | Ns Sy throughput
1664Provide a hint to ZFS about handling of synchronous requests in this dataset.
1665If
1666.Sy logbias
1667is set to
1668.Sy latency
1669.Pq the default ,
1670ZFS will use pool log devices
1671.Pq if configured
1672to handle the requests at low latency.
1673If
1674.Sy logbias
1675is set to
1676.Sy throughput ,
1677ZFS will not use configured pool log devices.
1678ZFS will instead optimize synchronous operations for global pool throughput and
1679efficient use of resources.
1680.It Sy snapdev Ns = Ns Sy hidden Ns | Ns Sy visible
1681Controls whether the volume snapshot devices under
1682.Pa /dev/zvol/ Ns Aq Ar pool
1683are hidden or visible.
1684The default value is
1685.Sy hidden .
1686.It Sy snapdir Ns = Ns Sy hidden Ns | Ns Sy visible
1687Controls whether the
1688.Pa .zfs
1689directory is hidden or visible in the root of the file system as discussed in
1690the
1691.Sx Snapshots
1692section of
1693.Xr zfsconcepts 7 .
1694The default value is
1695.Sy hidden .
1696.It Sy sync Ns = Ns Sy standard Ns | Ns Sy always Ns | Ns Sy disabled
1697Controls the behavior of synchronous requests
1698.Pq e.g. fsync, O_DSYNC .
1699.Sy standard
1700is the POSIX-specified behavior of ensuring all synchronous requests
1701are written to stable storage and all devices are flushed to ensure
1702data is not cached by device controllers
1703.Pq this is the default .
1704.Sy always
1705causes every file system transaction to be written and flushed before its
1706system call returns.
1707This has a large performance penalty.
1708.Sy disabled
1709disables synchronous requests.
1710File system transactions are only committed to stable storage periodically.
1711This option will give the highest performance.
1712However, it is very dangerous as ZFS would be ignoring the synchronous
1713transaction demands of applications such as databases or NFS.
1714Administrators should only use this option when the risks are understood.
1715.It Sy version Ns = Ns Ar N Ns | Ns Sy current
1716The on-disk version of this file system, which is independent of the pool
1717version.
1718This property can only be set to later supported versions.
1719See the
1720.Nm zfs Cm upgrade
1721command.
1722.It Sy volsize Ns = Ns Ar size
1723For volumes, specifies the logical size of the volume.
1724By default, creating a volume establishes a reservation of equal size.
1725For storage pools with a version number of 9 or higher, a
1726.Sy refreservation
1727is set instead.
1728Any changes to
1729.Sy volsize
1730are reflected in an equivalent change to the reservation
1731.Pq or Sy refreservation .
1732The
1733.Sy volsize
1734can only be set to a multiple of
1735.Sy volblocksize ,
1736and cannot be zero.
1737.Pp
1738The reservation is kept equal to the volume's logical size to prevent unexpected
1739behavior for consumers.
1740Without the reservation, the volume could run out of space, resulting in
1741undefined behavior or data corruption, depending on how the volume is used.
1742These effects can also occur when the volume size is changed while it is in use
1743.Pq particularly when shrinking the size .
1744Extreme care should be used when adjusting the volume size.
1745.Pp
1746Though not recommended, a
1747.Qq sparse volume
1748.Po also known as
1749.Qq thin provisioned
1750.Pc
1751can be created by specifying the
1752.Fl s
1753option to the
1754.Nm zfs Cm create Fl V
1755command, or by changing the value of the
1756.Sy refreservation
1757property
1758.Po or
1759.Sy reservation
1760property on pool version 8 or earlier
1761.Pc
1762after the volume has been created.
1763A
1764.Qq sparse volume
1765is a volume where the value of
1766.Sy refreservation
1767is less than the size of the volume plus the space required to store its
1768metadata.
1769Consequently, writes to a sparse volume can fail with
1770.Er ENOSPC
1771when the pool is low on space.
1772For a sparse volume, changes to
1773.Sy volsize
1774are not reflected in the
1775.Sy refreservation .
1776A volume that is not sparse is said to be
1777.Qq thick provisioned .
1778A sparse volume can become thick provisioned by setting
1779.Sy refreservation
1780to
1781.Sy auto .
1782.It Sy volmode Ns = Ns Sy default Ns | Ns Sy full Ns | Ns Sy geom Ns | Ns Sy dev Ns | Ns Sy none
1783This property specifies how volumes should be exposed to the OS.
1784Setting it to
1785.Sy full
1786exposes volumes as fully fledged block devices, providing maximal
1787functionality.
1788The value
1789.Sy geom
1790is just an alias for
1791.Sy full
1792and is kept for compatibility.
1793Setting it to
1794.Sy dev
1795hides its partitions.
1796Volumes with property set to
1797.Sy none
1798are not exposed outside ZFS, but can be snapshotted, cloned, replicated, etc,
1799that can be suitable for backup purposes.
1800Value
1801.Sy default
1802means that volumes exposition is controlled by system-wide tunable
1803.Sy zvol_volmode ,
1804where
1805.Sy full ,
1806.Sy dev
1807and
1808.Sy none
1809are encoded as 1, 2 and 3 respectively.
1810The default value is
1811.Sy full .
1812.It Sy vscan Ns = Ns Sy on Ns | Ns Sy off
1813Controls whether regular files should be scanned for viruses when a file is
1814opened and closed.
1815In addition to enabling this property, the virus scan service must also be
1816enabled for virus scanning to occur.
1817The default value is
1818.Sy off .
1819This property is not used by OpenZFS.
1820.It Sy xattr Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy sa
1821Controls whether extended attributes are enabled for this file system.
1822Two styles of extended attributes are supported: either directory-based
1823or system-attribute-based.
1824.Pp
1825The default value of
1826.Sy on
1827enables directory-based extended attributes.
1828This style of extended attribute imposes no practical limit
1829on either the size or number of attributes which can be set on a file.
1830Although under Linux the
1831.Xr getxattr 2
1832and
1833.Xr setxattr 2
1834system calls limit the maximum size to
1835.Sy 64K .
1836This is the most compatible
1837style of extended attribute and is supported by all ZFS implementations.
1838.Pp
1839System-attribute-based xattrs can be enabled by setting the value to
1840.Sy sa .
1841The key advantage of this type of xattr is improved performance.
1842Storing extended attributes as system attributes
1843significantly decreases the amount of disk I/O required.
1844Up to
1845.Sy 64K
1846of data may be stored per-file in the space reserved for system attributes.
1847If there is not enough space available for an extended attribute
1848then it will be automatically written as a directory-based xattr.
1849System-attribute-based extended attributes are not accessible
1850on platforms which do not support the
1851.Sy xattr Ns = Ns Sy sa
1852feature.
1853OpenZFS supports
1854.Sy xattr Ns = Ns Sy sa
1855on both
1856.Fx
1857and Linux.
1858.Pp
1859The use of system-attribute-based xattrs is strongly encouraged for users of
1860SELinux or POSIX ACLs.
1861Both of these features heavily rely on extended
1862attributes and benefit significantly from the reduced access time.
1863.Pp
1864The values
1865.Sy on
1866and
1867.Sy off
1868are equivalent to the
1869.Sy xattr
1870and
1871.Sy noxattr
1872mount options.
1873.It Sy jailed Ns = Ns Sy off Ns | Ns Sy on
1874Controls whether the dataset is managed from a jail.
1875See
1876.Xr zfs-jail 8
1877for more information.
1878Jails are a
1879.Fx
1880feature and are not relevant on other platforms.
1881The default value is
1882.Sy off .
1883.It Sy zoned Ns = Ns Sy on Ns | Ns Sy off
1884Controls whether the dataset is managed from a non-global zone.
1885Zones are a Solaris feature and are not relevant on other platforms.
1886The default value is
1887.Sy off .
1888.El
1889.Pp
1890The following three properties cannot be changed after the file system is
1891created, and therefore, should be set when the file system is created.
1892If the properties are not set with the
1893.Nm zfs Cm create
1894or
1895.Nm zpool Cm create
1896commands, these properties are inherited from the parent dataset.
1897If the parent dataset lacks these properties due to having been created prior to
1898these features being supported, the new file system will have the default values
1899for these properties.
1900.Bl -tag -width ""
1901.It Xo
1902.Sy casesensitivity Ns = Ns Sy sensitive Ns | Ns
1903.Sy insensitive Ns | Ns Sy mixed
1904.Xc
1905Indicates whether the file name matching algorithm used by the file system
1906should be case-sensitive, case-insensitive, or allow a combination of both
1907styles of matching.
1908The default value for the
1909.Sy casesensitivity
1910property is
1911.Sy sensitive .
1912Traditionally,
1913.Ux
1914and POSIX file systems have case-sensitive file names.
1915.Pp
1916The
1917.Sy mixed
1918value for the
1919.Sy casesensitivity
1920property indicates that the file system can support requests for both
1921case-sensitive and case-insensitive matching behavior.
1922Currently, case-insensitive matching behavior on a file system that supports
1923mixed behavior is limited to the SMB server product.
1924For more information about the
1925.Sy mixed
1926value behavior, see the "ZFS Administration Guide".
1927.It Xo
1928.Sy normalization Ns = Ns Sy none Ns | Ns Sy formC Ns | Ns
1929.Sy formD Ns | Ns Sy formKC Ns | Ns Sy formKD
1930.Xc
1931Indicates whether the file system should perform a
1932.Sy unicode
1933normalization of file names whenever two file names are compared, and which
1934normalization algorithm should be used.
1935File names are always stored unmodified, names are normalized as part of any
1936comparison process.
1937If this property is set to a legal value other than
1938.Sy none ,
1939and the
1940.Sy utf8only
1941property was left unspecified, the
1942.Sy utf8only
1943property is automatically set to
1944.Sy on .
1945The default value of the
1946.Sy normalization
1947property is
1948.Sy none .
1949This property cannot be changed after the file system is created.
1950.It Sy utf8only Ns = Ns Sy on Ns | Ns Sy off
1951Indicates whether the file system should reject file names that include
1952characters that are not present in the
1953.Sy UTF-8
1954character code set.
1955If this property is explicitly set to
1956.Sy off ,
1957the normalization property must either not be explicitly set or be set to
1958.Sy none .
1959The default value for the
1960.Sy utf8only
1961property is
1962.Sy off .
1963This property cannot be changed after the file system is created.
1964.El
1965.Pp
1966The
1967.Sy casesensitivity ,
1968.Sy normalization ,
1969and
1970.Sy utf8only
1971properties are also new permissions that can be assigned to non-privileged users
1972by using the ZFS delegated administration feature.
1973.
1974.Ss Temporary Mount Point Properties
1975When a file system is mounted, either through
1976.Xr mount 8
1977for legacy mounts or the
1978.Nm zfs Cm mount
1979command for normal file systems, its mount options are set according to its
1980properties.
1981The correlation between properties and mount options is as follows:
1982.Bl -tag -compact -offset Ds -width "rootcontext="
1983.It Sy atime
1984atime/noatime
1985.It Sy canmount
1986auto/noauto
1987.It Sy devices
1988dev/nodev
1989.It Sy exec
1990exec/noexec
1991.It Sy readonly
1992ro/rw
1993.It Sy relatime
1994relatime/norelatime
1995.It Sy setuid
1996suid/nosuid
1997.It Sy xattr
1998xattr/noxattr
1999.It Sy nbmand
2000mand/nomand
2001.It Sy context Ns =
2002context=
2003.It Sy fscontext Ns =
2004fscontext=
2005.It Sy defcontext Ns =
2006defcontext=
2007.It Sy rootcontext Ns =
2008rootcontext=
2009.El
2010.Pp
2011In addition, these options can be set on a per-mount basis using the
2012.Fl o
2013option, without affecting the property that is stored on disk.
2014The values specified on the command line override the values stored in the
2015dataset.
2016The
2017.Sy nosuid
2018option is an alias for
2019.Sy nodevices , Ns Sy nosetuid .
2020These properties are reported as
2021.Qq temporary
2022by the
2023.Nm zfs Cm get
2024command.
2025If the properties are changed while the dataset is mounted, the new setting
2026overrides any temporary settings.
2027.
2028.Ss User Properties
2029In addition to the standard native properties, ZFS supports arbitrary user
2030properties.
2031User properties have no effect on ZFS behavior, but applications or
2032administrators can use them to annotate datasets
2033.Pq file systems, volumes, and snapshots .
2034.Pp
2035User property names must contain a colon
2036.Pq Qq Sy \&:
2037character to distinguish them from native properties.
2038They may contain lowercase letters, numbers, and the following punctuation
2039characters: colon
2040.Pq Qq Sy \&: ,
2041dash
2042.Pq Qq Sy - ,
2043period
2044.Pq Qq Sy \&. ,
2045and underscore
2046.Pq Qq Sy _ .
2047The expected convention is that the property name is divided into two portions
2048such as
2049.Ar module : Ns Ar property ,
2050but this namespace is not enforced by ZFS.
2051User property names can be at most 256 characters, and cannot begin with a dash
2052.Pq Qq Sy - .
2053.Pp
2054When making programmatic use of user properties, it is strongly suggested to use
2055a reversed DNS domain name for the
2056.Ar module
2057component of property names to reduce the chance that two
2058independently-developed packages use the same property name for different
2059purposes.
2060.Pp
2061The values of user properties are arbitrary strings, are always inherited, and
2062are never validated.
2063All of the commands that operate on properties
2064.Po Nm zfs Cm list ,
2065.Nm zfs Cm get ,
2066.Nm zfs Cm set ,
2067and so forth
2068.Pc
2069can be used to manipulate both native properties and user properties.
2070Use the
2071.Nm zfs Cm inherit
2072command to clear a user property.
2073If the property is not defined in any parent dataset, it is removed entirely.
2074Property values are limited to 8192 bytes.
2075