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