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