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.\" 22.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. 23.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> 24.\" Copyright (c) 2011, 2014 by Delphix. All rights reserved. 25.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. 26.\" Copyright (c) 2014, Joyent, Inc. All rights reserved. 27.\" Copyright (c) 2014 by Adam Stevko. All rights reserved. 28.\" Copyright 2015 Nexenta Systems, Inc. All Rights Reserved. 29.\" 30.Dd June 8, 2015 31.Dt ZFS 1M 32.Os 33.Sh NAME 34.Nm zfs 35.Nd configures ZFS file systems 36.Sh SYNOPSIS 37.Nm 38.Op Fl \? 39.Nm 40.Cm create 41.Op Fl p 42.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... 43.Ar filesystem 44.Nm 45.Cm create 46.Op Fl ps 47.Op Fl b Ar blocksize 48.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... 49.Fl V Ar size Ar volume 50.Nm 51.Cm destroy 52.Op Fl Rfnprv 53.Ar filesystem Ns | Ns Ar volume 54.Nm 55.Cm destroy 56.Op Fl Rdnprv 57.Ar filesystem Ns | Ns Ar volume Ns @ Ns Ar snap Ns 58.Oo % Ns Ar snap Ns Oo , Ns Ar snap Ns Oo % Ns Ar snap Oc Oc Oc Ns ... 59.Nm 60.Cm destroy 61.Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark 62.Nm 63.Cm snapshot 64.Op Fl r 65.Oo Fl o Ar property Ns = Ns value Oc Ns ... 66.Ar filesystem Ns @ Ns Ar snapname Ns | Ns Ar volume Ns @ Ns Ar snapname Ns ... 67.Nm 68.Cm rollback 69.Op Fl Rfr 70.Ar snapshot 71.Nm 72.Cm clone 73.Op Fl p 74.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... 75.Ar snapshot Ar filesystem Ns | Ns Ar volume 76.Nm 77.Cm promote 78.Ar clone-filesystem 79.Nm 80.Cm rename 81.Op Fl f 82.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot 83.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot 84.Nm 85.Cm rename 86.Op Fl fp 87.Ar filesystem Ns | Ns Ar volume 88.Ar filesystem Ns | Ns Ar volume 89.Nm 90.Cm rename 91.Fl r 92.Ar snapshot Ar snapshot 93.Nm 94.Cm list 95.Op Fl r Ns | Ns Fl d Ar depth 96.Op Fl Hp 97.Oo Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... Oc 98.Oo Fl s Ar property Oc Ns ... 99.Oo Fl S Ar property Oc Ns ... 100.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc 101.Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Oc Ns ... 102.Nm 103.Cm set 104.Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ... 105.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... 106.Nm 107.Cm get 108.Op Fl r Ns | Ns Fl d Ar depth 109.Op Fl Hp 110.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc 111.Oo Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... Oc 112.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc 113.Cm all | Ar property Ns Oo , Ns Ar property Oc Ns ... 114.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... 115.Nm 116.Cm inherit 117.Op Fl rS 118.Ar property Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... 119.Nm 120.Cm upgrade 121.Nm 122.Cm upgrade 123.Fl v 124.Nm 125.Cm upgrade 126.Op Fl r 127.Op Fl V Ar version 128.Fl a | Ar filesystem 129.Nm 130.Cm userspace 131.Op Fl Hinp 132.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc 133.Oo Fl s Ar field Oc Ns ... 134.Oo Fl S Ar field Oc Ns ... 135.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc 136.Ar filesystem Ns | Ns Ar snapshot 137.Nm 138.Cm groupspace 139.Op Fl Hinp 140.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc 141.Oo Fl s Ar field Oc Ns ... 142.Oo Fl S Ar field Oc Ns ... 143.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc 144.Ar filesystem Ns | Ns Ar snapshot 145.Nm 146.Cm mount 147.Nm 148.Cm mount 149.Op Fl Ov 150.Op Fl o Ar options 151.Fl a | Ar filesystem 152.Nm 153.Cm unmount 154.Op Fl f 155.Fl a | Ar filesystem Ns | Ns Ar mountpoint 156.Nm 157.Cm share 158.Fl a | Ar filesystem 159.Nm 160.Cm unshare 161.Fl a | Ar filesystem Ns | Ns Ar mountpoint 162.Nm 163.Cm bookmark 164.Ar snapshot bookmark 165.Nm 166.Cm send 167.Op Fl DLPRenpv 168.Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot 169.Ar snapshot 170.Nm 171.Cm send 172.Op Fl Le 173.Op Fl i Ar snapshot Ns | Ns Ar bookmark 174.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot 175.Nm 176.Cm receive 177.Op Fl Fnuv 178.Op Fl o Sy origin Ns = Ns Ar snapshot 179.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot 180.Nm 181.Cm receive 182.Op Fl Fnuv 183.Op Fl d Ns | Ns Fl e 184.Op Fl o Sy origin Ns = Ns Ar snapshot 185.Ar filesystem 186.Nm 187.Cm allow 188.Ar filesystem Ns | Ns Ar volume 189.Nm 190.Cm allow 191.Op Fl dglu 192.Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ... 193.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns 194.Ar setname Oc Ns ... 195.Ar filesystem Ns | Ns Ar volume 196.Nm 197.Cm allow 198.Op Fl dl 199.Fl e Ns | Ns Sy everyone 200.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns 201.Ar setname Oc Ns ... 202.Ar filesystem Ns | Ns Ar volume 203.Nm 204.Cm allow 205.Fl c 206.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns 207.Ar setname Oc Ns ... 208.Ar filesystem Ns | Ns Ar volume 209.Nm 210.Cm allow 211.Fl s No @ Ns Ar setname 212.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns 213.Ar setname Oc Ns ... 214.Ar filesystem Ns | Ns Ar volume 215.Nm 216.Cm unallow 217.Op Fl dglru 218.Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ... 219.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns 220.Ar setname Oc Ns ... Oc 221.Ar filesystem Ns | Ns Ar volume 222.Nm 223.Cm unallow 224.Op Fl dlr 225.Fl e Ns | Ns Sy everyone 226.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns 227.Ar setname Oc Ns ... Oc 228.Ar filesystem Ns | Ns Ar volume 229.Nm 230.Cm unallow 231.Op Fl r 232.Fl c 233.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns 234.Ar setname Oc Ns ... Oc 235.Ar filesystem Ns | Ns Ar volume 236.Nm 237.Cm unallow 238.Op Fl r 239.Fl s @ Ns Ar setname 240.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns 241.Ar setname Oc Ns ... Oc 242.Ar filesystem Ns | Ns Ar volume 243.Nm 244.Cm hold 245.Op Fl r 246.Ar tag Ar snapshot Ns ... 247.Nm 248.Cm holds 249.Op Fl r 250.Ar snapshot Ns ... 251.Nm 252.Cm release 253.Op Fl r 254.Ar tag Ar snapshot Ns ... 255.Nm 256.Cm diff 257.Op Fl FHt 258.Ar snapshot Ar snapshot Ns | Ns Ar filesystem 259.Sh DESCRIPTION 260The 261.Nm 262command configures ZFS datasets within a ZFS storage pool, as described in 263.Xr zpool 1M . 264A dataset is identified by a unique path within the ZFS namespace. For example: 265.Bd -literal 266pool/{filesystem,volume,snapshot} 267.Ed 268.Pp 269where the maximum length of a dataset name is 270.Dv MAXNAMELEN 271.Pq 256 bytes . 272.Pp 273A dataset can be one of the following: 274.Bl -tag -width "file system" 275.It Sy file system 276A ZFS dataset of type 277.Sy filesystem 278can be mounted within the standard system namespace and behaves like other file 279systems. While ZFS file systems are designed to be POSIX compliant, known issues 280exist that prevent compliance in some cases. Applications that depend on 281standards conformance might fail due to non-standard behavior when checking file 282system free space. 283.It Sy volume 284A logical volume exported as a raw or block device. This type of dataset should 285only be used under special circumstances. File systems are typically used in 286most environments. 287.It Sy snapshot 288A read-only version of a file system or volume at a given point in time. It is 289specified as 290.Ar filesystem Ns @ Ns Ar name 291or 292.Ar volume Ns @ Ns Ar name . 293.El 294.Ss ZFS File System Hierarchy 295A ZFS storage pool is a logical collection of devices that provide space for 296datasets. A storage pool is also the root of the ZFS file system hierarchy. 297.Pp 298The root of the pool can be accessed as a file system, such as mounting and 299unmounting, taking snapshots, and setting properties. The physical storage 300characteristics, however, are managed by the 301.Xr zpool 1M 302command. 303.Pp 304See 305.Xr zpool 1M 306for more information on creating and administering pools. 307.Ss Snapshots 308A snapshot is a read-only copy of a file system or volume. Snapshots can be 309created extremely quickly, and initially consume no additional space within the 310pool. As data within the active dataset changes, the snapshot consumes more 311data than would otherwise be shared with the active dataset. 312.Pp 313Snapshots can have arbitrary names. Snapshots of volumes can be cloned or 314rolled back, but cannot be accessed independently. 315.Pp 316File system snapshots can be accessed under the 317.Pa .zfs/snapshot 318directory in the root of the file system. Snapshots are automatically mounted on 319demand and may be unmounted at regular intervals. The visibility of the 320.Pa .zfs 321directory can be controlled by the 322snapdir 323property. 324.Ss Clones 325A clone is a writable volume or file system whose initial contents are the same 326as another dataset. As with snapshots, creating a clone is nearly instantaneous, 327and initially consumes no additional space. 328.Pp 329Clones can only be created from a snapshot. When a snapshot is cloned, it 330creates an implicit dependency between the parent and child. Even though the 331clone is created somewhere else in the dataset hierarchy, the original snapshot 332cannot be destroyed as long as a clone exists. The 333.Sy origin 334property exposes this dependency, and the 335.Cm destroy 336command lists any such dependencies, if they exist. 337.Pp 338The clone parent-child dependency relationship can be reversed by using the 339.Cm promote 340subcommand. This causes the 341.Qq origin 342file system to become a clone of the specified file system, which makes it 343possible to destroy the file system that the clone was created from. 344.Ss "Mount Points" 345Creating a ZFS file system is a simple operation, so the number of file systems 346per system is likely to be numerous. To cope with this, ZFS automatically 347manages mounting and unmounting file systems without the need to edit the 348.Pa /etc/vfstab 349file. All automatically managed file systems are mounted by ZFS at boot time. 350.Pp 351By default, file systems are mounted under 352.Pa /path , 353where 354.Ar path 355is the name of the file system in the ZFS namespace. Directories are created and 356destroyed as needed. 357.Pp 358A file system can also have a mount point set in the 359.Sy mountpoint 360property. This directory is created as needed, and ZFS automatically mounts the 361file system when the 362.Nm zfs Cm mount Fl a 363command is invoked 364.Po without editing 365.Pa /etc/vfstab 366.Pc . 367The 368.Sy mountpoint 369property can be inherited, so if 370.Em pool/home 371has a mount point of 372.Pa /export/stuff , 373then 374.Em pool/home/user 375automatically inherits a mount point of 376.Pa /export/stuff/user . 377.Pp 378A file system 379.Sy mountpoint 380property of 381.Sy none 382prevents the file system from being mounted. 383.Pp 384If needed, ZFS file systems can also be managed with traditional tools 385.Po 386.Nm mount , 387.Nm umount , 388.Pa /etc/vfstab 389.Pc . 390If a file system's mount point is set to 391.Sy legacy , 392ZFS makes no attempt to manage the file system, and the administrator is 393responsible for mounting and unmounting the file system. 394.Ss "Zones" 395A ZFS file system can be added to a non-global zone by using the 396.Nm zonecfg Cm add Sy fs 397subcommand. A ZFS file system that is added to a non-global zone must have its 398.Sy mountpoint 399property set to 400.Sy legacy . 401.Pp 402The physical properties of an added file system are controlled by the global 403administrator. However, the zone administrator can create, modify, or destroy 404files within the added file system, depending on how the file system is mounted. 405.Pp 406A dataset can also be delegated to a non-global zone by using the 407.Nm zonecfg Cm add Sy dataset 408subcommand. You cannot delegate a dataset to one zone and the children of the 409same dataset to another zone. The zone administrator can change properties of 410the dataset or any of its children. However, the 411.Sy quota , 412.Sy filesystem_limit 413and 414.Sy snapshot_limit 415properties of the delegated dataset can be modified only by the global 416administrator. 417.Pp 418A ZFS volume can be added as a device to a non-global zone by using the 419.Nm zonecfg Cm add Sy device 420subcommand. However, its physical properties can be modified only by the global 421administrator. 422.Pp 423For more information about 424.Nm zonecfg 425syntax, see 426.Xr zonecfg 1M . 427.Pp 428After a dataset is delegated to a non-global zone, the 429.Sy zoned 430property is automatically set. A zoned file system cannot be mounted in the 431global zone, since the zone administrator might have to set the mount point to 432an unacceptable value. 433.Pp 434The global administrator can forcibly clear the 435.Sy zoned 436property, though this should be done with extreme care. The global administrator 437should verify that all the mount points are acceptable before clearing the 438property. 439.Ss Native Properties 440Properties are divided into two types, native properties and user-defined 441.Po or 442.Qq user 443.Pc 444properties. Native properties either export internal statistics or control ZFS 445behavior. In addition, native properties are either editable or read-only. User 446properties have no effect on ZFS behavior, but you can use them to annotate 447datasets in a way that is meaningful in your environment. For more information 448about user properties, see the 449.Sx User Properties 450section, below. 451.Pp 452Every dataset has a set of properties that export statistics about the dataset 453as well as control various behaviors. Properties are inherited from the parent 454unless overridden by the child. Some properties apply only to certain types of 455datasets 456.Pq file systems, volumes, or snapshots . 457.Pp 458The values of numeric properties can be specified using human-readable suffixes 459.Po for example, 460.Sy k , 461.Sy KB , 462.Sy M , 463.Sy Gb , 464and so forth, up to 465.Sy Z 466for zettabyte 467.Pc . 468The following are all valid 469.Pq and equal 470specifications: 471.Li 1536M, 1.5g, 1.50GB . 472.Pp 473The values of non-numeric properties are case sensitive and must be lowercase, 474except for 475.Sy mountpoint , 476.Sy sharenfs , 477and 478.Sy sharesmb . 479.Pp 480The following native properties consist of read-only statistics about the 481dataset. These properties can be neither set, nor inherited. Native properties 482apply to all dataset types unless otherwise noted. 483.Bl -tag -width "usedbyrefreservation" 484.It Sy available 485The amount of space available to the dataset and all its children, assuming that 486there is no other activity in the pool. Because space is shared within a pool, 487availability can be limited by any number of factors, including physical pool 488size, quotas, reservations, or other datasets within the pool. 489.Pp 490This property can also be referred to by its shortened column name, 491.Sy avail . 492.It Sy compressratio 493For non-snapshots, the compression ratio achieved for the 494.Sy used 495space of this dataset, expressed as a multiplier. The 496.Sy used 497property includes descendant datasets, and, for clones, does not include the 498space shared with the origin snapshot. For snapshots, the 499.Sy compressratio 500is the same as the 501.Sy refcompressratio 502property. Compression can be turned on by running: 503.Nm zfs Cm set Sy compression Ns = Ns Sy on Ar dataset . 504The default value is 505.Sy off . 506.It Sy creation 507The time this dataset was created. 508.It Sy clones 509For snapshots, this property is a comma-separated list of filesystems or volumes 510which are clones of this snapshot. The clones' 511.Sy origin 512property is this snapshot. If the 513.Sy clones 514property is not empty, then this snapshot can not be destroyed 515.Po even with the 516.Fl r 517or 518.Fl f 519options 520.Pc . 521.It Sy defer_destroy 522This property is 523.Sy on 524if the snapshot has been marked for deferred destroy by using the 525.Nm zfs Cm destroy Fl d 526command. Otherwise, the property is 527.Sy off . 528.It Sy filesystem_count 529The total number of filesystems and volumes that exist under this location in 530the dataset tree. This value is only available when a 531.Sy filesystem_limit 532has been set somewhere in the tree under which the dataset resides. 533.It Sy logicalreferenced 534The amount of space that is 535.Qq logically 536accessible by this dataset. See the 537.Sy referenced 538property. The logical space ignores the effect of the 539.Sy compression 540and 541.Sy copies 542properties, giving a quantity closer to the amount of data that applications 543see. However, it does include space consumed by metadata. 544.Pp 545This property can also be referred to by its shortened column name, 546.Sy lrefer . 547.It Sy logicalused 548The amount of space that is 549.Qq logically 550consumed by this dataset and all its descendents. See the 551.Sy used 552property. The logical space ignores the effect of the 553.Sy compression 554and 555.Sy copies 556properties, giving a quantity closer to the amount of data that applications 557see. However, it does include space consumed by metadata. 558.Pp 559This property can also be referred to by its shortened column name, 560.Sy lused . 561.It Sy mounted 562For file systems, indicates whether the file system is currently mounted. This 563property can be either 564.Sy yes 565or 566.Sy no . 567.It Sy origin 568For cloned file systems or volumes, the snapshot from which the clone was 569created. See also the 570.Sy clones 571property. 572.It Sy referenced 573The amount of data that is accessible by this dataset, which may or may not be 574shared with other datasets in the pool. When a snapshot or clone is created, it 575initially references the same amount of space as the file system or snapshot it 576was created from, since its contents are identical. 577.Pp 578This property can also be referred to by its shortened column name, 579.Sy refer . 580.It Sy refcompressratio 581The compression ratio achieved for the 582.Sy referenced 583space of this dataset, expressed as a multiplier. See also the 584.Sy compressratio 585property. 586.It Sy snapshot_count 587The total number of snapshots that exist under this location in the dataset 588tree. This value is only available when a 589.Sy snapshot_limit 590has been set somewhere in the tree under which the dataset resides. 591.It Sy type 592The type of dataset: 593.Sy filesystem , 594.Sy volume , 595or 596.Sy snapshot . 597.It Sy used 598The amount of space consumed by this dataset and all its descendents. This is 599the value that is checked against this dataset's quota and reservation. The 600space used does not include this dataset's reservation, but does take into 601account the reservations of any descendent datasets. The amount of space that a 602dataset consumes from its parent, as well as the amount of space that are freed 603if this dataset is recursively destroyed, is the greater of its space used and 604its reservation. 605.Pp 606When snapshots 607.Po see the 608.Sx Snapshots 609section 610.Pc 611are created, their space is initially shared between the snapshot and 612the file system, and possibly with previous snapshots. As the file system 613changes, space that was previously shared becomes unique to the snapshot, and 614counted in the snapshot's space used. Additionally, deleting snapshots can 615increase the amount of space unique to 616.Pq and used by 617other snapshots. 618.Pp 619The amount of space used, available, or referenced does not take into account 620pending changes. Pending changes are generally accounted for within a few 621seconds. Committing a change to a disk using 622.Xr fsync 3C 623or 624.Dv O_SYNC 625does not necessarily guarantee that the space usage information is updated 626immediately. 627.It Sy usedby* 628The 629.Sy usedby* 630properties decompose the 631.Sy used 632properties into the various reasons that space is used. Specifically, 633.Sy used No = 634.Sy usedbychildren No + 635.Sy usedbydataset No + 636.Sy usedbyrefreservation No + 637.Sy usedbysnapshots . 638These properties are only available for datasets created on 639.Nm zpool 640.Qo version 13 Qc 641pools. 642.It Sy usedbychildren 643The amount of space used by children of this dataset, which would be freed if 644all the dataset's children were destroyed. 645.It Sy usedbydataset 646The amount of space used by this dataset itself, which would be freed if the 647dataset were destroyed 648.Po after first removing any 649.Sy refreservation 650and destroying any necessary snapshots or descendents 651.Pc . 652.It Sy usedbyrefreservation 653The amount of space used by a 654.Sy refreservation 655set on this dataset, which would be freed if the 656.Sy refreservation 657was removed. 658.It Sy usedbysnapshots 659The amount of space consumed by snapshots of this dataset. In particular, it is 660the amount of space that would be freed if all of this dataset's snapshots were 661destroyed. Note that this is not simply the sum of the snapshots' 662.Sy used 663properties because space can be shared by multiple snapshots. 664.It Sy userused Ns @ Ns Em user 665The amount of space consumed by the specified user in this dataset. Space is 666charged to the owner of each file, as displayed by 667.Nm ls Fl l . 668The amount of space charged is displayed by 669.Nm du 670and 671.Nm ls Fl s . 672See the 673.Nm zfs Cm userspace 674subcommand for more information. 675.Pp 676Unprivileged users can access only their own space usage. The root user, or a 677user who has been granted the 678.Sy userused 679privilege with 680.Nm zfs Cm allow , 681can access everyone's usage. 682.Pp 683The 684.Sy userused Ns @ Ns Em ... 685properties are not displayed by 686.Nm zfs Cm get Sy all . 687The user's name must be appended after the @ symbol, using one of the following 688forms: 689.Bl -bullet -width "" 690.It 691.Em POSIX name 692.Po for example, 693.Sy joe 694.Pc 695.It 696.Em POSIX numeric ID 697.Po for example, 698.Sy 789 699.Pc 700.It 701.Em SID name 702.Po for example, 703.Sy joe.smith@mydomain 704.Pc 705.It 706.Em SID numeric ID 707.Po for example, 708.Sy S-1-123-456-789 709.Pc 710.El 711.It Sy userrefs 712This property is set to the number of user holds on this snapshot. User holds 713are set by using the 714.Nm zfs Cm hold 715command. 716.It Sy groupused Ns @ Ns Em group 717The amount of space consumed by the specified group in this dataset. Space is 718charged to the group of each file, as displayed by 719.Nm ls Fl l . 720See the 721.Sy userused Ns @ Ns Em user 722property for more information. 723.Pp 724Unprivileged users can only access their own groups' space usage. The root user, 725or a user who has been granted the 726.Sy groupused 727privilege with 728.Nm zfs Cm allow , 729can access all groups' usage. 730.It Sy volblocksize Ns = Ns Em blocksize 731For volumes, specifies the block size of the volume. The 732.Sy blocksize 733cannot be changed once the volume has been written, so it should be set at 734volume creation time. The default 735.Sy blocksize 736for volumes is 8 Kbytes. Any power of 2 from 512 bytes to 128 Kbytes is valid. 737.Pp 738This property can also be referred to by its shortened column name, 739.Sy volblock . 740.It Sy written 741The amount of 742.Sy referenced 743space written to this dataset since the previous snapshot. 744.It Sy written Ns @ Ns Em snapshot 745The amount of 746.Sy referenced 747space written to this dataset since the specified snapshot. This is the space 748that is referenced by this dataset but was not referenced by the specified 749snapshot. 750.Pp 751The 752.Em snapshot 753may be specified as a short snapshot name 754.Po just the part after the 755.Sy @ 756.Pc , 757in which case it will be interpreted as a snapshot in the same filesystem as 758this dataset. The 759.Em snapshot 760may be a full snapshot name 761.No Po Em filesystem Ns @ Ns Em snapshot Pc , 762which for clones may be a snapshot in the origin's filesystem 763.Pq or the origin of the origin's filesystem, etc. 764.El 765.Pp 766The following native properties can be used to change the behavior of a ZFS 767dataset. 768.Bl -tag -width "" 769.It Xo 770.Sy aclinherit Ns = Ns Sy discard Ns | Ns Sy noallow Ns | Ns 771.Sy restricted Ns | Ns Sy passthrough Ns | Ns Sy passthrough-x 772.Xc 773Controls how 774.Sy ACE Ns s 775are inherited when files and directories are created. 776.Bl -tag -width "passthrough-x" 777.It Sy discard 778does not inherit any 779.Sy ACE Ns s . 780.It Sy noallow 781only inherits inheritable 782.Sy ACE Ns s 783that specify 784.Qq deny 785permissions. 786.It Sy restricted 787default, removes the 788.Sy write_acl 789and 790.Sy write_owner 791permissions when the 792.Sy ACE 793is inherited. 794.It Sy passthrough 795inherits all inheritable 796.Sy ACE Ns s 797without any modifications. 798.It Sy passthrough-x 799same meaning as 800.Sy passthrough , 801except that the 802.Sy owner@ , 803.Sy group@ , 804and 805.Sy everyone@ 806.Sy ACE Ns s 807inherit the execute permission only if the file creation mode also requests the 808execute bit. 809.El 810.Pp 811When the property value is set to 812.Sy passthrough , 813files are created with a mode determined by the inheritable 814.Sy ACE Ns s . 815If no inheritable 816.Sy ACE Ns s 817exist that affect the mode, then the mode is set in accordance to the requested 818mode from the application. 819.It Xo 820.Sy aclmode Ns = Ns Sy discard Ns | Ns Sy groupmask Ns | Ns 821.Sy passthrough Ns | Ns Sy restricted 822.Xc 823Controls how an 824.Sy ACL 825is modified during 826.Xr chmod 2 . 827.Bl -tag -width "passthrough" 828.It Sy discard 829default, deletes all 830.Sy ACE Ns s 831that do not represent the mode of the file. 832.It Sy groupmask 833reduces permissions granted in all 834.Sy ALLOW 835entries found in the 836.Sy ACL 837such that they are no greater than the group permissions specified by 838.Xr chmod 2 . 839.It Sy passthrough 840indicates that no changes are made to the 841.Sy ACL 842other than creating or updating the necessary 843.Sy ACE Ns s 844to represent the new mode of the file or directory. 845.It Sy restricted 846causes the 847.Xr chmod 2 848operation to return an error when used on any file or directory which has a 849non-trivial 850.Sy ACE Ns s 851whose entries can not be represented by a mode. 852.El 853.Pp 854.Xr chmod 2 855is required to change the set user ID, set group ID, or sticky bits on a file or 856directory, as they do not have equivalent 857.Sy ACE Ns s. 858In order to use 859.Xr chmod 2 860on a file or directory with a non-trivial 861.Sy ACL 862when 863.Sy aclmode 864is set to 865.Sy restricted , 866you must first remove all 867.Sy ACE Ns s 868which do not represent the current mode. 869.It Sy atime Ns = Ns Sy on Ns | Ns Sy off 870Controls whether the access time for files is updated when they are read. 871Turning this property off avoids producing write traffic when reading files and 872can result in significant performance gains, though it might confuse mailers 873and other similar utilities. The default value is 874.Sy on . 875.It Sy canmount Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy noauto 876If this property is set to 877.Sy off , 878the file system cannot be mounted, and is ignored by 879.Nm zfs Cm mount Fl a . 880Setting this property to 881.Sy off 882is similar to setting the 883.Sy mountpoint 884property to 885.Sy none , 886except that the dataset still has a normal 887.Sy mountpoint 888property, which can be inherited. Setting this property to 889.Sy off 890allows datasets to be used solely as a mechanism to inherit properties. One 891example of setting 892.Sy canmount Ns = Ns Sy off 893is to have two datasets with the same 894.Sy mountpoint , 895so that the children of both datasets appear in the same directory, but might 896have different inherited characteristics. 897.Pp 898When set to 899.Sy noauto , 900a dataset can only be mounted and unmounted explicitly. The dataset is not 901mounted automatically when the dataset is created or imported, nor is it mounted 902by the 903.Nm zfs Cm mount Fl a 904command or unmounted by the 905.Nm zfs Cm unmount Fl a 906command. 907.Pp 908This property is not inherited. 909.It Xo 910.Sy checksum Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy fletcher2 Ns | Ns 911.Sy fletcher4 Ns | Ns Sy sha256 Ns | Ns Sy noparity 912.Xc 913Controls the checksum used to verify data integrity. The default value is 914.Sy on , 915which automatically selects an appropriate algorithm 916.Po currently, 917.Sy fletcher4 , 918but this may change in future releases 919.Pc . 920The value 921.Sy off 922disables integrity checking on user data. The value 923.Sy noparity 924not only disables integrity but also disables maintaining parity for user data. 925This setting is used internally by a dump device residing on a RAID-Z pool and 926should not be used by any other dataset. Disabling checksums is 927.Sy NOT 928a recommended practice. 929.Pp 930Changing this property affects only newly-written data. 931.It Xo 932.Sy compression Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy gzip Ns | Ns 933.Sy gzip- Ns Em N Ns | Ns Sy lz4 Ns | Ns Sy lzjb Ns | Ns Sy zle 934.Xc 935Controls the compression algorithm used for this dataset. 936.Pp 937Setting compression to 938.Sy on 939indicates that the current default compression algorithm should be used. The 940default balances compression and decompression speed, with compression ratio and 941is expected to work well on a wide variety of workloads. Unlike all other 942settings for this property, 943.Sy on 944does not select a fixed compression type. As new compression algorithms are 945added to ZFS and enabled on a pool, the default compression algorithm may 946change. The current default compression algorthm is either 947.Sy lzjb 948or, if the 949.Sy lz4_compress 950feature is enabled, 951.Sy lz4 . 952.Pp 953The 954.Sy lz4 955compression algorithm is a high-performance replacement for the 956.Sy lzjb 957algorithm. It features significantly faster compression and decompression, as 958well as a moderately higher compression ratio than 959.Sy lzjb , 960but can only be used on pools with the 961.Sy lz4_compress 962feature set to 963.Sy enabled . 964See 965.Xr zpool-features 5 966for details on ZFS feature flags and the 967.Sy lz4_compress 968feature. 969.Pp 970The 971.Sy lzjb 972compression algorithm is optimized for performance while providing decent data 973compression. 974.Pp 975The 976.Sy gzip 977compression algorithm uses the same compression as the 978.Xr gzip 1 979command. You can specify the 980.Sy gzip 981level by using the value 982.Sy gzip- Ns Em N , 983where 984.Em N 985is an integer from 1 986.Pq fastest 987to 9 988.Pq best compression ratio . 989Currently, 990.Sy gzip 991is equivalent to 992.Sy gzip-6 993.Po which is also the default for 994.Xr gzip 1 995.Pc . 996.Pp 997The 998.Sy zle 999compression algorithm compresses runs of zeros. 1000.Pp 1001This property can also be referred to by its shortened column name 1002\fBcompress\fR. Changing this property affects only newly-written data. 1003.It Sy copies Ns = Ns Sy 1 Ns | Ns Sy 2 Ns | Ns Sy 3 1004Controls the number of copies of data stored for this dataset. These copies are 1005in addition to any redundancy provided by the pool, for example, mirroring or 1006RAID-Z. The copies are stored on different disks, if possible. The space used 1007by multiple copies is charged to the associated file and dataset, changing the 1008.Sy used 1009property and counting against quotas and reservations. 1010.Pp 1011Changing this property only affects newly-written data. Therefore, set this 1012property at file system creation time by using the 1013.Fl o Sy copies Ns = Ns Ar N 1014option. 1015.It Sy devices Ns = Ns Sy on Ns | Ns Sy off 1016Controls whether device nodes can be opened on this file system. The default 1017value is 1018.Sy on . 1019.It Sy exec Ns = Ns Sy on Ns | Ns Sy off 1020Controls whether processes can be executed from within this file system. The 1021default value is 1022.Sy on . 1023.It Sy filesystem_limit Ns = Ns Em count Ns | Ns Sy none 1024Limits the number of filesystems and volumes that can exist under this point in 1025the dataset tree. The limit is not enforced if the user is allowed to change 1026the limit. Setting a 1027.Sy filesystem_limit 1028to 1029.Sy on 1030a descendent of a filesystem that already has a 1031.Sy filesystem_limit 1032does not override the ancestor's 1033.Sy filesystem_limit , 1034but rather imposes an additional limit. This feature must be enabled to be used 1035.Po see 1036.Xr zpool-features 5 1037.Pc . 1038.It Sy mountpoint Ns = Ns Pa path Ns | Ns Sy none Ns | Ns Sy legacy 1039Controls the mount point used for this file system. See the 1040.Sx Mount Points 1041section for more information on how this property is used. 1042.Pp 1043When the 1044.Sy mountpoint 1045property is changed for a file system, the file system and any children that 1046inherit the mount point are unmounted. If the new value is 1047.Sy legacy , 1048then they remain unmounted. Otherwise, they are automatically remounted in the 1049new location if the property was previously 1050.Sy legacy 1051or 1052.Sy none , 1053or if they were mounted before the property was changed. In addition, any shared 1054file systems are unshared and shared in the new location. 1055.It Sy nbmand Ns = Ns Sy on Ns | Ns Sy off 1056Controls whether the file system should be mounted with 1057.Sy nbmand 1058.Pq Non Blocking mandatory locks . 1059This is used for SMB clients. Changes to this property only take effect when the 1060file system is umounted and remounted. See 1061.Xr mount 1M 1062for more information on 1063.Sy nbmand 1064mounts. 1065.It Sy primarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata 1066Controls what is cached in the primary cache 1067.Pq ARC . 1068If this property is set to 1069.Sy all , 1070then both user data and metadata is cached. If this property is set to 1071.Sy none , 1072then neither user data nor metadata is cached. If this property is set to 1073.Sy metadata , 1074then only metadata is cached. The default value is 1075.Sy all . 1076.It Sy quota Ns = Ns Em size Ns | Ns Sy none 1077Limits the amount of space a dataset and its descendents can consume. This 1078property enforces a hard limit on the amount of space used. This includes all 1079space consumed by descendents, including file systems and snapshots. Setting a 1080quota on a descendent of a dataset that already has a quota does not override 1081the ancestor's quota, but rather imposes an additional limit. 1082.Pp 1083Quotas cannot be set on volumes, as the 1084.Sy volsize 1085property acts as an implicit quota. 1086.It Sy snapshot_limit Ns = Ns Em count Ns | Ns Sy none 1087Limits the number of snapshots that can be created on a dataset and its 1088descendents. Setting a 1089.Sy snapshot_limit 1090on a descendent of a dataset that already has a 1091.Sy snapshot_limit 1092does not override the ancestor's 1093.Sy snapshot_limit , 1094but rather imposes an additional limit. The limit is not enforced if the user is 1095allowed to change the limit. For example, this means that recursive snapshots 1096taken from the global zone are counted against each delegated dataset within 1097a zone. This feature must be enabled to be used 1098.Po see 1099.Xr zpool-features 5 1100.Pc . 1101.It Sy userquota@ Ns Em user Ns = Ns Em size Ns | Ns Sy none 1102Limits the amount of space consumed by the specified user. User space 1103consumption is identified by the 1104.Sy userspace@ Ns Em user 1105property. 1106.Pp 1107Enforcement of user quotas may be delayed by several seconds. This delay means 1108that a user might exceed their quota before the system notices that they are 1109over quota and begins to refuse additional writes with the 1110.Er EDQUOT 1111error message. See the 1112.Nm zfs Cm userspace 1113subcommand for more information. 1114.Pp 1115Unprivileged users can only access their own groups' space usage. The root 1116user, or a user who has been granted the 1117.Sy userquota 1118privilege with 1119.Nm zfs Cm allow , 1120can get and set everyone's quota. 1121.Pp 1122This property is not available on volumes, on file systems before version 4, or 1123on pools before version 15. The 1124.Sy userquota@ Ns Em ... 1125properties are not displayed by 1126.Nm zfs Cm get Sy all . 1127The user's name must be appended after the 1128.Sy @ 1129symbol, using one of the following forms: 1130.Bl -bullet 1131.It 1132.Em POSIX name 1133.Po for example, 1134.Sy joe 1135.Pc 1136.It 1137.Em POSIX numeric ID 1138.Po for example, 1139.Sy 789 1140.Pc 1141.It 1142.Em SID name 1143.Po for example, 1144.Sy joe.smith@mydomain 1145.Pc 1146.It 1147.Em SID numeric ID 1148.Po for example, 1149.Sy S-1-123-456-789 1150.Pc 1151.El 1152.It Sy groupquota@ Ns Em group Ns = Ns Em size Ns | Ns Sy none 1153Limits the amount of space consumed by the specified group. Group space 1154consumption is identified by the 1155.Sy groupused@ Ns Em group 1156property. 1157.Pp 1158Unprivileged users can access only their own groups' space usage. The root 1159user, or a user who has been granted the 1160.Sy groupquota 1161privilege with 1162.Nm zfs Cm allow , 1163can get and set all groups' quotas. 1164.It Sy readonly Ns = Ns Sy on Ns | Ns Sy off 1165Controls whether this dataset can be modified. The default value is 1166.Sy off . 1167.Pp 1168This property can also be referred to by its shortened column name, 1169.Sy rdonly . 1170.It Sy recordsize Ns = Ns Em size 1171Specifies a suggested block size for files in the file system. This property is 1172designed solely for use with database workloads that access files in fixed-size 1173records. ZFS automatically tunes block sizes according to internal algorithms 1174optimized for typical access patterns. 1175.Pp 1176For databases that create very large files but access them in small random 1177chunks, these algorithms may be suboptimal. Specifying a 1178.Sy recordsize 1179greater than or equal to the record size of the database can result in 1180significant performance gains. Use of this property for general purpose file 1181systems is strongly discouraged, and may adversely affect performance. 1182.Pp 1183The size specified must be a power of two greater than or equal to 512 and less 1184than or equal to 128 Kbytes. If the 1185.Sy large_blocks 1186feature is enabled on the pool, the size may be up to 1 Mbyte. See 1187.Xr zpool-features 5 1188for details on ZFS feature flags. 1189.Pp 1190Changing the file system's 1191.Sy recordsize 1192affects only files created afterward; existing files are unaffected. 1193.Pp 1194This property can also be referred to by its shortened column name, 1195.Sy recsize . 1196.It Sy redundant_metadata Ns = Ns Sy all Ns | Ns Sy most 1197Controls what types of metadata are stored redundantly. ZFS stores an extra copy 1198of metadata, so that if a single block is corrupted, the amount of user data 1199lost is limited. This extra copy is in addition to any redundancy provided at 1200the pool level 1201.Pq e.g. by mirroring or RAID-Z , 1202and is in addition to an extra copy specified by the 1203.Sy copies 1204property 1205.Pq up to a total of 3 copies . 1206For example if the pool is mirrored, 1207.Sy copies Ns = Ns 2 , 1208and 1209.Sy redundant_metadata Ns = Ns Sy most , 1210then ZFS stores 6 copies of most metadata, and 4 copies of data and some 1211metadata. 1212.Pp 1213When set to 1214.Sy all , 1215ZFS stores an extra copy of all metadata. If a single on-disk block is corrupt, 1216at worst a single block of user data 1217.Po which is 1218.Sy recordsize 1219bytes long 1220.Pc 1221can be lost. 1222.Pp 1223When set to 1224.Sy most , 1225ZFS stores an extra copy of most types of metadata. This can improve performance 1226of random writes, because less metadata must be written. In practice, at worst 1227about 100 blocks 1228.Po of 1229.Sy recordsize 1230bytes each 1231.Pc 1232of user data can be lost if a single on-disk block is corrupt. The exact 1233behavior of which metadata blocks are stored redundantly may change in future 1234releases. 1235.Pp 1236The default value is 1237.Sy all . 1238.It Sy refquota Ns = Ns Em size Ns | Ns Sy none 1239Limits the amount of space a dataset can consume. This property enforces a hard 1240limit on the amount of space used. This hard limit does not include space used 1241by descendents, including file systems and snapshots. 1242.It Sy refreservation Ns = Ns Em size Ns | Ns Sy none 1243The minimum amount of space guaranteed to a dataset, not including its 1244descendents. When the amount of space used is below this value, the dataset is 1245treated as if it were taking up the amount of space specified by 1246.Sy refreservation . 1247The 1248.Sy refreservation 1249reservation is accounted for in the parent datasets' space used, and counts 1250against the parent datasets' quotas and reservations. 1251.Pp 1252If 1253.Sy refreservation 1254is set, a snapshot is only allowed if there is enough free pool space outside of 1255this reservation to accommodate the current number of 1256.Qq referenced 1257bytes in the dataset. 1258.Pp 1259This property can also be referred to by its shortened column name, 1260.Sy refreserv . 1261.It Sy reservation Ns = Ns Em size Ns | Ns Sy none 1262The minimum amount of space guaranteed to a dataset and its descendents. When 1263the amount of space used is below this value, the dataset is treated as if it 1264were taking up the amount of space specified by its reservation. Reservations 1265are accounted for in the parent datasets' space used, and count against the 1266parent datasets' quotas and reservations. 1267.Pp 1268This property can also be referred to by its shortened column name, 1269.Sy reserv . 1270.It Sy secondarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata 1271Controls what is cached in the secondary cache 1272.Pq L2ARC . 1273If this property is set to 1274.Sy all , 1275then both user data and metadata is cached. If this property is set to 1276.Sy none , 1277then neither user data nor metadata is cached. If this property is set to 1278.Sy metadata , 1279then only metadata is cached. The default value is 1280.Sy all . 1281.It Sy setuid Ns = Ns Sy on Ns | Ns Sy off 1282Controls whether the setuid bit is respected for the file system. The default 1283value is 1284.Sy on . 1285.It Sy sharesmb Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Em opts 1286Controls whether the file system is shared via SMB, and what options are to be 1287used. A file system with the 1288.Sy sharesmb 1289property set to 1290.Sy off 1291is managed through traditional tools such as 1292.Xr sharemgr 1M . 1293Otherwise, the file system is automatically shared and unshared with the 1294.Nm zfs Cm share 1295and 1296.Nm zfs Cm unshare 1297commands. If the property is set to 1298.Sy on , 1299the 1300.Xr sharemgr 1M 1301command is invoked with no options. Otherwise, the 1302.Xr sharemgr 1M 1303command is invoked with options equivalent to the contents of this property. 1304.Pp 1305Because SMB shares requires a resource name, a unique resource name is 1306constructed from the dataset name. The constructed name is a copy of the dataset 1307name except that the characters in the dataset name, which would be illegal in 1308the resource name, are replaced with underscore 1309.Pq Sy _ 1310characters. A pseudo property 1311.Qq name 1312is also supported that allows you to replace the data set name with a specified 1313name. The specified name is then used to replace the prefix dataset in the case 1314of inheritance. For example, if the dataset 1315.Em data/home/john 1316is set to 1317.Sy name Ns = Ns Sy john , 1318then 1319.Em data/home/john 1320has a resource name of 1321.Sy john . 1322If a child dataset 1323.Em data/home/john/backups 1324is shared, it has a resource name of 1325.Sy john_backups . 1326.Pp 1327When SMB shares are created, the SMB share name appears as an entry in the 1328.Pa .zfs/shares 1329directory. You can use the 1330.Nm ls 1331or 1332.Nm chmod 1333command to display the share-level ACLs on the entries in this directory. 1334.Pp 1335When the 1336.Sy sharesmb 1337property is changed for a dataset, the dataset and any children inheriting the 1338property are re-shared with the new options, only if the property was previously 1339set to 1340.Sy off , 1341or if they were shared before the property was changed. If the new property is 1342set to 1343.Sy off , 1344the file systems are unshared. 1345.It Sy sharenfs Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Em opts 1346Controls whether the file system is shared via NFS, and what options are to be 1347used. A file system with a 1348.Sy sharenfs 1349property of 1350.Sy off 1351is managed through traditional tools such as 1352.Xr share 1M , 1353.Xr unshare 1M , 1354and 1355.Xr dfstab 4 . 1356Otherwise, the file system is automatically shared and unshared with the 1357.Nm zfs Cm share 1358and 1359.Nm zfs Cm unshare 1360commands. If the property is set to 1361.Sy on , 1362.Xr share 1M 1363command is invoked with no options. Otherwise, the 1364.Xr share 1M 1365command is invoked with options equivalent to the contents of this property. 1366.Pp 1367When the 1368.Sy sharenfs 1369property is changed for a dataset, the dataset and any children inheriting the 1370property are re-shared with the new options, only if the property was previously 1371.Sy off , 1372or if they were shared before the property was changed. If the new property is 1373.Sy off , 1374the file systems are unshared. 1375.It Sy logbias Ns = Ns Sy latency Ns | Ns Sy throughput 1376Provide a hint to ZFS about handling of synchronous requests in this dataset. If 1377.Sy logbias 1378is set to 1379.Sy latency 1380.Pq the default , 1381ZFS will use pool log devices 1382.Pq if configured 1383to handle the requests at low latency. If 1384.Sy logbias 1385is set to 1386.Sy throughput , 1387ZFS will not use configured pool log devices. ZFS will instead optimize 1388synchronous operations for global pool throughput and efficient use of 1389resources. 1390.It Sy snapdir Ns = Ns Sy hidden Ns | Ns Sy visible 1391Controls whether the 1392.Pa .zfs 1393directory is hidden or visible in the root of the file system as discussed in 1394the 1395.Sx Snapshots 1396section. The default value is 1397.Sy hidden . 1398.It Sy sync Ns = Ns Sy standard Ns | Ns Sy always Ns | Ns Sy disabled 1399Controls the behavior of synchronous requests 1400.Pq e.g. fsync, O_DSYNC . 1401.Sy standard 1402is the 1403.Tn POSIX 1404specified behavior of ensuring all synchronous requests are written to stable 1405storage and all devices are flushed to ensure data is not cached by device 1406controllers 1407.Pq this is the default . 1408.Sy always 1409causes every file system transaction to be written and flushed before its 1410system call returns. This has a large performance penalty. 1411.Sy disabled 1412disables synchronous requests. File system transactions are only committed to 1413stable storage periodically. This option will give the highest performance. 1414However, it is very dangerous as ZFS would be ignoring the synchronous 1415transaction demands of applications such as databases or NFS. Administrators 1416should only use this option when the risks are understood. 1417.It Sy version Ns = Ns Em N Ns | Ns Sy current 1418The on-disk version of this file system, which is independent of the pool 1419version. This property can only be set to later supported versions. See the 1420.Nm zfs Cm upgrade 1421command. 1422.It Sy volsize Ns = Ns Em size 1423For volumes, specifies the logical size of the volume. By default, creating a 1424volume establishes a reservation of equal size. For storage pools with a version 1425number of 9 or higher, a 1426.Sy refreservation 1427is set instead. Any changes to 1428.Sy volsize 1429are reflected in an equivalent change to the reservation 1430.Po or 1431.Sy refreservation 1432.Pc . 1433The 1434.Sy volsize 1435can only be set to a multiple of 1436.Sy volblocksize , 1437and cannot be zero. 1438.Pp 1439The reservation is kept equal to the volume's logical size to prevent unexpected 1440behavior for consumers. Without the reservation, the volume could run out of 1441space, resulting in undefined behavior or data corruption, depending on how the 1442volume is used. These effects can also occur when the volume size is changed 1443while it is in use 1444.Pq particularly when shrinking the size . 1445Extreme care should be used when adjusting the volume size. 1446.Pp 1447Though not recommended, a 1448.Qq sparse volume 1449.Po also known as 1450.Qq thin provisioning 1451.Pc 1452can be created by specifying the 1453.Fl s 1454option to the 1455.Nm zfs Cm create Fl V 1456command, or by changing the reservation after the volume has been created. A 1457.Qq sparse volume 1458is a volume where the reservation is less then the volume size. Consequently, 1459writes to a sparse volume can fail with 1460.Er ENOSPC 1461when the pool is low on space. For a sparse volume, changes to 1462.Sy volsize 1463are not reflected in the reservation. 1464.It Sy vscan Ns = Ns Sy on Ns | Ns Sy off 1465Controls whether regular files should be scanned for viruses when a file is 1466opened and closed. In addition to enabling this property, the virus scan 1467service must also be enabled for virus scanning to occur. The default value is 1468.Sy off . 1469.It Sy xattr Ns = Ns Sy on Ns | Ns Sy off 1470Controls whether extended attributes are enabled for this file system. The 1471default value is 1472.Sy on . 1473.It Sy zoned Ns = Ns Sy on Ns | Ns Sy off 1474Controls whether the dataset is managed from a non-global zone. See the 1475.Sx Zones 1476section for more information. The default value is 1477.Sy off . 1478.El 1479.Pp 1480The following three properties cannot be changed after the file system is 1481created, and therefore, should be set when the file system is created. If the 1482properties are not set with the 1483.Nm zfs Cm create 1484or 1485.Nm zpool Cm create 1486commands, these properties are inherited from the parent dataset. If the parent 1487dataset lacks these properties due to having been created prior to these 1488features being supported, the new file system will have the default values for 1489these properties. 1490.Bl -tag -width "" 1491.It Xo 1492.Sy casesensitivity Ns = Ns Sy sensitive Ns | Ns 1493.Sy insensitive Ns | Ns Sy mixed 1494.Xc 1495Indicates whether the file name matching algorithm used by the file system 1496should be case-sensitive, case-insensitive, or allow a combination of both 1497styles of matching. The default value for the 1498.Sy casesensitivity 1499property is 1500.Sy sensitive . 1501Traditionally, 1502.Ux 1503and 1504.Tn POSIX 1505file systems have case-sensitive file names. 1506.Pp 1507The 1508.Sy mixed 1509value for the 1510.Sy casesensitivity 1511property indicates that the file system can support requests for both 1512case-sensitive and case-insensitive matching behavior. Currently, 1513case-insensitive matching behavior on a file system that supports mixed behavior 1514is limited to the SMB server product. For more information about the 1515.Sy mixed 1516value behavior, see the "ZFS Administration Guide". 1517.It Xo 1518.Sy normalization Ns = Ns Sy none Ns | Ns Sy formC Ns | Ns 1519.Sy formD Ns | Ns Sy formKC Ns | Ns Sy formKD 1520.Xc 1521Indicates whether the file system should perform a 1522.Sy unicode 1523normalization of file names whenever two file names are compared, and which 1524normalization algorithm should be used. File names are always stored unmodified, 1525names are normalized as part of any comparison process. If this property is set 1526to a legal value other than 1527.Sy none , 1528and the 1529.Sy utf8only 1530property was left unspecified, the 1531.Sy utf8only 1532property is automatically set to 1533.Sy on . 1534The default value of the 1535.Sy normalization 1536property is 1537.Sy none . 1538This property cannot be changed after the file system is created. 1539.It Sy utf8only Ns = Ns Sy on Ns | Ns Sy off 1540Indicates whether the file system should reject file names that include 1541characters that are not present in the 1542.Sy UTF-8 1543character code set. If this property is explicitly set to 1544.Sy off , 1545the normalization property must either not be explicitly set or be set to 1546.Sy none . 1547The default value for the 1548.Sy utf8only 1549property is 1550.Sy off . 1551This property cannot be changed after the file system is created. 1552.El 1553.Pp 1554The 1555.Sy casesensitivity , 1556.Sy normalization , 1557and 1558.Sy utf8only 1559properties are also new permissions that can be assigned to non-privileged users 1560by using the ZFS delegated administration feature. 1561.Ss "Temporary Mount Point Properties" 1562When a file system is mounted, either through 1563.Xr mount 1M 1564for legacy mounts or the 1565.Nm zfs Cm mount 1566command for normal file systems, its mount options are set according to its 1567properties. The correlation between properties and mount options is as follows: 1568.Bd -literal 1569 PROPERTY MOUNT OPTION 1570 devices devices/nodevices 1571 exec exec/noexec 1572 readonly ro/rw 1573 setuid setuid/nosetuid 1574 xattr xattr/noxattr 1575.Ed 1576.Pp 1577In addition, these options can be set on a per-mount basis using the 1578.Fl o 1579option, without affecting the property that is stored on disk. The values 1580specified on the command line override the values stored in the dataset. The 1581.Sy nosuid 1582option is an alias for 1583.Sy nodevices Ns , Ns Sy nosetuid . 1584These properties are reported as 1585.Qq temporary 1586by the 1587.Nm zfs Cm get 1588command. If the properties are changed while the dataset is mounted, the new 1589setting overrides any temporary settings. 1590.Ss "User Properties" 1591In addition to the standard native properties, ZFS supports arbitrary user 1592properties. User properties have no effect on ZFS behavior, but applications or 1593administrators can use them to annotate datasets 1594.Pq file systems, volumes, and snapshots . 1595.Pp 1596User property names must contain a colon 1597.No Po Ns Sy \&: Ns Pc 1598character to distinguish them from native properties. They may contain lowercase 1599letters, numbers, and the following punctuation characters: colon 1600.Pq Qq Sy \&: , 1601dash 1602.Pq Qq Sy - , 1603period 1604.Pq Qq Sy \&. , 1605and underscore 1606.Pq Qq Sy _ . 1607The expected convention is that the property name is divided into two portions 1608such as 1609.Em module Ns : Ns Em property , 1610but this namespace is not enforced by ZFS. 1611User property names can be at most 256 characters, and cannot begin with a dash 1612.Pq Qq Sy - . 1613.Pp 1614When making programmatic use of user properties, it is strongly suggested to use 1615a reversed 1616.Sy DNS 1617domain name for the 1618.Em module 1619component of property names to reduce the chance that two 1620independently-developed packages use the same property name for different 1621purposes. 1622.Pp 1623The values of user properties are arbitrary strings, are always inherited, and 1624are never validated. All of the commands that operate on properties 1625.Po Nm zfs Cm list , 1626.Nm zfs Cm get , 1627.Nm zfs Cm set , 1628and so forth 1629.Pc 1630can be used to manipulate both native properties and user properties. Use the 1631.Nm zfs Cm inherit 1632command to clear a user property . If the property is not defined in any parent 1633dataset, it is removed entirely. Property values are limited to 1024 1634characters. 1635.Ss ZFS Volumes as Swap or Dump Devices 1636During an initial installation a swap device and dump device are created on ZFS 1637volumes in the ZFS root pool. By default, the swap area size is based on 1/2 the 1638size of physical memory up to 2 Gbytes. The size of the dump device depends on 1639the kernel's requirements at installation time. Separate ZFS volumes must be 1640used for the swap area and dump devices. Do not swap to a file on a ZFS file 1641system. A ZFS swap file configuration is not supported. 1642.Pp 1643If you need to change your swap area or dump device after the system is 1644installed or upgraded, use the 1645.Xr swap 1M 1646and 1647.Xr dumpadm 1M 1648commands. 1649.Sh SUBCOMMANDS 1650All subcommands that modify state are logged persistently to the pool in their 1651original form. 1652.Bl -tag -width "" 1653.It Nm Fl \? 1654Displays a help message. 1655.It Xo 1656.Nm 1657.Cm create 1658.Op Fl p 1659.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... 1660.Ar filesystem 1661.Xc 1662Creates a new ZFS file system. The file system is automatically mounted 1663according to the 1664.Sy mountpoint 1665property inherited from the parent. 1666.Bl -tag -width "-o" 1667.It Fl o Ar property Ns = Ns Ar value 1668Sets the specified property as if the command 1669.Nm zfs Cm set Ar property Ns = Ns Ar value 1670was invoked at the same time the dataset was created. Any editable ZFS property 1671can also be set at creation time. Multiple 1672.Fl o 1673options can be specified. An error results if the same property is specified in 1674multiple 1675.Fl o 1676options. 1677.It Fl p 1678Creates all the non-existing parent datasets. Datasets created in this manner 1679are automatically mounted according to the 1680.Sy mountpoint 1681property inherited from their parent. Any property specified on the command line 1682using the 1683.Fl o 1684option is ignored. If the target filesystem already exists, the operation 1685completes successfully. 1686.El 1687.It Xo 1688.Nm 1689.Cm create 1690.Op Fl ps 1691.Op Fl b Ar blocksize 1692.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... 1693.Fl V Ar size Ar volume 1694.Xc 1695Creates a volume of the given size. The volume is exported as a block device in 1696.Pa /dev/zvol/{dsk,rdsk}/path , 1697where 1698.Em path 1699is the name of the volume in the ZFS namespace. The size represents the logical 1700size as exported by the device. By default, a reservation of equal size is 1701created. 1702.Pp 1703.Ar size 1704is automatically rounded up to the nearest 128 Kbytes to ensure that the volume 1705has an integral number of blocks regardless of 1706.Sy blocksize . 1707.Bl -tag -width "-b" 1708.It Fl b Ar blocksize 1709Equivalent to 1710.Fl o Sy volblocksize Ns = Ns Ar blocksize . 1711If this option is specified in conjunction with 1712.Fl o Sy volblocksize , 1713the resulting behavior is undefined. 1714.It Fl o Ar property Ns = Ns Ar value 1715Sets the specified property as if the 1716.Nm zfs Cm set Ar property Ns = Ns Ar value 1717command was invoked at the same time the dataset was created. Any editable ZFS 1718property can also be set at creation time. Multiple 1719.Fl o 1720options can be specified. An error results if the same property is specified in 1721multiple 1722.Fl o 1723options. 1724.It Fl p 1725Creates all the non-existing parent datasets. Datasets created in this manner 1726are automatically mounted according to the 1727.Sy mountpoint 1728property inherited from their parent. Any property specified on the command line 1729using the 1730.Fl o 1731option is ignored. If the target filesystem already exists, the operation 1732completes successfully. 1733.It Fl s 1734Creates a sparse volume with no reservation. See 1735.Sy volsize 1736in the 1737.Sx Native Properties 1738section for more information about sparse volumes. 1739.El 1740.It Xo 1741.Nm 1742.Cm destroy 1743.Op Fl Rfnprv 1744.Ar filesystem Ns | Ns Ar volume 1745.Xc 1746Destroys the given dataset. By default, the command unshares any file systems 1747that are currently shared, unmounts any file systems that are currently 1748mounted, and refuses to destroy a dataset that has active dependents 1749.Pq children or clones . 1750.Bl -tag -width "-R" 1751.It Fl R 1752Recursively destroy all dependents, including cloned file systems outside the 1753target hierarchy. 1754.It Fl f 1755Force an unmount of any file systems using the 1756.Nm unmount Fl f 1757command. This option has no effect on non-file systems or unmounted file 1758systems. 1759.It Fl n 1760Do a dry-run 1761.Pq Qq No-op 1762deletion. No data will be deleted. This is useful in conjunction with the 1763.Fl v 1764or 1765.Fl p 1766flags to determine what data would be deleted. 1767.It Fl p 1768Print machine-parsable verbose information about the deleted data. 1769.It Fl r 1770Recursively destroy all children. 1771.It Fl v 1772Print verbose information about the deleted data. 1773.El 1774.Pp 1775Extreme care should be taken when applying either the 1776.Fl r 1777or the 1778.Fl R 1779options, as they can destroy large portions of a pool and cause unexpected 1780behavior for mounted file systems in use. 1781.It Xo 1782.Nm 1783.Cm destroy 1784.Op Fl Rdnprv 1785.Ar filesystem Ns | Ns Ar volume Ns @ Ns Ar snap Ns 1786.Oo % Ns Ar snap Ns Oo , Ns Ar snap Ns Oo % Ns Ar snap Oc Oc Oc Ns ... 1787.Xc 1788The given snapshots are destroyed immediately if and only if the 1789.Nm zfs Cm destroy 1790command without the 1791.Fl d 1792option would have destroyed it. Such immediate destruction would occur, for 1793example, if the snapshot had no clones and the user-initiated reference count 1794were zero. 1795.Pp 1796If a snapshot does not qualify for immediate destruction, it is marked for 1797deferred deletion. In this state, it exists as a usable, visible snapshot until 1798both of the preconditions listed above are met, at which point it is destroyed. 1799.Pp 1800An inclusive range of snapshots may be specified by separating the first and 1801last snapshots with a percent sign. The first and/or last snapshots may be left 1802blank, in which case the filesystem's oldest or newest snapshot will be implied. 1803.Pp 1804Multiple snapshots 1805.Pq or ranges of snapshots 1806of the same filesystem or volume may be specified in a comma-separated list of 1807snapshots. Only the snapshot's short name 1808.Po the part after the 1809.Sy @ 1810.Pc 1811should be specified when using a range or comma-separated list to identify 1812multiple snapshots. 1813.Bl -tag -width "-R" 1814.It Fl R 1815Recursively destroy all clones of these snapshots, including the clones, 1816snapshots, and children. If this flag is specified, the 1817.Fl d 1818flag will have no effect. 1819.It Fl d 1820Defer snapshot deletion. 1821.It Fl n 1822Do a dry-run 1823.Pq Qq No-op 1824deletion. No data will be deleted. This is 1825useful in conjunction with the 1826.Fl p 1827or 1828.Fl v 1829flags to determine what data would be deleted. 1830.It Fl p 1831Print machine-parsable verbose information about the deleted data. 1832.It Fl r 1833Destroy 1834.Pq or mark for deferred deletion 1835all snapshots with this name in descendent file systems. 1836.It Fl v 1837Print verbose information about the deleted data. 1838.Pp 1839Extreme care should be taken when applying either the 1840.Fl r 1841or the 1842.Fl R 1843options, as they can destroy large portions of a pool and cause unexpected 1844behavior for mounted file systems in use. 1845.El 1846.It Xo 1847.Nm 1848.Cm destroy 1849.Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark 1850.Xc 1851The given bookmark is destroyed. 1852.It Xo 1853.Nm 1854.Cm snapshot 1855.Op Fl r 1856.Oo Fl o Ar property Ns = Ns value Oc Ns ... 1857.Ar filesystem Ns @ Ns Ar snapname Ns | Ns Ar volume Ns @ Ns Ar snapname Ns ... 1858.Xc 1859Creates snapshots with the given names. All previous modifications by successful 1860system calls to the file system are part of the snapshots. Snapshots are taken 1861atomically, so that all snapshots correspond to the same moment in time. See the 1862.Sx Snapshots 1863section for details. 1864.Bl -tag -width "-o" 1865.It Fl o Ar property Ns = Ns Ar value 1866Sets the specified property; see 1867.Nm zfs Cm create 1868for details. 1869.It Fl r 1870Recursively create snapshots of all descendent datasets 1871.El 1872.It Xo 1873.Nm 1874.Cm rollback 1875.Op Fl Rfr 1876.Ar snapshot 1877.Xc 1878Roll back the given dataset to a previous snapshot. When a dataset is rolled 1879back, all data that has changed since the snapshot is discarded, and the dataset 1880reverts to the state at the time of the snapshot. By default, the command 1881refuses to roll back to a snapshot other than the most recent one. In order to 1882do so, all intermediate snapshots and bookmarks must be destroyed by specifying 1883the 1884.Fl r 1885option. 1886.Pp 1887The 1888.Fl rR 1889options do not recursively destroy the child snapshots of a recursive snapshot. 1890Only direct snapshots of the specified filesystem are destroyed by either of 1891these options. To completely roll back a recursive snapshot, you must rollback 1892the individual child snapshots. 1893.Bl -tag -width "-R" 1894.It Fl R 1895Destroy any more recent snapshots and bookmarks, as well as any clones of those 1896snapshots. 1897.It Fl f 1898Used with the 1899.Fl R 1900option to force an unmount of any clone file systems that are to be destroyed. 1901.It Fl r 1902Destroy any snapshots and bookmarks more recent than the one specified. 1903.El 1904.It Xo 1905.Nm 1906.Cm clone 1907.Op Fl p 1908.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... 1909.Ar snapshot Ar filesystem Ns | Ns Ar volume 1910.Xc 1911Creates a clone of the given snapshot. See the 1912.Sx Clones 1913section for details. The target dataset can be located anywhere in the ZFS 1914hierarchy, and is created as the same type as the original. 1915.Bl -tag -width "-o" 1916.It Fl o Ar property Ns = Ns Ar value 1917Sets the specified property; see 1918.Nm zfs Cm create 1919for details. 1920.It Fl p 1921Creates all the non-existing parent datasets. Datasets created in this manner 1922are automatically mounted according to the 1923.Sy mountpoint 1924property inherited from their parent. If the target filesystem or volume already 1925exists, the operation completes successfully. 1926.El 1927.It Xo 1928.Nm 1929.Cm promote 1930.Ar clone-filesystem 1931.Xc 1932Promotes a clone file system to no longer be dependent on its 1933.Qq origin 1934snapshot. This makes it possible to destroy the file system that the clone was 1935created from. The clone parent-child dependency relationship is reversed, so 1936that the origin file system becomes a clone of the specified file system. 1937.Pp 1938The snapshot that was cloned, and any snapshots previous to this snapshot, are 1939now owned by the promoted clone. The space they use moves from the origin file 1940system to the promoted clone, so enough space must be available to accommodate 1941these snapshots. No new space is consumed by this operation, but the space 1942accounting is adjusted. The promoted clone must not have any conflicting 1943snapshot names of its own. The 1944.Cm rename 1945subcommand can be used to rename any conflicting snapshots. 1946.It Xo 1947.Nm 1948.Cm rename 1949.Op Fl f 1950.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot 1951.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot 1952.br 1953.Nm 1954.Cm rename 1955.Op Fl fp 1956.Ar filesystem Ns | Ns Ar volume 1957.Ar filesystem Ns | Ns Ar volume 1958.Xc 1959Renames the given dataset. The new target can be located anywhere in the ZFS 1960hierarchy, with the exception of snapshots. Snapshots can only be renamed within 1961the parent file system or volume. When renaming a snapshot, the parent file 1962system of the snapshot does not need to be specified as part of the second 1963argument. Renamed file systems can inherit new mount points, in which case they 1964are unmounted and remounted at the new mount point. 1965.Bl -tag -width "-a" 1966.It Fl f 1967Force unmount any filesystems that need to be unmounted in the process. 1968.It Fl p 1969Creates all the nonexistent parent datasets. Datasets created in this manner are 1970automatically mounted according to the 1971.Sy mountpoint 1972property inherited from their parent. 1973.El 1974.It Xo 1975.Nm 1976.Cm rename 1977.Fl r 1978.Ar snapshot Ar snapshot 1979.Xc 1980Recursively rename the snapshots of all descendent datasets. Snapshots are the 1981only dataset that can be renamed recursively. 1982.It Xo 1983.Nm 1984.Cm list 1985.Op Fl r Ns | Ns Fl d Ar depth 1986.Op Fl Hp 1987.Oo Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... Oc 1988.Oo Fl s Ar property Oc Ns ... 1989.Oo Fl S Ar property Oc Ns ... 1990.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc 1991.Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Oc Ns ... 1992.Xc 1993Lists the property information for the given datasets in tabular form. If 1994specified, you can list property information by the absolute pathname or the 1995relative pathname. By default, all file systems and volumes are displayed. 1996Snapshots are displayed if the 1997.Sy listsnaps 1998property is 1999.Sy on 2000.Po the default is 2001.Sy off 2002.Pc . 2003The following fields are displayed, 2004.Sy name Ns , Ns Sy used Ns , Ns Sy available Ns , Ns Sy referenced Ns , Ns 2005.Sy mountpoint . 2006.Bl -tag -width "-H" 2007.It Fl H 2008Used for scripting mode. Do not print headers and separate fields by a single 2009tab instead of arbitrary white space. 2010.It Fl S Ar property 2011Same as the 2012.Fl s 2013option, but sorts by property in descending order. 2014.It Fl d Ar depth 2015Recursively display any children of the dataset, limiting the recursion to 2016.It Fl o Ar property 2017A comma-separated list of properties to display. The property must be: 2018.Bl -bullet 2019.It 2020One of the properties described in the 2021.Sx Native Properties 2022section 2023.It 2024A user property 2025.It 2026The value 2027.Sy name 2028to display the dataset name 2029.It 2030The value 2031.Sy space 2032to display space usage properties on file systems and volumes. This is a 2033shortcut for specifying 2034.Fl o Sy name Ns , Ns Sy avail Ns , Ns Sy used Ns , Ns Sy usedsnap Ns , Ns 2035.Sy usedds Ns , Ns Sy usedrefreserv Ns , Ns Sy usedchild Fl t 2036.Sy filesystem Ns , Ns Sy volume 2037syntax. 2038.El 2039.It Fl p 2040Display numbers in parsable 2041.Pq exact 2042values. 2043.It Fl r 2044Recursively display any children of the dataset on the command line. 2045.Ar depth . 2046A depth of 2047.Sy 1 2048will display only the dataset and its direct children. 2049.It Fl s Ar property 2050A property for sorting the output by column in ascending order based on the 2051value of the property. The property must be one of the properties described in 2052the 2053.Sx Properties 2054section, or the special value 2055.Sy name 2056to sort by the dataset name. Multiple properties can be specified at one time 2057using multiple 2058.Fl s 2059property options. Multiple 2060.Fl s 2061options are evaluated from left to right in decreasing order of importance. The 2062following is a list of sorting criteria: 2063.Bl -bullet 2064.It 2065Numeric types sort in numeric order. 2066.It 2067String types sort in alphabetical order. 2068.It 2069Types inappropriate for a row sort that row to the literal bottom, regardless of 2070the specified ordering. 2071.El 2072.Pp 2073If no sorting options are specified the existing behavior of 2074.Nm zfs Cm list 2075is preserved. 2076.It Fl t Ar type 2077A comma-separated list of types to display, where 2078.Ar type 2079is one of 2080.Sy filesystem , 2081.Sy snapshot , 2082.Sy volume , 2083.Sy bookmark , 2084or 2085.Sy all . 2086For example, specifying 2087.Fl t Sy snapshot 2088displays only snapshots. 2089.El 2090.It Xo 2091.Nm 2092.Cm set 2093.Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ... 2094.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... 2095.Xc 2096Sets the property or list of properties to the given value(s) for each dataset. 2097Only some properties can be edited. See the 2098.Sx Properties 2099section for more information on what properties can be set and acceptable 2100values. Numeric values can be specified as exact values, or in a human-readable 2101form with a suffix of 2102.Sy B , K , M , G , T , P , E , Z 2103.Po for bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes, 2104or zettabytes, respectively 2105.Pc . 2106User properties can be set on snapshots. For more information, see the 2107.Sx User Properties 2108section. 2109.It Xo 2110.Nm 2111.Cm get 2112.Op Fl r Ns | Ns Fl d Ar depth 2113.Op Fl Hp 2114.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc 2115.Oo Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... Oc 2116.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc 2117.Cm all | Ar property Ns Oo , Ns Ar property Oc Ns ... 2118.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... 2119.Xc 2120Displays properties for the given datasets. If no datasets are specified, then 2121the command displays properties for all datasets on the system. For each 2122property, the following columns are displayed: 2123.Bd -literal 2124 name Dataset name 2125 property Property name 2126 value Property value 2127 source Property source. Can either be local, default, 2128 temporary, inherited, or none (-). 2129.Ed 2130.Pp 2131All columns are displayed by default, though this can be controlled by using the 2132.Fl o 2133option. This command takes a comma-separated list of properties as described in 2134the 2135.Sx Native Properties 2136and 2137.Sx User Properties 2138sections. 2139.Pp 2140The special value 2141.Sy all 2142can be used to display all properties that apply to the given dataset's type 2143.Pq filesystem, volume, snapshot, or bookmark . 2144.Bl -tag -width "-H" 2145.It Fl H 2146Display output in a form more easily parsed by scripts. Any headers are omitted, 2147and fields are explicitly separated by a single tab instead of an arbitrary 2148amount of space. 2149.It Fl d Ar depth 2150Recursively display any children of the dataset, limiting the recursion to 2151.Ar depth . 2152A depth of 2153.Sy 1 2154will display only the dataset and its direct children. 2155.It Fl o Ar field 2156A comma-separated list of columns to display. 2157.Sy name Ns , Ns Sy property Ns , Ns Sy value Ns , Ns Sy source 2158is the default value. 2159.It Fl p 2160Display numbers in parsable 2161.Pq exact 2162values. 2163.It Fl r 2164Recursively display properties for any children. 2165.It Fl s Ar source 2166A comma-separated list of sources to display. Those properties coming from a 2167source other than those in this list are ignored. Each source must be one of the 2168following: 2169.Sy local , 2170.Sy default , 2171.Sy inherited , 2172.Sy temporary , 2173and 2174.Sy none . 2175The default value is all sources. 2176.It Fl t Ar type 2177A comma-separated list of types to display, where 2178.Ar type 2179is one of 2180.Sy filesystem , 2181.Sy snapshot , 2182.Sy volume , 2183.Sy bookmark , 2184or 2185.Sy all . 2186.El 2187.It Xo 2188.Nm 2189.Cm inherit 2190.Op Fl rS 2191.Ar property Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... 2192.Xc 2193Clears the specified property, causing it to be inherited from an ancestor, 2194restored to default if no ancestor has the property set, or with the 2195.Fl S 2196option reverted to the received value if one exists. See the 2197.Sx Properties 2198section for a listing of default values, and details on which properties can be 2199inherited. 2200.Bl -tag -width "-r" 2201.It Fl r 2202Recursively inherit the given property for all children. 2203.It Fl S 2204Revert the property to the received value if one exists; otherwise operate as 2205if the 2206.Fl S 2207option was not specified. 2208.El 2209.It Xo 2210.Nm 2211.Cm upgrade 2212.Xc 2213Displays a list of file systems that are not the most recent version. 2214.It Xo 2215.Nm 2216.Cm upgrade 2217.Fl v 2218.Xc 2219Displays a list of currently supported file system versions. 2220.It Xo 2221.Nm 2222.Cm upgrade 2223.Op Fl r 2224.Op Fl V Ar version 2225.Fl a | Ar filesystem 2226.Xc 2227Upgrades file systems to a new on-disk version. Once this is done, the file 2228systems will no longer be accessible on systems running older versions of the 2229software. 2230.Nm zfs Cm send 2231streams generated from new snapshots of these file systems cannot be accessed on 2232systems running older versions of the software. 2233.Pp 2234In general, the file system version is independent of the pool version. See 2235.Xr zpool 1M 2236for information on the 2237.Nm zpool Cm upgrade 2238command. 2239.Pp 2240In some cases, the file system version and the pool version are interrelated and 2241the pool version must be upgraded before the file system version can be upgraded. 2242.Bl -tag -width "-V" 2243.It Fl V Ar version 2244Upgrade to the specified 2245.Ar version . 2246If the 2247.Fl V 2248flag is not specified, this command upgrades to the most recent version. This 2249option can only be used to increase the version number, and only up to the most 2250recent version supported by this software. 2251.It Fl a 2252Upgrade all file systems on all imported pools. 2253.It Ar filesystem 2254Upgrade the specified file system. 2255.It Fl r 2256Upgrade the specified file system and all descendent file systems. 2257.El 2258.It Xo 2259.Nm 2260.Cm userspace 2261.Op Fl Hinp 2262.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc 2263.Oo Fl s Ar field Oc Ns ... 2264.Oo Fl S Ar field Oc Ns ... 2265.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc 2266.Ar filesystem Ns | Ns Ar snapshot 2267.Xc 2268Displays space consumed by, and quotas on, each user in the specified filesystem 2269or snapshot. This corresponds to the 2270.Sy userused@ Ns Em user 2271and 2272.Sy userquota@ Ns Em user 2273properties. 2274.Bl -tag -width "-H" 2275.It Fl H 2276Do not print headers, use tab-delimited output. 2277.It Fl S Ar field 2278Sort by this field in reverse order. See 2279.Fl s . 2280.It Fl i 2281Translate SID to POSIX ID. The POSIX ID may be ephemeral if no mapping exists. 2282Normal POSIX interfaces 2283.Po for example, 2284.Xr stat 2 , 2285.Nm ls Fl l 2286.Pc 2287perform this translation, so the 2288.Fl i 2289option allows the output from 2290.Nm zfs Cm userspace 2291to be compared directly with those utilities. However, 2292.Fl i 2293may lead to confusion if some files were created by an SMB user before a 2294SMB-to-POSIX name mapping was established. In such a case, some files will be 2295owned by the SMB entity and some by the POSIX entity. However, the 2296.Fl i 2297option will report that the POSIX entity has the total usage and quota for both. 2298.It Fl n 2299Print numeric ID instead of user/group name. 2300.It Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... 2301Display only the specified fields from the following set: 2302.Sy type , 2303.Sy name , 2304.Sy used , 2305.Sy quota . 2306The default is to display all fields. 2307.It Fl p 2308Use exact 2309.Pq parsable 2310numeric output. 2311.It Fl s Ar field 2312Sort output by this field. The 2313.Fl s 2314and 2315.Fl S 2316flags may be specified multiple times to sort first by one field, then by 2317another. The default is 2318.Fl s Sy type Fl s Sy name . 2319.It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... 2320Print only the specified types from the following set: 2321.Sy all , 2322.Sy posixuser , 2323.Sy smbuser , 2324.Sy posixgroup , 2325.Sy smbgroup . 2326The default is 2327.Fl t Sy posixuser Ns , Ns Sy smbuser . 2328The default can be changed to include group types. 2329.El 2330.It Xo 2331.Nm 2332.Cm groupspace 2333.Op Fl Hinp 2334.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc 2335.Oo Fl s Ar field Oc Ns ... 2336.Oo Fl S Ar field Oc Ns ... 2337.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc 2338.Ar filesystem Ns | Ns Ar snapshot 2339.Xc 2340Displays space consumed by, and quotas on, each group in the specified 2341filesystem or snapshot. This subcommand is identical to 2342.Nm zfs Cm userspace , 2343except that the default types to display are 2344.Fl t Sy posixgroup Ns , Ns Sy smbgroup . 2345.It Xo 2346.Nm 2347.Cm mount 2348.Xc 2349Displays all ZFS file systems currently mounted. 2350.It Xo 2351.Nm 2352.Cm mount 2353.Op Fl Ov 2354.Op Fl o Ar options 2355.Fl a | Ar filesystem 2356.Xc 2357Mounts ZFS file systems. 2358.Bl -tag -width "-O" 2359.It Fl O 2360Perform an overlay mount. See 2361.Xr mount 1M 2362for more information. 2363.It Fl a 2364Mount all available ZFS file systems. Invoked automatically as part of the boot 2365process. 2366.It Ar filesystem 2367Mount the specified filesystem. 2368.It Fl o Ar options 2369An optional, comma-separated list of mount options to use temporarily for the 2370duration of the mount. See the 2371.Sx Temporary Mount Point Properties 2372section for details. 2373.It Fl v 2374Report mount progress. 2375.El 2376.It Xo 2377.Nm 2378.Cm unmount 2379.Op Fl f 2380.Fl a | Ar filesystem Ns | Ns Ar mountpoint 2381.Xc 2382Unmounts currently mounted ZFS file systems. 2383.Bl -tag -width "-a" 2384.It Fl a 2385Unmount all available ZFS file systems. Invoked automatically as part of the 2386shutdown process. 2387.It Ar filesystem Ns | Ns Ar mountpoint 2388Unmount the specified filesystem. The command can also be given a path to a ZFS 2389file system mount point on the system. 2390.It Fl f 2391Forcefully unmount the file system, even if it is currently in use. 2392.El 2393.It Xo 2394.Nm 2395.Cm share 2396.Fl a | Ar filesystem 2397.Xc 2398Shares available ZFS file systems. 2399.Bl -tag -width "-a" 2400.It Fl a 2401Share all available ZFS file systems. Invoked automatically as part of the boot 2402process. 2403.It Ar filesystem 2404Share the specified filesystem according to the 2405.Sy sharenfs 2406and 2407.Sy sharesmb 2408properties. File systems are shared when the 2409.Sy sharenfs 2410or 2411.Sy sharesmb 2412property is set. 2413.El 2414.It Xo 2415.Nm 2416.Cm unshare 2417.Fl a | Ar filesystem Ns | Ns Ar mountpoint 2418.Xc 2419Unshares currently shared ZFS file systems. 2420.Bl -tag -width "-a" 2421.It Fl a 2422Unshare all available ZFS file systems. Invoked automatically as part of the 2423shutdown process. 2424.It Ar filesystem Ns | Ns Ar mountpoint 2425Unshare the specified filesystem. The command can also be given a path to a ZFS 2426file system shared on the system. 2427.El 2428.It Xo 2429.Nm 2430.Cm bookmark 2431.Ar snapshot bookmark 2432.Xc 2433Creates a bookmark of the given snapshot. Bookmarks mark the point in time when 2434the snapshot was created, and can be used as the incremental source for a 2435.Nm zfs Cm send 2436command. 2437.Pp 2438This feature must be enabled to be used. See 2439.Xr zpool-features 5 2440for details on ZFS feature flags and the 2441.Sy bookmarks 2442feature. 2443.It Xo 2444.Nm 2445.Cm send 2446.Op Fl DLPRenpv 2447.Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot 2448.Ar snapshot 2449.Xc 2450Creates a stream representation of the second 2451.Ar snapshot , 2452which is written to standard output. The output can be redirected to a file or 2453to a different system 2454.Po for example, using 2455.Xr ssh 1 2456.Pc . 2457By default, a full stream is generated. 2458.Bl -tag -width "-D" 2459.It Fl D 2460Generate a deduplicated stream. Blocks which would have been sent multiple times 2461in the send stream will only be sent once. The receiving system must also 2462support this feature to recieve a deduplicated stream. This flag can be used 2463regardless of the dataset's 2464.Sy dedup 2465property, but performance will be much better if the filesystem uses a 2466dedup-capable checksum 2467.Po for example, 2468.Sy sha256 2469.Pc . 2470.It Fl I Ar snapshot 2471Generate a stream package that sends all intermediary snapshots from the first 2472snapshot to the second snapshot. For example, 2473.Fl I Em @a Em fs@d 2474is similar to 2475.Fl i Em @a Em fs@b Ns ; Fl i Em @b Em fs@c Ns ; Fl i Em @c Em fs@d . 2476The incremental source may be specified as with the 2477.Fl i 2478option. 2479.It Fl L 2480Generate a stream which may contain blocks larger than 128KB. This flag has no 2481effect if the 2482.Sy large_blocks 2483pool feature is disabled, or if the 2484.Sy recordsize 2485property of this filesystem has never been set above 128KB. The receiving system 2486must have the 2487.Sy large_blocks 2488pool feature enabled as well. See 2489.Xr zpool-features 5 2490for details on ZFS feature flags and the 2491.Sy large_blocks 2492feature. 2493.It Fl P 2494Print machine-parsable verbose information about the stream package generated. 2495.It Fl R 2496Generate a replication stream package, which will replicate the specified 2497file system, and all descendent file systems, up to the named snapshot. When 2498received, all properties, snapshots, descendent file systems, and clones are 2499preserved. 2500.Pp 2501If the 2502.Fl i 2503or 2504.Fl I 2505flags are used in conjunction with the 2506.Fl R 2507flag, an incremental replication stream is generated. The current values of 2508properties, and current snapshot and file system names are set when the stream 2509is received. If the 2510.Fl F 2511flag is specified when this stream is received, snapshots and file systems that 2512do not exist on the sending side are destroyed. 2513.It Fl e 2514Generate a more compact stream by using 2515.Sy WRITE_EMBEDDED 2516records for blocks which are stored more compactly on disk by the 2517.Sy embedded_data 2518pool feature. This flag has no effect if the 2519.Sy embedded_data 2520feature is disabled. The receiving system must have the 2521.Sy embedded_data 2522feature enabled. If the 2523.Sy lz4_compress 2524feature is active on the sending system, then the receiving system must have 2525that feature enabled as well. See 2526.Xr zpool-features 5 2527for details on ZFS feature flags and the 2528.Sy embedded_data 2529feature. 2530.It Fl i Ar snapshot 2531Generate an incremental stream from the first 2532.Ar snapshot 2533.Pq the incremental source 2534to the second 2535.Ar snapshot 2536.Pq the incremental target . 2537The incremental source can be specified as the last component of the snapshot 2538name 2539.Po the 2540.Sy @ 2541character and following 2542.Pc 2543and it is assumed to be from the same file system as the incremental target. 2544.Pp 2545If the destination is a clone, the source may be the origin snapshot, which must 2546be fully specified 2547.Po for example, 2548.Em pool/fs@origin , 2549not just 2550.Em @origin 2551.Pc . 2552.It Fl n 2553Do a dry-run 2554.Pq Qq No-op 2555send. Do not generate any actual send data. This is useful in conjunction with 2556the 2557.Fl v 2558or 2559.Fl P 2560flags to determine what data will be sent. In this case, the verbose output will 2561be written to standard output 2562.Po contrast with a non-dry-run, where the stream is written to standard output 2563and the verbose output goes to standard error 2564.Pc . 2565.It Fl p 2566Include the dataset's properties in the stream. This flag is implicit when 2567.Fl R 2568is specified. The receiving system must also support this feature. 2569.It Fl v 2570Print verbose information about the stream package generated. This information 2571includes a per-second report of how much data has been sent. 2572.Pp 2573The format of the stream is committed. You will be able to receive your streams 2574on future versions of ZFS . 2575.El 2576.It Xo 2577.Nm 2578.Cm send 2579.Op Fl Le 2580.Op Fl i Ar snapshot Ns | Ns Ar bookmark 2581.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot 2582.Xc 2583Generate a send stream, which may be of a filesystem, and may be incremental 2584from a bookmark. If the destination is a filesystem or volume, the pool must be 2585read-only, or the filesystem must not be mounted. When the stream generated from 2586a filesystem or volume is received, the default snapshot name will be 2587.Qq --head-- . 2588.Bl -tag -width "-L" 2589.It Fl L 2590Generate a stream which may contain blocks larger than 128KB. This flag has no 2591effect if the 2592.Sy large_blocks 2593pool feature is disabled, or if the 2594.Sy recordsize 2595property of this filesystem has never been set above 128KB. The receiving system 2596must have the 2597.Sy large_blocks 2598pool feature enabled as well. See 2599.Xr zpool-features 5 2600for details on ZFS feature flags and the 2601.Sy large_blocks 2602feature. 2603.It Fl e 2604Generate a more compact stream by using 2605.Sy WRITE_EMBEDDED 2606records for blocks which are stored more compactly on disk by the 2607.Sy embedded_data 2608pool feature. This flag has no effect if the 2609.Sy embedded_data 2610feature is disabled. The receiving system must have the 2611.Sy embedded_data 2612feature enabled. If the 2613.Sy lz4_compress 2614feature is active on the sending system, then the receiving system must have 2615that feature enabled as well. See 2616.Xr zpool-features 5 2617for details on ZFS feature flags and the 2618.Sy embedded_data 2619feature. 2620.It Fl i Ar snapshot Ns | Ns Ar bookmark 2621Generate an incremental send stream. The incremental source must be an earlier 2622snapshot in the destination's history. It will commonly be an earlier snapshot 2623in the destination's file system, in which case it can be specified as the last 2624component of the name 2625.Po the 2626.Sy # 2627or 2628.Sy @ 2629character and following 2630.Pc . 2631.Pp 2632If the incremental target is a clone, the incremental source can be the origin 2633snapshot, or an earlier snapshot in the origin's filesystem, or the origin's 2634origin, etc. 2635.El 2636.It Xo 2637.Nm 2638.Cm receive 2639.Op Fl Fnuv 2640.Op Fl o Sy origin Ns = Ns Ar snapshot 2641.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot 2642.br 2643.Nm 2644.Cm receive 2645.Op Fl Fnuv 2646.Op Fl d Ns | Ns Fl e 2647.Op Fl o Sy origin Ns = Ns Ar snapshot 2648.Ar filesystem 2649.Xc 2650Creates a snapshot whose contents are as specified in the stream provided on 2651standard input. If a full stream is received, then a new file system is created 2652as well. Streams are created using the 2653.Nm zfs Cm send 2654subcommand, which by default creates a full stream. 2655.Nm zfs Cm recv 2656can be used as an alias for 2657.Nm zfs Cm receive. 2658.Pp 2659If an incremental stream is received, then the destination file system must 2660already exist, and its most recent snapshot must match the incremental stream's 2661source. For 2662.Sy zvols , 2663the destination device link is destroyed and recreated, which means the 2664.Sy zvol 2665cannot be accessed during the 2666.Cm receive 2667operation. 2668.Pp 2669When a snapshot replication package stream that is generated by using the 2670.Nm zfs Cm send Fl R 2671command is received, any snapshots that do not exist on the sending location are 2672destroyed by using the 2673.Nm zfs Cm destroy Fl d 2674command. 2675.Pp 2676The name of the snapshot 2677.Pq and file system, if a full stream is received 2678that this subcommand creates depends on the argument type and the use of the 2679.Fl d 2680or 2681.Fl e 2682options. 2683.Pp 2684If the argument is a snapshot name, the specified 2685.Ar snapshot 2686is created. If the argument is a file system or volume name, a snapshot with the 2687same name as the sent snapshot is created within the specified 2688.Ar filesystem 2689or 2690.Ar volume . 2691If neither of the 2692.Fl d 2693or 2694.Fl e 2695options are specified, the provided target snapshot name is used exactly as 2696provided. 2697.Pp 2698The 2699.Fl d 2700and 2701.Fl e 2702options cause the file system name of the target snapshot to be determined by 2703appending a portion of the sent snapshot's name to the specified target 2704.Ar filesystem . 2705If the 2706.Fl d 2707option is specified, all but the first element of the sent snapshot's file 2708system path 2709.Pq usually the pool name 2710is used and any required intermediate file systems within the specified one are 2711created. If the 2712.Fl e 2713option is specified, then only the last element of the sent snapshot's file 2714system name 2715.Pq i.e. the name of the source file system itself 2716is used as the target file system name. 2717.Bl -tag -width "-F" 2718.It Fl F 2719Force a rollback of the file system to the most recent snapshot before 2720performing the receive operation. If receiving an incremental replication stream 2721.Po for example, one generated by 2722.Nm zfs Cm send Fl R Op Fl i Ns | Ns Fl I 2723.Pc , 2724destroy snapshots and file systems that do not exist on the sending side. 2725.It Fl d 2726Discard the first element of the sent snapshot's file system name, using the 2727remaining elements to determine the name of the target file system for the new 2728snapshot as described in the paragraph above. 2729.It Fl e 2730Discard all but the last element of the sent snapshot's file system name, using 2731that element to determine the name of the target file system for the new 2732snapshot as described in the paragraph above. 2733.It Fl n 2734Do not actually receive the stream. This can be useful in conjunction with the 2735.Fl v 2736option to verify the name the receive operation would use. 2737.It Fl o Sy origin Ns = Ns Ar snapshot 2738Forces the stream to be received as a clone of the given snapshot. 2739This is only valid if the stream is an incremental stream whose source 2740is the same as the provided origin. 2741.It Fl u 2742File system that is associated with the received stream is not mounted. 2743.It Fl v 2744Print verbose information about the stream and the time required to perform the 2745receive operation. 2746.El 2747.It Xo 2748.Nm 2749.Cm allow 2750.Ar filesystem Ns | Ns Ar volume 2751.Xc 2752Displays permissions that have been delegated on the specified filesystem or 2753volume. See the other forms of 2754.Nm zfs Cm allow 2755for more information. 2756.It Xo 2757.Nm 2758.Cm allow 2759.Op Fl dglu 2760.Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ... 2761.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns 2762.Ar setname Oc Ns ... 2763.Ar filesystem Ns | Ns Ar volume 2764.br 2765.Nm 2766.Cm allow 2767.Op Fl dl 2768.Fl e Ns | Ns Sy everyone 2769.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns 2770.Ar setname Oc Ns ... 2771.Ar filesystem Ns | Ns Ar volume 2772.Xc 2773Delegates ZFS administration permission for the file systems to non-privileged 2774users. 2775.Bl -tag -width "-d" 2776.It Fl d 2777Allow only for the descendent file systems. 2778.It Fl e Ns | Ns Sy everyone 2779Specifies that the permissions be delegated to everyone. 2780.It Fl g Ar group Ns Oo , Ns Ar group Oc Ns ... 2781Explicitly specify that permissions are delegated to the group. 2782.It Fl l 2783Allow 2784.Qq locally 2785only for the specified file system. 2786.It Fl u Ar user Ns Oo , Ns Ar user Oc Ns ... 2787Explicitly specify that permissions are delegated to the user. 2788.It Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ... 2789Specifies to whom the permissions are delegated. Multiple entities can be 2790specified as a comma-separated list. If neither of the 2791.Fl gu 2792options are specified, then the argument is interpreted preferentially as the 2793keyword 2794.Sy everyone , 2795then as a user name, and lastly as a group name. To specify a user or group 2796named 2797.Qq everyone , 2798use the 2799.Fl g 2800or 2801.Fl u 2802options. To specify a group with the same name as a user, use the 2803.Fl g 2804options. 2805.It Xo 2806.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns 2807.Ar setname Oc Ns ... 2808.Xc 2809The permissions to delegate. Multiple permissions may be specified as a 2810comma-separated list. Permission names are the same as ZFS subcommand and 2811property names. See the property list below. Property set names, 2812which begin with 2813.Sy @ , 2814may be specified. See the 2815.Fl s 2816form below for details. 2817.El 2818.Pp 2819If neither of the 2820.Fl dl 2821options are specified, or both are, then the permissions are allowed for the 2822file system or volume, and all of its descendents. 2823.Pp 2824Permissions are generally the ability to use a ZFS subcommand or change a ZFS 2825property. The following permissions are available: 2826.Bd -literal 2827NAME TYPE NOTES 2828allow subcommand Must also have the permission that is being 2829 allowed 2830clone subcommand Must also have the 'create' ability and 'mount' 2831 ability in the origin file system 2832create subcommand Must also have the 'mount' ability 2833destroy subcommand Must also have the 'mount' ability 2834diff subcommand Allows lookup of paths within a dataset 2835 given an object number, and the ability to 2836 create snapshots necessary to 'zfs diff'. 2837mount subcommand Allows mount/umount of ZFS datasets 2838promote subcommand Must also have the 'mount' 2839 and 'promote' ability in the origin file system 2840receive subcommand Must also have the 'mount' and 'create' ability 2841rename subcommand Must also have the 'mount' and 'create' 2842 ability in the new parent 2843rollback subcommand Must also have the 'mount' ability 2844send subcommand 2845share subcommand Allows sharing file systems over NFS or SMB 2846 protocols 2847snapshot subcommand Must also have the 'mount' ability 2848 2849groupquota other Allows accessing any groupquota@... property 2850groupused other Allows reading any groupused@... property 2851userprop other Allows changing any user property 2852userquota other Allows accessing any userquota@... property 2853userused other Allows reading any userused@... property 2854 2855aclinherit property 2856aclmode property 2857atime property 2858canmount property 2859casesensitivity property 2860checksum property 2861compression property 2862copies property 2863devices property 2864exec property 2865filesystem_limit property 2866mountpoint property 2867nbmand property 2868normalization property 2869primarycache property 2870quota property 2871readonly property 2872recordsize property 2873refquota property 2874refreservation property 2875reservation property 2876secondarycache property 2877setuid property 2878sharenfs property 2879sharesmb property 2880snapdir property 2881snapshot_limit property 2882utf8only property 2883version property 2884volblocksize property 2885volsize property 2886vscan property 2887xattr property 2888zoned property 2889.Ed 2890.It Xo 2891.Nm 2892.Cm allow 2893.Fl c 2894.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns 2895.Ar setname Oc Ns ... 2896.Ar filesystem Ns | Ns Ar volume 2897.Xc 2898Sets 2899.Qq create time 2900permissions. These permissions are granted 2901.Pq locally 2902to the creator of any newly-created descendent file system. 2903.It Xo 2904.Nm 2905.Cm allow 2906.Fl s No @ Ns Ar setname 2907.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns 2908.Ar setname Oc Ns ... 2909.Ar filesystem Ns | Ns Ar volume 2910.Xc 2911Defines or adds permissions to a permission set. The set can be used by other 2912.Nm zfs Cm allow 2913commands for the specified file system and its descendents. Sets are evaluated 2914dynamically, so changes to a set are immediately reflected. Permission sets 2915follow the same naming restrictions as ZFS file systems, but the name must begin 2916with 2917.Sy @ , 2918and can be no more than 64 characters long. 2919.It Xo 2920.Nm 2921.Cm unallow 2922.Op Fl dglru 2923.Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ... 2924.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns 2925.Ar setname Oc Ns ... Oc 2926.Ar filesystem Ns | Ns Ar volume 2927.br 2928.Nm 2929.Cm unallow 2930.Op Fl dlr 2931.Fl e Ns | Ns Sy everyone 2932.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns 2933.Ar setname Oc Ns ... Oc 2934.Ar filesystem Ns | Ns Ar volume 2935.br 2936.Nm 2937.Cm unallow 2938.Op Fl r 2939.Fl c 2940.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns 2941.Ar setname Oc Ns ... Oc 2942.Ar filesystem Ns | Ns Ar volume 2943.Xc 2944Removes permissions that were granted with the 2945.Nm zfs Cm allow 2946command. No permissions are explicitly denied, so other permissions granted are 2947still in effect. For example, if the permission is granted by an ancestor. If no 2948permissions are specified, then all permissions for the specified 2949.Ar user , 2950.Ar group , 2951or 2952.Sy everyone 2953are removed. Specifying 2954.Sy everyone 2955.Po or using the 2956.Fl e 2957option 2958.Pc 2959only removes the permissions that were granted to everyone, not all permissions 2960for every user and group. See the 2961.Nm zfs Cm allow 2962command for a description of the 2963.Fl ldugec 2964options. 2965.Bl -tag -width "-r" 2966.It Fl r 2967Recursively remove the permissions from this file system and all descendents. 2968.El 2969.It Xo 2970.Nm 2971.Cm unallow 2972.Op Fl r 2973.Fl s @ Ns Ar setname 2974.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns 2975.Ar setname Oc Ns ... Oc 2976.Ar filesystem Ns | Ns Ar volume 2977.Xc 2978Removes permissions from a permission set. If no permissions are specified, then 2979all permissions are removed, thus removing the set entirely. 2980.It Xo 2981.Nm 2982.Cm hold 2983.Op Fl r 2984.Ar tag Ar snapshot Ns ... 2985.Xc 2986Adds a single reference, named with the 2987.Ar tag 2988argument, to the specified snapshot or snapshots. Each snapshot has its own tag 2989namespace, and tags must be unique within that space. 2990.Pp 2991If a hold exists on a snapshot, attempts to destroy that snapshot by using the 2992.Nm zfs Cm destroy 2993command return 2994.Er EBUSY . 2995.Bl -tag -width "-r" 2996.It Fl r 2997Specifies that a hold with the given tag is applied recursively to the snapshots 2998of all descendent file systems. 2999.El 3000.It Xo 3001.Nm 3002.Cm holds 3003.Op Fl r 3004.Ar snapshot Ns ... 3005.Xc 3006Lists all existing user references for the given snapshot or snapshots. 3007.Bl -tag -width "-r" 3008.It Fl r 3009Lists the holds that are set on the named descendent snapshots, in addition to 3010listing the holds on the named snapshot. 3011.El 3012.It Xo 3013.Nm 3014.Cm release 3015.Op Fl r 3016.Ar tag Ar snapshot Ns ... 3017.Xc 3018Removes a single reference, named with the 3019.Ar tag 3020argument, from the specified snapshot or snapshots. The tag must already exist 3021for each snapshot. If a hold exists on a snapshot, attempts to destroy that 3022snapshot by using the 3023.Nm zfs Cm destroy 3024command return 3025.Er EBUSY . 3026.Bl -tag -width "-r" 3027.It Fl r 3028Recursively releases a hold with the given tag on the snapshots of all 3029descendent file systems. 3030.El 3031.It Xo 3032.Nm 3033.Cm diff 3034.Op Fl FHt 3035.Ar snapshot Ar snapshot Ns | Ns Ar filesystem 3036.Xc 3037Display the difference between a snapshot of a given filesystem and another 3038snapshot of that filesystem from a later time or the current contents of the 3039filesystem. The first column is a character indicating the type of change, the 3040other columns indicate pathname, new pathname 3041.Pq in case of rename , 3042change in link count, and optionally file type and/or change time. The types of 3043change are: 3044.Bd -literal 3045- The path has been removed 3046+ The path has been created 3047M The path has been modified 3048R The path has been renamed 3049.Ed 3050.Bl -tag -width "-F" 3051.It Fl F 3052Display an indication of the type of file, in a manner similar to the 3053.Fl 3054option of 3055.Xr ls 1 . 3056.Bd -literal 3057B Block device 3058C Character device 3059/ Directory 3060> Door 3061| Named pipe 3062@ Symbolic link 3063P Event port 3064= Socket 3065F Regular file 3066.Ed 3067.It Fl H 3068Give more parsable tab-separated output, without header lines and without 3069arrows. 3070.It Fl t 3071Display the path's inode change time as the first column of output. 3072.El 3073.El 3074.Sh EXIT STATUS 3075The 3076.Nm 3077utility exits 0 on success, 1 if an error occurs, and 2 if invalid command line 3078options were specified. 3079.Sh EXAMPLES 3080.Bl -tag -width "" 3081.It Sy Example 1 No Creating a ZFS File System Hierarchy 3082The following commands create a file system named 3083.Em pool/home 3084and a file system named 3085.Em pool/home/bob . 3086The mount point 3087.Pa /export/home 3088is set for the parent file system, and is automatically inherited by the child 3089file system. 3090.Bd -literal 3091# zfs create pool/home 3092# zfs set mountpoint=/export/home pool/home 3093# zfs create pool/home/bob 3094.Ed 3095.It Sy Example 2 No Creating a ZFS Snapshot 3096The following command creates a snapshot named 3097.Sy yesterday . 3098This snapshot is mounted on demand in the 3099.Pa .zfs/snapshot 3100directory at the root of the 3101.Em pool/home/bob 3102file system. 3103.Bd -literal 3104# zfs snapshot pool/home/bob@yesterday 3105.Ed 3106.It Sy Example 3 No Creating and Destroying Multiple Snapshots 3107The following command creates snapshots named 3108.Sy yesterday 3109of 3110.Em pool/home 3111and all of its descendent file systems. Each snapshot is mounted on demand in 3112the 3113.Pa .zfs/snapshot 3114directory at the root of its file system. The second command destroys the newly 3115created snapshots. 3116.Bd -literal 3117# zfs snapshot -r pool/home@yesterday 3118# zfs destroy -r pool/home@yesterday 3119.Ed 3120.It Sy Example 4 No Disabling and Enabling File System Compression 3121The following command disables the 3122.Sy compression 3123property for all file systems under 3124.Em pool/home . 3125The next command explicitly enables 3126.Sy compression 3127for 3128.Em pool/home/anne . 3129.Bd -literal 3130# zfs set compression=off pool/home 3131# zfs set compression=on pool/home/anne 3132.Ed 3133.It Sy Example 5 No Listing ZFS Datasets 3134The following command lists all active file systems and volumes in the system. 3135Snapshots are displayed if the 3136.Sy listsnaps 3137property is 3138.Sy on . 3139The default is 3140.Sy off . 3141See 3142.Xr zpool 1M 3143for more information on pool properties. 3144.Bd -literal 3145# zfs list 3146NAME USED AVAIL REFER MOUNTPOINT 3147pool 450K 457G 18K /pool 3148pool/home 315K 457G 21K /export/home 3149pool/home/anne 18K 457G 18K /export/home/anne 3150pool/home/bob 276K 457G 276K /export/home/bob 3151.Ed 3152.It Sy Example 6 No Setting a Quota on a ZFS File System 3153The following command sets a quota of 50 Gbytes for 3154.Em pool/home/bob . 3155.Bd -literal 3156# zfs set quota=50G pool/home/bob 3157.Ed 3158.It Sy Example 7 No Listing ZFS Properties 3159The following command lists all properties for 3160.Em pool/home/bob . 3161.Bd -literal 3162# zfs get all pool/home/bob 3163NAME PROPERTY VALUE SOURCE 3164pool/home/bob type filesystem - 3165pool/home/bob creation Tue Jul 21 15:53 2009 - 3166pool/home/bob used 21K - 3167pool/home/bob available 20.0G - 3168pool/home/bob referenced 21K - 3169pool/home/bob compressratio 1.00x - 3170pool/home/bob mounted yes - 3171pool/home/bob quota 20G local 3172pool/home/bob reservation none default 3173pool/home/bob recordsize 128K default 3174pool/home/bob mountpoint /pool/home/bob default 3175pool/home/bob sharenfs off default 3176pool/home/bob checksum on default 3177pool/home/bob compression on local 3178pool/home/bob atime on default 3179pool/home/bob devices on default 3180pool/home/bob exec on default 3181pool/home/bob setuid on default 3182pool/home/bob readonly off default 3183pool/home/bob zoned off default 3184pool/home/bob snapdir hidden default 3185pool/home/bob aclmode discard default 3186pool/home/bob aclinherit restricted default 3187pool/home/bob canmount on default 3188pool/home/bob xattr on default 3189pool/home/bob copies 1 default 3190pool/home/bob version 4 - 3191pool/home/bob utf8only off - 3192pool/home/bob normalization none - 3193pool/home/bob casesensitivity sensitive - 3194pool/home/bob vscan off default 3195pool/home/bob nbmand off default 3196pool/home/bob sharesmb off default 3197pool/home/bob refquota none default 3198pool/home/bob refreservation none default 3199pool/home/bob primarycache all default 3200pool/home/bob secondarycache all default 3201pool/home/bob usedbysnapshots 0 - 3202pool/home/bob usedbydataset 21K - 3203pool/home/bob usedbychildren 0 - 3204pool/home/bob usedbyrefreservation 0 - 3205.Ed 3206.Pp 3207The following command gets a single property value. 3208.Bd -literal 3209# zfs get -H -o value compression pool/home/bob 3210on 3211.Ed 3212The following command lists all properties with local settings for 3213.Em pool/home/bob . 3214.Bd -literal 3215# zfs get -r -s local -o name,property,value all pool/home/bob 3216NAME PROPERTY VALUE 3217pool/home/bob quota 20G 3218pool/home/bob compression on 3219.Ed 3220.It Sy Example 8 No Rolling Back a ZFS File System 3221The following command reverts the contents of 3222.Em pool/home/anne 3223to the snapshot named 3224.Sy yesterday , 3225deleting all intermediate snapshots. 3226.Bd -literal 3227# zfs rollback -r pool/home/anne@yesterday 3228.Ed 3229.It Sy Example 9 No Creating a ZFS Clone 3230The following command creates a writable file system whose initial contents are 3231the same as 3232.Em pool/home/bob@yesterday . 3233.Bd -literal 3234# zfs clone pool/home/bob@yesterday pool/clone 3235.Ed 3236.It Sy Example 10 No Promoting a ZFS Clone 3237The following commands illustrate how to test out changes to a file system, and 3238then replace the original file system with the changed one, using clones, clone 3239promotion, and renaming: 3240.Bd -literal 3241# zfs create pool/project/production 3242 populate /pool/project/production with data 3243# zfs snapshot pool/project/production@today 3244# zfs clone pool/project/production@today pool/project/beta 3245 make changes to /pool/project/beta and test them 3246# zfs promote pool/project/beta 3247# zfs rename pool/project/production pool/project/legacy 3248# zfs rename pool/project/beta pool/project/production 3249 once the legacy version is no longer needed, it can be destroyed 3250# zfs destroy pool/project/legacy 3251.Ed 3252.It Sy Example 11 No Inheriting ZFS Properties 3253The following command causes 3254.Em pool/home/bob 3255and 3256.Em pool/home/anne 3257to inherit the 3258.Sy checksum 3259property from their parent. 3260.Bd -literal 3261# zfs inherit checksum pool/home/bob pool/home/anne 3262.Ed 3263.It Sy Example 12 No Remotely Replicating ZFS Data 3264The following commands send a full stream and then an incremental stream to a 3265remote machine, restoring them into 3266.Em poolB/received/fs@a 3267and 3268.Em poolB/received/fs@b , 3269respectively. 3270.Em poolB 3271must contain the file system 3272.Em poolB/received , 3273and must not initially contain 3274.Em poolB/received/fs . 3275.Bd -literal 3276# zfs send pool/fs@a | \e 3277 ssh host zfs receive poolB/received/fs@a 3278# zfs send -i a pool/fs@b | \e 3279 ssh host zfs receive poolB/received/fs 3280.Ed 3281.It Sy Example 13 No Using the zfs receive -d Option 3282The following command sends a full stream of 3283.Em poolA/fsA/fsB@snap 3284to a remote machine, receiving it into 3285.Em poolB/received/fsA/fsB@snap . 3286The 3287.Em fsA/fsB@snap 3288portion of the received snapshot's name is determined from the name of the sent 3289snapshot. 3290.Em poolB 3291must contain the file system 3292.Em poolB/received . 3293If 3294.Em poolB/received/fsA 3295does not exist, it is created as an empty file system. 3296.Bd -literal 3297# zfs send poolA/fsA/fsB@snap | \e 3298 ssh host zfs receive -d poolB/received 3299.Ed 3300.It Sy Example 14 No Setting User Properties 3301The following example sets the user-defined 3302.Sy com.example:department 3303property for a dataset. 3304.Bd -literal 3305# zfs set com.example:department=12345 tank/accounting 3306.Ed 3307.It Sy Example 15 No Performing a Rolling Snapshot 3308The following example shows how to maintain a history of snapshots with a 3309consistent naming scheme. To keep a week's worth of snapshots, the user 3310destroys the oldest snapshot, renames the remaining snapshots, and then creates 3311a new snapshot, as follows: 3312.Bd -literal 3313# zfs destroy -r pool/users@7daysago 3314# zfs rename -r pool/users@6daysago @7daysago 3315# zfs rename -r pool/users@5daysago @6daysago 3316# zfs rename -r pool/users@yesterday @5daysago 3317# zfs rename -r pool/users@yesterday @4daysago 3318# zfs rename -r pool/users@yesterday @3daysago 3319# zfs rename -r pool/users@yesterday @2daysago 3320# zfs rename -r pool/users@today @yesterday 3321# zfs snapshot -r pool/users@today 3322.Ed 3323.It Sy Example 16 No Setting sharenfs Property Options on a ZFS File System 3324The following commands show how to set 3325.Sy sharenfs 3326property options to enable 3327.Sy rw 3328access for a set of 3329.Sy IP 3330addresses and to enable root access for system 3331.Sy neo 3332on the 3333.Em tank/home 3334file system. 3335.Bd -literal 3336# zfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home 3337.Ed 3338.Pp 3339If you are using 3340.Sy DNS 3341for host name resolution, specify the fully qualified hostname. 3342.It Sy Example 17 No Delegating ZFS Administration Permissions on a ZFS Dataset 3343The following example shows how to set permissions so that user 3344.Sy cindys 3345can create, destroy, mount, and take snapshots on 3346.Em tank/cindys . 3347The permissions on 3348.Em tank/cindys 3349are also displayed. 3350.Bd -literal 3351# zfs allow cindys create,destroy,mount,snapshot tank/cindys 3352# zfs allow tank/cindys 3353---- Permissions on tank/cindys -------------------------------------- 3354Local+Descendent permissions: 3355 user cindys create,destroy,mount,snapshot 3356.Ed 3357.Pp 3358Because the 3359.Em tank/cindys 3360mount point permission is set to 755 by default, user 3361.Sy cindys 3362will be unable to mount file systems under 3363.Em tank/cindys . 3364Add an 3365.Sy ACE 3366similar to the following syntax to provide mount point access: 3367.Bd -literal 3368# chmod A+user:cindys:add_subdirectory:allow /tank/cindys 3369.Ed 3370.It Sy Example 18 No Delegating Create Time Permissions on a ZFS Dataset 3371The following example shows how to grant anyone in the group 3372.Sy staff 3373to create file systems in 3374.Em tank/users . 3375This syntax also allows staff members to destroy their own file systems, but not 3376destroy anyone else's file system. The permissions on 3377.Em tank/users 3378are also displayed. 3379.Bd -literal 3380# zfs allow staff create,mount tank/users 3381# zfs allow -c destroy tank/users 3382# zfs allow tank/users 3383---- Permissions on tank/users --------------------------------------- 3384Permission sets: 3385 destroy 3386Local+Descendent permissions: 3387 group staff create,mount 3388.Ed 3389.It Sy Example 19 No Defining and Granting a Permission Set on a ZFS Dataset 3390The following example shows how to define and grant a permission set on the 3391.Em tank/users 3392file system. The permissions on 3393.Em tank/users 3394are also displayed. 3395.Bd -literal 3396# zfs allow -s @pset create,destroy,snapshot,mount tank/users 3397# zfs allow staff @pset tank/users 3398# zfs allow tank/users 3399---- Permissions on tank/users --------------------------------------- 3400Permission sets: 3401 @pset create,destroy,mount,snapshot 3402Local+Descendent permissions: 3403 group staff @pset 3404.Ed 3405.It Sy Example 20 No Delegating Property Permissions on a ZFS Dataset 3406The following example shows to grant the ability to set quotas and reservations 3407on the 3408.Em users/home 3409file system. The permissions on 3410.Em users/home 3411are also displayed. 3412.Bd -literal 3413# zfs allow cindys quota,reservation users/home 3414# zfs allow users/home 3415---- Permissions on users/home --------------------------------------- 3416Local+Descendent permissions: 3417 user cindys quota,reservation 3418cindys% zfs set quota=10G users/home/marks 3419cindys% zfs get quota users/home/marks 3420NAME PROPERTY VALUE SOURCE 3421users/home/marks quota 10G local 3422.Ed 3423.It Sy Example 21 No Removing ZFS Delegated Permissions on a ZFS Dataset 3424The following example shows how to remove the snapshot permission from the 3425.Sy staff 3426group on the 3427.Em tank/users 3428file system. The permissions on 3429.Em tank/users 3430are also displayed. 3431.Bd -literal 3432# zfs unallow staff snapshot tank/users 3433# zfs allow tank/users 3434---- Permissions on tank/users --------------------------------------- 3435Permission sets: 3436 @pset create,destroy,mount,snapshot 3437Local+Descendent permissions: 3438 group staff @pset 3439.Ed 3440.It Sy Example 22 No Showing the differences between a snapshot and a ZFS Dataset 3441The following example shows how to see what has changed between a prior 3442snapshot of a ZFS dataset and its current state. The 3443.Fl F 3444option is used to indicate type information for the files affected. 3445.Bd -literal 3446# zfs diff -F tank/test@before tank/test 3447M / /tank/test/ 3448M F /tank/test/linked (+1) 3449R F /tank/test/oldname -> /tank/test/newname 3450- F /tank/test/deleted 3451+ F /tank/test/created 3452M F /tank/test/modified 3453.Ed 3454.El 3455.Sh INTERFACE STABILITY 3456.Sy Commited . 3457.Sh SEE ALSO 3458.Xr gzip 1, 3459.Xr ssh 1 , 3460.Xr mount 1M , 3461.Xr share 1M , 3462.Xr sharemgr 1M , 3463.Xr unshare 1M , 3464.Xr zonecfg 1M , 3465.Xr zpool 1M , 3466.Xr chmod 2 , 3467.Xr stat 2 , 3468.Xr write 2 , 3469.Xr fsync 3C , 3470.Xr dfstab 4 , 3471.Xr acl 5 , 3472.Xr attributes 5 3473