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