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