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 a snapshot with the given name. All previous modifications by
1845 successful system calls to the file system are part of the snapshot. See the
1846 "Snapshots" section for details.
1847 .sp
1848 .ne 2
1849 .na
1850 \fB\fB-r\fR\fR
1851 .ad
1852 .sp .6
1853 .RS 4n
1854 Recursively create snapshots of all descendent datasets. Snapshots are taken
1855 atomically, so that all recursive snapshots correspond to the same moment in
1856 time.
1857 .RE
1858 
1859 .sp
1860 .ne 2
1861 .na
1862 \fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
1863 .ad
1864 .sp .6
1865 .RS 4n
1866 Sets the specified property; see \fBzfs create\fR for details.
1867 .RE
1868 
1869 .RE
1870 
1871 .sp
1872 .ne 2
1873 .na
1874 \fB\fBzfs rollback\fR [\fB-rRf\fR] \fIsnapshot\fR\fR
1875 .ad
1876 .sp .6
1877 .RS 4n
1878 Roll back the given dataset to a previous snapshot. When a dataset is rolled
1879 back, all data that has changed since the snapshot is discarded, and the
1880 dataset reverts to the state at the time of the snapshot. By default, the
1881 command refuses to roll back to a snapshot other than the most recent one. In
1882 order to do so, all intermediate snapshots must be destroyed by specifying the
1883 \fB-r\fR option.
1884 .sp
1885 The \fB-rR\fR options do not recursively destroy the child snapshots of a
1886 recursive snapshot. Only the top-level recursive snapshot is destroyed by
1887 either of these options. To completely roll back a recursive snapshot, you must
1888 rollback the individual child snapshots.
1889 .sp
1890 .ne 2
1891 .na
1892 \fB\fB-r\fR\fR
1893 .ad
1894 .sp .6
1895 .RS 4n
1896 Recursively destroy any snapshots more recent than the one specified.
1897 .RE
1898 
1899 .sp
1900 .ne 2
1901 .na
1902 \fB\fB-R\fR\fR
1903 .ad
1904 .sp .6
1905 .RS 4n
1906 Recursively destroy any more recent snapshots, as well as any clones of those
1907 snapshots.
1908 .RE
1909 
1910 .sp
1911 .ne 2
1912 .na
1913 \fB\fB-f\fR\fR
1914 .ad
1915 .sp .6
1916 .RS 4n
1917 Used with the \fB-R\fR option to force an unmount of any clone file systems
1918 that are to be destroyed.
1919 .RE
1920 
1921 .RE
1922 
1923 .sp
1924 .ne 2
1925 .na
1926 \fB\fBzfs clone\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ...
1927 \fIsnapshot\fR \fIfilesystem\fR|\fIvolume\fR\fR
1928 .ad
1929 .sp .6
1930 .RS 4n
1931 Creates a clone of the given snapshot. See the "Clones" section for details.
1932 The target dataset can be located anywhere in the \fBZFS\fR hierarchy, and is
1933 created as the same type as the original.
1934 .sp
1935 .ne 2
1936 .na
1937 \fB\fB-p\fR\fR
1938 .ad
1939 .sp .6
1940 .RS 4n
1941 Creates all the non-existing parent datasets. Datasets created in this manner
1942 are automatically mounted according to the \fBmountpoint\fR property inherited
1943 from their parent. If the target filesystem or volume already exists, the
1944 operation completes successfully.
1945 .RE
1946 
1947 .sp
1948 .ne 2
1949 .na
1950 \fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
1951 .ad
1952 .sp .6
1953 .RS 4n
1954 Sets the specified property; see \fBzfs create\fR for details.
1955 .RE
1956 
1957 .RE
1958 
1959 .sp
1960 .ne 2
1961 .na
1962 \fB\fBzfs promote\fR \fIclone-filesystem\fR\fR
1963 .ad
1964 .sp .6
1965 .RS 4n
1966 Promotes a clone file system to no longer be dependent on its "origin"
1967 snapshot. This makes it possible to destroy the file system that the clone was
1968 created from. The clone parent-child dependency relationship is reversed, so
1969 that the origin file system becomes a clone of the specified file system.
1970 .sp
1971 The snapshot that was cloned, and any snapshots previous to this snapshot, are
1972 now owned by the promoted clone. The space they use moves from the origin file
1973 system to the promoted clone, so enough space must be available to accommodate
1974 these snapshots. No new space is consumed by this operation, but the space
1975 accounting is adjusted. The promoted clone must not have any conflicting
1976 snapshot names of its own. The \fBrename\fR subcommand can be used to rename
1977 any conflicting snapshots.
1978 .RE
1979 
1980 .sp
1981 .ne 2
1982 .na
1983 \fB\fBzfs rename\fR [\fB-f\fR] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR\fR
1984 .ad
1985 .br
1986 .na
1987 \fB\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR\fR
1988 .ad
1989 .br
1990 .na
1991 \fB\fBzfs rename\fR [\fB-fp\fR] \fIfilesystem\fR|\fIvolume\fR
1992 \fIfilesystem\fR|\fIvolume\fR\fR
1993 .ad
1994 .sp .6
1995 .RS 4n
1996 Renames the given dataset. The new target can be located anywhere in the
1997 \fBZFS\fR hierarchy, with the exception of snapshots. Snapshots can only be
1998 renamed within the parent file system or volume. When renaming a snapshot, the
1999 parent file system of the snapshot does not need to be specified as part of the
2000 second argument. Renamed file systems can inherit new mount points, in which
2001 case they are unmounted and remounted at the new mount point.
2002 .sp
2003 .ne 2
2004 .na
2005 \fB\fB-p\fR\fR
2006 .ad
2007 .sp .6
2008 .RS 4n
2009 Creates all the nonexistent parent datasets. Datasets created in this manner
2010 are automatically mounted according to the \fBmountpoint\fR property inherited
2011 from their parent.
2012 .RE
2013 
2014 .sp
2015 .ne 2
2016 .na
2017 \fB\fB-f\fR\fR
2018 .ad
2019 .sp .6
2020 .RS 4n
2021 Force unmount any filesystems that need to be unmounted in the process.
2022 .RE
2023 
2024 .RE
2025 
2026 .sp
2027 .ne 2
2028 .na
2029 \fB\fBzfs rename\fR \fB-r\fR \fIsnapshot\fR \fIsnapshot\fR\fR
2030 .ad
2031 .sp .6
2032 .RS 4n
2033 Recursively rename the snapshots of all descendent datasets. Snapshots are the
2034 only dataset that can be renamed recursively.
2035 .RE
2036 
2037 .sp
2038 .ne 2
2039 .na
2040 \fB\fBzfs\fR \fBlist\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR] [\fB-H\fR] [\fB-o\fR
2041 \fIproperty\fR[,\fI\&...\fR]] [ \fB-t\fR \fItype\fR[,\fI\&...\fR]] [ \fB-s\fR
2042 \fIproperty\fR ] ... [ \fB-S\fR \fIproperty\fR ] ...
2043 [\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR] ...\fR
2044 .ad
2045 .sp .6
2046 .RS 4n
2047 Lists the property information for the given datasets in tabular form. If
2048 specified, you can list property information by the absolute pathname or the
2049 relative pathname. By default, all file systems and volumes are displayed.
2050 Snapshots are displayed if the \fBlistsnaps\fR property is \fBon\fR (the
2051 default is \fBoff\fR) . The following fields are displayed,
2052 \fBname,used,available,referenced,mountpoint\fR.
2053 .sp
2054 .ne 2
2055 .na
2056 \fB\fB-H\fR\fR
2057 .ad
2058 .sp .6
2059 .RS 4n
2060 Used for scripting mode. Do not print headers and separate fields by a single
2061 tab instead of arbitrary white space.
2062 .RE
2063 
2064 .sp
2065 .ne 2
2066 .na
2067 \fB\fB-r\fR\fR
2068 .ad
2069 .sp .6
2070 .RS 4n
2071 Recursively display any children of the dataset on the command line.
2072 .RE
2073 
2074 .sp
2075 .ne 2
2076 .na
2077 \fB\fB-d\fR \fIdepth\fR\fR
2078 .ad
2079 .sp .6
2080 .RS 4n
2081 Recursively display any children of the dataset, limiting the recursion to
2082 \fIdepth\fR. A depth of \fB1\fR will display only the dataset and its direct
2083 children.
2084 .RE
2085 
2086 .sp
2087 .ne 2
2088 .na
2089 \fB\fB-o\fR \fIproperty\fR\fR
2090 .ad
2091 .sp .6
2092 .RS 4n
2093 A comma-separated list of properties to display. The property must be:
2094 .RS +4
2095 .TP
2096 .ie t \(bu
2097 .el o
2098 One of the properties described in the "Native Properties" section
2099 .RE
2100 .RS +4
2101 .TP
2102 .ie t \(bu
2103 .el o
2104 A user property
2105 .RE
2106 .RS +4
2107 .TP
2108 .ie t \(bu
2109 .el o
2110 The value \fBname\fR to display the dataset name
2111 .RE
2112 .RS +4
2113 .TP
2114 .ie t \(bu
2115 .el o
2116 The value \fBspace\fR to display space usage properties on file systems and
2117 volumes. This is a shortcut for specifying \fB-o
2118 name,avail,used,usedsnap,usedds,usedrefreserv,usedchild\fR \fB-t
2119 filesystem,volume\fR syntax.
2120 .RE
2121 .RE
2122 
2123 .sp
2124 .ne 2
2125 .na
2126 \fB\fB-s\fR \fIproperty\fR\fR
2127 .ad
2128 .sp .6
2129 .RS 4n
2130 A property for sorting the output by column in ascending order based on the
2131 value of the property. The property must be one of the properties described in
2132 the "Properties" section, or the special value \fBname\fR to sort by the
2133 dataset name. Multiple properties can be specified at one time using multiple
2134 \fB-s\fR property options. Multiple \fB-s\fR options are evaluated from left to
2135 right in decreasing order of importance.
2136 .sp
2137 The following is a list of sorting criteria:
2138 .RS +4
2139 .TP
2140 .ie t \(bu
2141 .el o
2142 Numeric types sort in numeric order.
2143 .RE
2144 .RS +4
2145 .TP
2146 .ie t \(bu
2147 .el o
2148 String types sort in alphabetical order.
2149 .RE
2150 .RS +4
2151 .TP
2152 .ie t \(bu
2153 .el o
2154 Types inappropriate for a row sort that row to the literal bottom, regardless
2155 of the specified ordering.
2156 .RE
2157 .RS +4
2158 .TP
2159 .ie t \(bu
2160 .el o
2161 If no sorting options are specified the existing behavior of \fBzfs list\fR is
2162 preserved.
2163 .RE
2164 .RE
2165 
2166 .sp
2167 .ne 2
2168 .na
2169 \fB\fB-S\fR \fIproperty\fR\fR
2170 .ad
2171 .sp .6
2172 .RS 4n
2173 Same as the \fB-s\fR option, but sorts by property in descending order.
2174 .RE
2175 
2176 .sp
2177 .ne 2
2178 .na
2179 \fB\fB-t\fR \fItype\fR\fR
2180 .ad
2181 .sp .6
2182 .RS 4n
2183 A comma-separated list of types to display, where \fItype\fR is one of
2184 \fBfilesystem\fR, \fBsnapshot\fR , \fBvolume\fR, or \fBall\fR. For example,
2185 specifying \fB-t snapshot\fR displays only snapshots.
2186 .RE
2187 
2188 .RE
2189 
2190 .sp
2191 .ne 2
2192 .na
2193 \fB\fBzfs set\fR \fIproperty\fR=\fIvalue\fR
2194 \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...\fR
2195 .ad
2196 .sp .6
2197 .RS 4n
2198 Sets the property to the given value for each dataset. Only some properties can
2199 be edited. See the "Properties" section for more information on what properties
2200 can be set and acceptable values. Numeric values can be specified as exact
2201 values, or in a human-readable form with a suffix of \fBB\fR, \fBK\fR, \fBM\fR,
2202 \fBG\fR, \fBT\fR, \fBP\fR, \fBE\fR, \fBZ\fR (for bytes, kilobytes, megabytes,
2203 gigabytes, terabytes, petabytes, exabytes, or zettabytes, respectively). User
2204 properties can be set on snapshots. For more information, see the "User
2205 Properties" section.
2206 .RE
2207 
2208 .sp
2209 .ne 2
2210 .na
2211 \fB\fBzfs get\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR] [\fB-Hp\fR] [\fB-o\fR
2212 \fIfield\fR[,...] [\fB-t\fR \fItype\fR[,...]] [\fB-s\fR \fIsource\fR[,...] "\fIall\fR" |
2213 \fIproperty\fR[,...] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...\fR
2214 .ad
2215 .sp .6
2216 .RS 4n
2217 Displays properties for the given datasets. If no datasets are specified, then
2218 the command displays properties for all datasets on the system. For each
2219 property, the following columns are displayed:
2220 .sp
2221 .in +2
2222 .nf
2223     name      Dataset name
2224      property  Property name
2225      value     Property value
2226      source    Property source. Can either be local, default,
2227                temporary, inherited, or none (-).
2228 .fi
2229 .in -2
2230 .sp
2231 
2232 All columns are displayed by default, though this can be controlled by using
2233 the \fB-o\fR option. This command takes a comma-separated list of properties as
2234 described in the "Native Properties" and "User Properties" sections.
2235 .sp
2236 The special value \fBall\fR can be used to display all properties that apply to
2237 the given dataset's type (filesystem, volume, or snapshot).
2238 .sp
2239 .ne 2
2240 .na
2241 \fB\fB-r\fR\fR
2242 .ad
2243 .sp .6
2244 .RS 4n
2245 Recursively display properties for any children.
2246 .RE
2247 
2248 .sp
2249 .ne 2
2250 .na
2251 \fB\fB-d\fR \fIdepth\fR\fR
2252 .ad
2253 .sp .6
2254 .RS 4n
2255 Recursively display any children of the dataset, limiting the recursion to
2256 \fIdepth\fR. A depth of \fB1\fR will display only the dataset and its direct
2257 children.
2258 .RE
2259 
2260 .sp
2261 .ne 2
2262 .na
2263 \fB\fB-H\fR\fR
2264 .ad
2265 .sp .6
2266 .RS 4n
2267 Display output in a form more easily parsed by scripts. Any headers are
2268 omitted, and fields are explicitly separated by a single tab instead of an
2269 arbitrary amount of space.
2270 .RE
2271 
2272 .sp
2273 .ne 2
2274 .na
2275 \fB\fB-o\fR \fIfield\fR\fR
2276 .ad
2277 .sp .6
2278 .RS 4n
2279 A comma-separated list of columns to display. \fBname,property,value,source\fR
2280 is the default value.
2281 .RE
2282 
2283 .sp
2284 .ne 2
2285 .na
2286 \fB\fB-s\fR \fIsource\fR\fR
2287 .ad
2288 .sp .6
2289 .RS 4n
2290 A comma-separated list of sources to display. Those properties coming from a
2291 source other than those in this list are ignored. Each source must be one of
2292 the following: \fBlocal,default,inherited,temporary,none\fR. The default value
2293 is all sources.
2294 .RE
2295 
2296 .sp
2297 .ne 2
2298 .na
2299 \fB\fB-p\fR\fR
2300 .ad
2301 .sp .6
2302 .RS 4n
2303 Display numbers in parseable (exact) values.
2304 .RE
2305 
2306 .RE
2307 
2308 .sp
2309 .ne 2
2310 .na
2311 \fB\fBzfs inherit\fR [\fB-r\fR] \fIproperty\fR
2312 \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...\fR
2313 .ad
2314 .sp .6
2315 .RS 4n
2316 Clears the specified property, causing it to be inherited from an ancestor. If
2317 no ancestor has the property set, then the default value is used. See the
2318 "Properties" section for a listing of default values, and details on which
2319 properties can be inherited.
2320 .sp
2321 .ne 2
2322 .na
2323 \fB\fB-r\fR\fR
2324 .ad
2325 .sp .6
2326 .RS 4n
2327 Recursively inherit the given property for all children.
2328 .RE
2329 
2330 .RE
2331 
2332 .sp
2333 .ne 2
2334 .na
2335 \fB\fBzfs upgrade\fR [\fB-v\fR]\fR
2336 .ad
2337 .sp .6
2338 .RS 4n
2339 Displays a list of file systems that are not the most recent version.
2340 .RE
2341 
2342 .sp
2343 .ne 2
2344 .na
2345 \fB\fBzfs upgrade\fR [\fB-r\fR] [\fB-V\fR \fIversion\fR] [\fB-a\fR |
2346 \fIfilesystem\fR]\fR
2347 .ad
2348 .sp .6
2349 .RS 4n
2350 Upgrades file systems to a new on-disk version. Once this is done, the file
2351 systems will no longer be accessible on systems running older versions of the
2352 software. \fBzfs send\fR streams generated from new snapshots of these file
2353 systems cannot be accessed on systems running older versions of the software.
2354 .sp
2355 In general, the file system version is independent of the pool version. See
2356 \fBzpool\fR(1M) for information on the \fBzpool upgrade\fR command.
2357 .sp
2358 In some cases, the file system version and the pool version are interrelated
2359 and the pool version must be upgraded before the file system version can be
2360 upgraded.
2361 .sp
2362 .ne 2
2363 .na
2364 \fB\fB-a\fR\fR
2365 .ad
2366 .sp .6
2367 .RS 4n
2368 Upgrade all file systems on all imported pools.
2369 .RE
2370 
2371 .sp
2372 .ne 2
2373 .na
2374 \fB\fIfilesystem\fR\fR
2375 .ad
2376 .sp .6
2377 .RS 4n
2378 Upgrade the specified file system.
2379 .RE
2380 
2381 .sp
2382 .ne 2
2383 .na
2384 \fB\fB-r\fR\fR
2385 .ad
2386 .sp .6
2387 .RS 4n
2388 Upgrade the specified file system and all descendent file systems
2389 .RE
2390 
2391 .sp
2392 .ne 2
2393 .na
2394 \fB\fB-V\fR \fIversion\fR\fR
2395 .ad
2396 .sp .6
2397 .RS 4n
2398 Upgrade to the specified \fIversion\fR. If the \fB-V\fR flag is not specified,
2399 this command upgrades to the most recent version. This option can only be used
2400 to increase the version number, and only up to the most recent version
2401 supported by this software.
2402 .RE
2403 
2404 .RE
2405 
2406 .sp
2407 .ne 2
2408 .na
2409 \fB\fBzfs userspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR
2410 \fIfield\fR]... [\fB-t\fR \fItype\fR [,...]] \fIfilesystem\fR |
2411 \fIsnapshot\fR\fR
2412 .ad
2413 .sp .6
2414 .RS 4n
2415 Displays space consumed by, and quotas on, each user in the specified
2416 filesystem or snapshot. This corresponds to the \fBuserused@\fR\fIuser\fR and
2417 \fBuserquota@\fR\fIuser\fR properties.
2418 .sp
2419 .ne 2
2420 .na
2421 \fB\fB-n\fR\fR
2422 .ad
2423 .sp .6
2424 .RS 4n
2425 Print numeric ID instead of user/group name.
2426 .RE
2427 
2428 .sp
2429 .ne 2
2430 .na
2431 \fB\fB-H\fR\fR
2432 .ad
2433 .sp .6
2434 .RS 4n
2435 Do not print headers, use tab-delimited output.
2436 .RE
2437 
2438 .sp
2439 .ne 2
2440 .na
2441 \fB\fB-p\fR\fR
2442 .ad
2443 .sp .6
2444 .RS 4n
2445 Use exact (parseable) numeric output.
2446 .RE
2447 
2448 .sp
2449 .ne 2
2450 .na
2451 \fB\fB-o\fR \fIfield\fR[,...]\fR
2452 .ad
2453 .sp .6
2454 .RS 4n
2455 Display only the specified fields from the following set,
2456 \fBtype,name,used,quota\fR.The default is to display all fields.
2457 .RE
2458 
2459 .sp
2460 .ne 2
2461 .na
2462 \fB\fB-s\fR \fIfield\fR\fR
2463 .ad
2464 .sp .6
2465 .RS 4n
2466 Sort output by this field. The \fIs\fR and \fIS\fR flags may be specified
2467 multiple times to sort first by one field, then by another. The default is
2468 \fB-s type\fR \fB-s name\fR.
2469 .RE
2470 
2471 .sp
2472 .ne 2
2473 .na
2474 \fB\fB-S\fR \fIfield\fR\fR
2475 .ad
2476 .sp .6
2477 .RS 4n
2478 Sort by this field in reverse order. See \fB-s\fR.
2479 .RE
2480 
2481 .sp
2482 .ne 2
2483 .na
2484 \fB\fB-t\fR \fItype\fR[,...]\fR
2485 .ad
2486 .sp .6
2487 .RS 4n
2488 Print only the specified types from the following set,
2489 \fBall,posixuser,smbuser,posixgroup,smbgroup\fR.
2490 .sp
2491 The default is \fB-t posixuser,smbuser\fR
2492 .sp
2493 The default can be changed to include group types.
2494 .RE
2495 
2496 .sp
2497 .ne 2
2498 .na
2499 \fB\fB-i\fR\fR
2500 .ad
2501 .sp .6
2502 .RS 4n
2503 Translate SID to POSIX ID. The POSIX ID may be ephemeral if no mapping exists.
2504 Normal POSIX interfaces (for example, \fBstat\fR(2), \fBls\fR \fB-l\fR) perform
2505 this translation, so the \fB-i\fR option allows the output from \fBzfs
2506 userspace\fR to be compared directly with those utilities. However, \fB-i\fR
2507 may lead to confusion if some files were created by an SMB user before a
2508 SMB-to-POSIX name mapping was established. In such a case, some files are owned
2509 by the SMB entity and some by the POSIX entity. However, the \fB-i\fR option
2510 will report that the POSIX entity has the total usage and quota for both.
2511 .RE
2512 
2513 .RE
2514 
2515 .sp
2516 .ne 2
2517 .na
2518 \fB\fBzfs groupspace\fR [\fB-niHp\fR] [\fB-o\fR \fIfield\fR[,...]] [\fB-sS\fR
2519 \fIfield\fR]... [\fB-t\fR \fItype\fR [,...]] \fIfilesystem\fR |
2520 \fIsnapshot\fR\fR
2521 .ad
2522 .sp .6
2523 .RS 4n
2524 Displays space consumed by, and quotas on, each group in the specified
2525 filesystem or snapshot. This subcommand is identical to \fBzfs userspace\fR,
2526 except that the default types to display are \fB-t posixgroup,smbgroup\fR.
2527 .sp
2528 .in +2
2529 .nf
2530 -
2531 .fi
2532 .in -2
2533 .sp
2534 
2535 .RE
2536 
2537 .sp
2538 .ne 2
2539 .na
2540 \fB\fBzfs mount\fR\fR
2541 .ad
2542 .sp .6
2543 .RS 4n
2544 Displays all \fBZFS\fR file systems currently mounted.
2545 .RE
2546 
2547 .sp
2548 .ne 2
2549 .na
2550 \fB\fBzfs mount\fR [\fB-vO\fR] [\fB-o\fR \fIoptions\fR] \fB-a\fR |
2551 \fIfilesystem\fR\fR
2552 .ad
2553 .sp .6
2554 .RS 4n
2555 Mounts \fBZFS\fR file systems. Invoked automatically as part of the boot
2556 process.
2557 .sp
2558 .ne 2
2559 .na
2560 \fB\fB-o\fR \fIoptions\fR\fR
2561 .ad
2562 .sp .6
2563 .RS 4n
2564 An optional, comma-separated list of mount options to use temporarily for the
2565 duration of the mount. See the "Temporary Mount Point Properties" section for
2566 details.
2567 .RE
2568 
2569 .sp
2570 .ne 2
2571 .na
2572 \fB\fB-O\fR\fR
2573 .ad
2574 .sp .6
2575 .RS 4n
2576 Perform an overlay mount. See \fBmount\fR(1M) for more information.
2577 .RE
2578 
2579 .sp
2580 .ne 2
2581 .na
2582 \fB\fB-v\fR\fR
2583 .ad
2584 .sp .6
2585 .RS 4n
2586 Report mount progress.
2587 .RE
2588 
2589 .sp
2590 .ne 2
2591 .na
2592 \fB\fB-a\fR\fR
2593 .ad
2594 .sp .6
2595 .RS 4n
2596 Mount all available \fBZFS\fR file systems. Invoked automatically as part of
2597 the boot process.
2598 .RE
2599 
2600 .sp
2601 .ne 2
2602 .na
2603 \fB\fIfilesystem\fR\fR
2604 .ad
2605 .sp .6
2606 .RS 4n
2607 Mount the specified filesystem.
2608 .RE
2609 
2610 .RE
2611 
2612 .sp
2613 .ne 2
2614 .na
2615 \fB\fBzfs unmount\fR [\fB-f\fR] \fB-a\fR | \fIfilesystem\fR|\fImountpoint\fR\fR
2616 .ad
2617 .sp .6
2618 .RS 4n
2619 Unmounts currently mounted \fBZFS\fR file systems. Invoked automatically as
2620 part of the shutdown process.
2621 .sp
2622 .ne 2
2623 .na
2624 \fB\fB-f\fR\fR
2625 .ad
2626 .sp .6
2627 .RS 4n
2628 Forcefully unmount the file system, even if it is currently in use.
2629 .RE
2630 
2631 .sp
2632 .ne 2
2633 .na
2634 \fB\fB-a\fR\fR
2635 .ad
2636 .sp .6
2637 .RS 4n
2638 Unmount all available \fBZFS\fR file systems. Invoked automatically as part of
2639 the boot process.
2640 .RE
2641 
2642 .sp
2643 .ne 2
2644 .na
2645 \fB\fIfilesystem\fR|\fImountpoint\fR\fR
2646 .ad
2647 .sp .6
2648 .RS 4n
2649 Unmount the specified filesystem. The command can also be given a path to a
2650 \fBZFS\fR file system mount point on the system.
2651 .RE
2652 
2653 .RE
2654 
2655 .sp
2656 .ne 2
2657 .na
2658 \fB\fBzfs share\fR \fB-a\fR | \fIfilesystem\fR\fR
2659 .ad
2660 .sp .6
2661 .RS 4n
2662 Shares available \fBZFS\fR file systems.
2663 .sp
2664 .ne 2
2665 .na
2666 \fB\fB-a\fR\fR
2667 .ad
2668 .sp .6
2669 .RS 4n
2670 Share all available \fBZFS\fR file systems. Invoked automatically as part of
2671 the boot process.
2672 .RE
2673 
2674 .sp
2675 .ne 2
2676 .na
2677 \fB\fIfilesystem\fR\fR
2678 .ad
2679 .sp .6
2680 .RS 4n
2681 Share the specified filesystem according to the \fBsharenfs\fR and
2682 \fBsharesmb\fR properties. File systems are shared when the \fBsharenfs\fR or
2683 \fBsharesmb\fR property is set.
2684 .RE
2685 
2686 .RE
2687 
2688 .sp
2689 .ne 2
2690 .na
2691 \fB\fBzfs unshare\fR \fB-a\fR | \fIfilesystem\fR|\fImountpoint\fR\fR
2692 .ad
2693 .sp .6
2694 .RS 4n
2695 Unshares currently shared \fBZFS\fR file systems. This is invoked automatically
2696 as part of the shutdown process.
2697 .sp
2698 .ne 2
2699 .na
2700 \fB\fB-a\fR\fR
2701 .ad
2702 .sp .6
2703 .RS 4n
2704 Unshare all available \fBZFS\fR file systems. Invoked automatically as part of
2705 the boot process.
2706 .RE
2707 
2708 .sp
2709 .ne 2
2710 .na
2711 \fB\fIfilesystem\fR|\fImountpoint\fR\fR
2712 .ad
2713 .sp .6
2714 .RS 4n
2715 Unshare the specified filesystem. The command can also be given a path to a
2716 \fBZFS\fR file system shared on the system.
2717 .RE
2718 
2719 .RE
2720 
2721 .sp
2722 .ne 2
2723 .na
2724 \fBzfs send\fR [\fB-DnPpRrv\fR] [\fB-\fR[\fBiI\fR] \fIsnapshot\fR] \fIsnapshot\fR
2725 .ad
2726 .sp .6
2727 .RS 4n
2728 Creates a stream representation of the second \fIsnapshot\fR, which is written
2729 to standard output. The output can be redirected to a file or to a different
2730 system (for example, using \fBssh\fR(1). By default, a full stream is
2731 generated.
2732 .sp
2733 .ne 2
2734 .na
2735 \fB\fB-i\fR \fIsnapshot\fR\fR
2736 .ad
2737 .sp .6
2738 .RS 4n
2739 Generate an incremental stream from the first \fIsnapshot\fR to the second
2740 \fIsnapshot\fR. The incremental source (the first \fIsnapshot\fR) can be
2741 specified as the last component of the snapshot name (for example, the part
2742 after the \fB@\fR), and it is assumed to be from the same file system as the
2743 second \fIsnapshot\fR.
2744 .sp
2745 If the destination is a clone, the source may be the origin snapshot, which
2746 must be fully specified (for example, \fBpool/fs@origin\fR, not just
2747 \fB@origin\fR).
2748 .RE
2749 
2750 .sp
2751 .ne 2
2752 .na
2753 \fB\fB-I\fR \fIsnapshot\fR\fR
2754 .ad
2755 .sp .6
2756 .RS 4n
2757 Generate a stream package that sends all intermediary snapshots from the first
2758 snapshot to the second snapshot. For example, \fB-I @a fs@d\fR is similar to
2759 \fB-i @a fs@b; -i @b fs@c; -i @c fs@d\fR. The incremental source snapshot may
2760 be specified as with the \fB-i\fR option.
2761 .RE
2762 
2763 .sp
2764 .ne 2
2765 .na
2766 \fB\fB-R\fR\fR
2767 .ad
2768 .sp .6
2769 .RS 4n
2770 Generate a replication stream package, which will replicate the specified
2771 filesystem, and all descendent file systems, up to the named snapshot. When
2772 received, all properties, snapshots, descendent file systems, and clones are
2773 preserved.
2774 .sp
2775 If the \fB-i\fR or \fB-I\fR flags are used in conjunction with the \fB-R\fR
2776 flag, an incremental replication stream is generated. The current values of
2777 properties, and current snapshot and file system names are set when the stream
2778 is received. If the \fB-F\fR flag is specified when this stream is received,
2779 snapshots and file systems that do not exist on the sending side are destroyed.
2780 .RE
2781 
2782 .sp
2783 .ne 2
2784 .na
2785 \fB\fB-D\fR\fR
2786 .ad
2787 .sp .6
2788 .RS 4n
2789 Generate a deduplicated stream.  Blocks which would have been sent multiple
2790 times in the send stream will only be sent once.  The receiving system must
2791 also support this feature to recieve a deduplicated stream.  This flag can
2792 be used regardless of the dataset's \fBdedup\fR property, but performance
2793 will be much better if the filesystem uses a dedup-capable checksum (eg.
2794 \fBsha256\fR).
2795 .RE
2796 
2797 .sp
2798 .ne 2
2799 .na
2800 \fB\fB-r\fR\fR
2801 .ad
2802 .sp .6
2803 .RS 4n
2804 Recursively send all descendant snapshots.  This is similar to the \fB-R\fR
2805 flag, but information about deleted and renamed datasets is not included, and
2806 property information is only included if the \fB-p\fR flag is specified.
2807 .RE
2808 
2809 .sp
2810 .ne 2
2811 .na
2812 \fB\fB-p\fR\fR
2813 .ad
2814 .sp .6
2815 .RS 4n
2816 Include the dataset's properties in the stream.  This flag is implicit when
2817 \fB-R\fR is specified.  The receiving system must also support this feature.
2818 .RE
2819 
2820 .sp
2821 .ne 2
2822 .na
2823 \fB\fB-n\fR\fR
2824 .ad
2825 .sp .6
2826 .RS 4n
2827 Do a dry-run ("No-op") send.  Do not generate any actual send data.  This is
2828 useful in conjunction with the \fB-v\fR or \fB-P\fR flags to determine what
2829 data will be sent.
2830 .RE
2831 
2832 .sp
2833 .ne 2
2834 .na
2835 \fB\fB-P\fR\fR
2836 .ad
2837 .sp .6
2838 .RS 4n
2839 Print machine-parsable verbose information about the stream package generated.
2840 .RE
2841 
2842 .sp
2843 .ne 2
2844 .na
2845 \fB\fB-v\fR\fR
2846 .ad
2847 .sp .6
2848 .RS 4n
2849 Print verbose information about the stream package generated.  This information
2850 includes a per-second report of how much data has been sent.
2851 .RE
2852 
2853 The format of the stream is committed. You will be able to receive your streams
2854 on future versions of \fBZFS\fR.
2855 .RE
2856 
2857 .sp
2858 .ne 2
2859 .na
2860 \fB\fBzfs receive\fR [\fB-vnFu\fR]
2861 \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR\fR
2862 .ad
2863 .br
2864 .na
2865 \fB\fBzfs receive\fR [\fB-vnFu\fR] [\fB-d\fR|\fB-e\fR] \fIfilesystem\fR\fR
2866 .ad
2867 .sp .6
2868 .RS 4n
2869 Creates a snapshot whose contents are as specified in the stream provided on
2870 standard input. If a full stream is received, then a new file system is created
2871 as well. Streams are created using the \fBzfs send\fR subcommand, which by
2872 default creates a full stream. \fBzfs recv\fR can be used as an alias for
2873 \fBzfs receive\fR.
2874 .sp
2875 If an incremental stream is received, then the destination file system must
2876 already exist, and its most recent snapshot must match the incremental stream's
2877 source. For \fBzvols\fR, the destination device link is destroyed and
2878 recreated, which means the \fBzvol\fR cannot be accessed during the
2879 \fBreceive\fR operation.
2880 .sp
2881 When a snapshot replication package stream that is generated by using the
2882 \fBzfs send\fR \fB-R\fR command is  received, any snapshots that do not exist
2883 on the sending location are destroyed by using the \fBzfs destroy\fR \fB-d\fR
2884 command.
2885 .sp
2886 The name of the snapshot (and file system, if a full stream is received) that
2887 this subcommand creates depends on the argument type and the use of the
2888 \fB-d\fR or \fB-e\fR options.
2889 .sp
2890 If the argument is a snapshot name, the specified \fIsnapshot\fR is created. If
2891 the argument is a file system or volume name, a snapshot with the same name as
2892 the sent snapshot is created within the specified \fIfilesystem\fR or
2893 \fIvolume\fR.  If neither of the \fB-d\fR or \fB-e\fR options are specified,
2894 the provided target snapshot name is used exactly as provided.
2895 .sp
2896 The \fB-d\fR and \fB-e\fR options cause the file system name of the target
2897 snapshot to be determined by appending a portion of the sent snapshot's name to
2898 the specified target \fIfilesystem\fR. If the \fB-d\fR option is specified, all
2899 but the first element of the sent snapshot's file system path (usually the
2900 pool name) is used and any required intermediate file systems within the
2901 specified one are created.  If the \fB-e\fR option is specified, then only the
2902 last element of the sent snapshot's file system name (i.e. the name of the
2903 source file system itself) is used as the target file system name.
2904 .sp
2905 .ne 2
2906 .na
2907 \fB\fB-d\fR\fR
2908 .ad
2909 .sp .6
2910 .RS 4n
2911 Discard the first element of the sent snapshot's file system name, using
2912 the remaining elements to determine the name of the target file system for
2913 the new snapshot as described in the paragraph above.
2914 .RE
2915 
2916 .sp
2917 .ne 2
2918 .na
2919 \fB\fB-e\fR\fR
2920 .ad
2921 .sp .6
2922 .RS 4n
2923 Discard all but the last element of the sent snapshot's file system name,
2924 using that element to determine the name of the target file system for
2925 the new snapshot as described in the paragraph above.
2926 .RE
2927 
2928 .sp
2929 .ne 2
2930 .na
2931 \fB\fB-u\fR\fR
2932 .ad
2933 .sp .6
2934 .RS 4n
2935 File system that is associated with the received stream is not mounted.
2936 .RE
2937 
2938 .sp
2939 .ne 2
2940 .na
2941 \fB\fB-v\fR\fR
2942 .ad
2943 .sp .6
2944 .RS 4n
2945 Print verbose information about the stream and the time required to perform the
2946 receive operation.
2947 .RE
2948 
2949 .sp
2950 .ne 2
2951 .na
2952 \fB\fB-n\fR\fR
2953 .ad
2954 .sp .6
2955 .RS 4n
2956 Do not actually receive the stream. This can be useful in conjunction with the
2957 \fB-v\fR option to verify the name the receive operation would use.
2958 .RE
2959 
2960 .sp
2961 .ne 2
2962 .na
2963 \fB\fB-F\fR\fR
2964 .ad
2965 .sp .6
2966 .RS 4n
2967 Force a rollback of the file system to the most recent snapshot before
2968 performing the receive operation. If receiving an incremental replication
2969 stream (for example, one generated by \fBzfs send -R -[iI]\fR), destroy
2970 snapshots and file systems that do not exist on the sending side.
2971 .RE
2972 
2973 .RE
2974 
2975 .sp
2976 .ne 2
2977 .na
2978 \fB\fBzfs allow\fR \fIfilesystem\fR | \fIvolume\fR\fR
2979 .ad
2980 .sp .6
2981 .RS 4n
2982 Displays permissions that have been delegated on the specified filesystem or
2983 volume. See the other forms of \fBzfs allow\fR for more information.
2984 .RE
2985 
2986 .sp
2987 .ne 2
2988 .na
2989 \fB\fBzfs allow\fR [\fB-ldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...]
2990 \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR| \fIvolume\fR\fR
2991 .ad
2992 .br
2993 .na
2994 \fB\fBzfs allow\fR [\fB-ld\fR] \fB-e\fR \fIperm\fR|@\fIsetname\fR[,...]
2995 \fIfilesystem\fR | \fIvolume\fR\fR
2996 .ad
2997 .sp .6
2998 .RS 4n
2999 Delegates \fBZFS\fR administration permission for the file systems to
3000 non-privileged users.
3001 .sp
3002 .ne 2
3003 .na
3004 \fB[\fB-ug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...]\fR
3005 .ad
3006 .sp .6
3007 .RS 4n
3008 Specifies to whom the permissions are delegated. Multiple entities can be
3009 specified as a comma-separated list. If neither of the \fB-ug\fR options are
3010 specified, then the argument is interpreted preferentially as the keyword
3011 "everyone", then as a user name, and lastly as a group name. To specify a user
3012 or group named "everyone", use the \fB-u\fR or \fB-g\fR options. To specify a
3013 group with the same name as a user, use the \fB-g\fR options.
3014 .RE
3015 
3016 .sp
3017 .ne 2
3018 .na
3019 \fB[\fB-e\fR] \fIperm\fR|@\fIsetname\fR[,...]\fR
3020 .ad
3021 .sp .6
3022 .RS 4n
3023 Specifies that the permissions be delegated to "everyone." Multiple permissions
3024 may be specified as a comma-separated list. Permission names are the same as
3025 \fBZFS\fR subcommand and property names. See the property list below. Property
3026 set names, which begin with an at sign (\fB@\fR) , may be specified. See the
3027 \fB-s\fR form below for details.
3028 .RE
3029 
3030 .sp
3031 .ne 2
3032 .na
3033 \fB[\fB-ld\fR] \fIfilesystem\fR|\fIvolume\fR\fR
3034 .ad
3035 .sp .6
3036 .RS 4n
3037 Specifies where the permissions are delegated. If neither of the \fB-ld\fR
3038 options are specified, or both are, then the permissions are allowed for the
3039 file system or volume, and all of its descendents. If only the \fB-l\fR option
3040 is used, then is allowed "locally" only for the specified file system. If only
3041 the \fB-d\fR option is used, then is allowed only for the descendent file
3042 systems.
3043 .RE
3044 
3045 .RE
3046 
3047 .sp
3048 .LP
3049 Permissions are generally the ability to use a \fBZFS\fR subcommand or change a
3050 \fBZFS\fR property. The following permissions are available:
3051 .sp
3052 .in +2
3053 .nf
3054 NAME             TYPE           NOTES
3055 allow            subcommand     Must also have the permission that is being
3056                                 allowed
3057 clone            subcommand     Must also have the 'create' ability and 'mount'
3058                                 ability in the origin file system
3059 create           subcommand     Must also have the 'mount' ability
3060 destroy          subcommand     Must also have the 'mount' ability
3061 mount            subcommand     Allows mount/umount of ZFS datasets
3062 promote          subcommand     Must also have the 'mount'
3063                                 and 'promote' ability in the origin file system
3064 receive          subcommand     Must also have the 'mount' and 'create' ability
3065 rename           subcommand     Must also have the 'mount' and 'create'
3066                                 ability in the new parent
3067 rollback         subcommand     Must also have the 'mount' ability
3068 send             subcommand
3069 share            subcommand     Allows sharing file systems over NFS or SMB
3070                                 protocols
3071 snapshot         subcommand     Must also have the 'mount' ability
3072 groupquota       other          Allows accessing any groupquota@... property
3073 groupused        other          Allows reading any groupused@... property
3074 userprop         other          Allows changing any user property
3075 userquota        other          Allows accessing any userquota@... property
3076 userused         other          Allows reading any userused@... property
3077 
3078 aclinherit       property
3079 aclmode          property
3080 atime            property
3081 canmount         property
3082 casesensitivity  property
3083 checksum         property
3084 compression      property
3085 copies           property
3086 devices          property
3087 exec             property
3088 mountpoint       property
3089 nbmand           property
3090 normalization    property
3091 primarycache     property
3092 quota            property
3093 readonly         property
3094 recordsize       property
3095 refquota         property
3096 refreservation   property
3097 reservation      property
3098 secondarycache   property
3099 setuid           property
3100 shareiscsi       property
3101 sharenfs         property
3102 sharesmb         property
3103 snapdir          property
3104 utf8only         property
3105 version          property
3106 volblocksize     property
3107 volsize          property
3108 vscan            property
3109 xattr            property
3110 zoned            property
3111 .fi
3112 .in -2
3113 .sp
3114 
3115 .sp
3116 .ne 2
3117 .na
3118 \fB\fBzfs allow\fR \fB-c\fR \fIperm\fR|@\fIsetname\fR[,...]
3119 \fIfilesystem\fR|\fIvolume\fR\fR
3120 .ad
3121 .sp .6
3122 .RS 4n
3123 Sets "create time" permissions. These permissions are granted (locally) to the
3124 creator of any newly-created descendent file system.
3125 .RE
3126 
3127 .sp
3128 .ne 2
3129 .na
3130 \fB\fBzfs allow\fR \fB-s\fR @\fIsetname\fR \fIperm\fR|@\fIsetname\fR[,...]
3131 \fIfilesystem\fR|\fIvolume\fR\fR
3132 .ad
3133 .sp .6
3134 .RS 4n
3135 Defines or adds permissions to a permission set. The set can be used by other
3136 \fBzfs allow\fR commands for the specified file system and its descendents.
3137 Sets are evaluated dynamically, so changes to a set are immediately reflected.
3138 Permission sets follow the same naming restrictions as ZFS file systems, but
3139 the name must begin with an "at sign" (\fB@\fR), and can be no more than 64
3140 characters long.
3141 .RE
3142 
3143 .sp
3144 .ne 2
3145 .na
3146 \fB\fBzfs unallow\fR [\fB-rldug\fR]
3147 "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...]
3148 [\fIperm\fR|@\fIsetname\fR[, ...]] \fIfilesystem\fR|\fIvolume\fR\fR
3149 .ad
3150 .br
3151 .na
3152 \fB\fBzfs unallow\fR [\fB-rld\fR] \fB-e\fR [\fIperm\fR|@\fIsetname\fR [,...]]
3153 \fIfilesystem\fR|\fIvolume\fR\fR
3154 .ad
3155 .br
3156 .na
3157 \fB\fBzfs unallow\fR [\fB-r\fR] \fB-c\fR [\fIperm\fR|@\fIsetname\fR[,...]]\fR
3158 .ad
3159 .br
3160 .na
3161 \fB\fIfilesystem\fR|\fIvolume\fR\fR
3162 .ad
3163 .sp .6
3164 .RS 4n
3165 Removes permissions that were granted with the \fBzfs allow\fR command. No
3166 permissions are explicitly denied, so other permissions granted are still in
3167 effect. For example, if the permission is granted by an ancestor. If no
3168 permissions are specified, then all permissions for the specified \fIuser\fR,
3169 \fIgroup\fR, or \fIeveryone\fR are removed. Specifying "everyone" (or using the
3170 \fB-e\fR option) only removes the permissions that were granted to "everyone",
3171 not all permissions for every user and group. See the \fBzfs allow\fR command
3172 for a description of the \fB-ldugec\fR options.
3173 .sp
3174 .ne 2
3175 .na
3176 \fB\fB-r\fR\fR
3177 .ad
3178 .sp .6
3179 .RS 4n
3180 Recursively remove the permissions from this file system and all descendents.
3181 .RE
3182 
3183 .RE
3184 
3185 .sp
3186 .ne 2
3187 .na
3188 \fB\fBzfs unallow\fR [\fB-r\fR] \fB-s\fR @\fIsetname\fR
3189 [\fIperm\fR|@\fIsetname\fR[,...]]\fR
3190 .ad
3191 .br
3192 .na
3193 \fB\fIfilesystem\fR|\fIvolume\fR\fR
3194 .ad
3195 .sp .6
3196 .RS 4n
3197 Removes permissions from a permission set. If no permissions are specified,
3198 then all permissions are removed, thus removing the set entirely.
3199 .RE
3200 
3201 .sp
3202 .ne 2
3203 .na
3204 \fB\fBzfs hold\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...\fR
3205 .ad
3206 .sp .6
3207 .RS 4n
3208 Adds a single reference, named with the \fItag\fR argument, to the specified
3209 snapshot or snapshots. Each snapshot has its own tag namespace, and tags must
3210 be unique within that space.
3211 .sp
3212 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
3213 \fBzfs destroy\fR command return \fBEBUSY\fR.
3214 .sp
3215 .ne 2
3216 .na
3217 \fB\fB-r\fR\fR
3218 .ad
3219 .sp .6
3220 .RS 4n
3221 Specifies that a hold with the given tag is applied recursively to the
3222 snapshots of all descendent file systems.
3223 .RE
3224 
3225 .RE
3226 
3227 .sp
3228 .ne 2
3229 .na
3230 \fB\fBzfs holds\fR [\fB-r\fR] \fIsnapshot\fR...\fR
3231 .ad
3232 .sp .6
3233 .RS 4n
3234 Lists all existing user references for the given snapshot or snapshots.
3235 .sp
3236 .ne 2
3237 .na
3238 \fB\fB-r\fR\fR
3239 .ad
3240 .sp .6
3241 .RS 4n
3242 Lists the holds that are set on the named descendent snapshots, in addition to
3243 listing the holds on the named snapshot.
3244 .RE
3245 
3246 .RE
3247 
3248 .sp
3249 .ne 2
3250 .na
3251 \fB\fBzfs release\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...\fR
3252 .ad
3253 .sp .6
3254 .RS 4n
3255 Removes a single reference, named with the \fItag\fR argument, from the
3256 specified snapshot or snapshots. The tag must already exist for each snapshot.
3257 .sp
3258 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
3259 \fBzfs destroy\fR command return \fBEBUSY\fR.
3260 .sp
3261 .ne 2
3262 .na
3263 \fB\fB-r\fR\fR
3264 .ad
3265 .sp .6
3266 .RS 4n
3267 Recursively releases a hold with the given tag on the snapshots of all
3268 descendent file systems.
3269 .RE
3270 
3271 .RE
3272 
3273 .SH EXAMPLES
3274 .LP
3275 \fBExample 1 \fRCreating a ZFS File System Hierarchy
3276 .sp
3277 .LP
3278 The following commands create a file system named \fBpool/home\fR and a file
3279 system named \fBpool/home/bob\fR. The mount point \fB/export/home\fR is set for
3280 the parent file system, and is automatically inherited by the child file
3281 system.
3282 
3283 .sp
3284 .in +2
3285 .nf
3286 # \fBzfs create pool/home\fR
3287 # \fBzfs set mountpoint=/export/home pool/home\fR
3288 # \fBzfs create pool/home/bob\fR
3289 .fi
3290 .in -2
3291 .sp
3292 
3293 .LP
3294 \fBExample 2 \fRCreating a ZFS Snapshot
3295 .sp
3296 .LP
3297 The following command creates a snapshot named \fByesterday\fR. This snapshot
3298 is mounted on demand in the \fB\&.zfs/snapshot\fR directory at the root of the
3299 \fBpool/home/bob\fR file system.
3300 
3301 .sp
3302 .in +2
3303 .nf
3304 # \fBzfs snapshot pool/home/bob@yesterday\fR
3305 .fi
3306 .in -2
3307 .sp
3308 
3309 .LP
3310 \fBExample 3 \fRCreating and Destroying Multiple Snapshots
3311 .sp
3312 .LP
3313 The following command creates snapshots named \fByesterday\fR of
3314 \fBpool/home\fR and all of its descendent file systems. Each snapshot is
3315 mounted on demand in the \fB\&.zfs/snapshot\fR directory at the root of its
3316 file system. The second command destroys the newly created snapshots.
3317 
3318 .sp
3319 .in +2
3320 .nf
3321 # \fBzfs snapshot -r pool/home@yesterday\fR
3322 # \fBzfs destroy -r pool/home@yesterday\fR
3323 .fi
3324 .in -2
3325 .sp
3326 
3327 .LP
3328 \fBExample 4 \fRDisabling and Enabling File System Compression
3329 .sp
3330 .LP
3331 The following command disables the \fBcompression\fR property for all file
3332 systems under \fBpool/home\fR. The next command explicitly enables
3333 \fBcompression\fR for \fBpool/home/anne\fR.
3334 
3335 .sp
3336 .in +2
3337 .nf
3338 # \fBzfs set compression=off pool/home\fR
3339 # \fBzfs set compression=on pool/home/anne\fR
3340 .fi
3341 .in -2
3342 .sp
3343 
3344 .LP
3345 \fBExample 5 \fRListing ZFS Datasets
3346 .sp
3347 .LP
3348 The following command lists all active file systems and volumes in the system.
3349 Snapshots are displayed if the \fBlistsnaps\fR property is \fBon\fR. The
3350 default is \fBoff\fR. See \fBzpool\fR(1M) for more information on pool
3351 properties.
3352 
3353 .sp
3354 .in +2
3355 .nf
3356 # \fBzfs list\fR
3357    NAME                      USED  AVAIL  REFER  MOUNTPOINT
3358    pool                      450K   457G    18K  /pool
3359    pool/home                 315K   457G    21K  /export/home
3360    pool/home/anne             18K   457G    18K  /export/home/anne
3361    pool/home/bob             276K   457G   276K  /export/home/bob
3362 .fi
3363 .in -2
3364 .sp
3365 
3366 .LP
3367 \fBExample 6 \fRSetting a Quota on a ZFS File System
3368 .sp
3369 .LP
3370 The following command sets a quota of 50 Gbytes for \fBpool/home/bob\fR.
3371 
3372 .sp
3373 .in +2
3374 .nf
3375 # \fBzfs set quota=50G pool/home/bob\fR
3376 .fi
3377 .in -2
3378 .sp
3379 
3380 .LP
3381 \fBExample 7 \fRListing ZFS Properties
3382 .sp
3383 .LP
3384 The following command lists all properties for \fBpool/home/bob\fR.
3385 
3386 .sp
3387 .in +2
3388 .nf
3389 # \fBzfs get all pool/home/bob\fR
3390 NAME           PROPERTY              VALUE                  SOURCE
3391 pool/home/bob  type                  filesystem             -
3392 pool/home/bob  creation              Tue Jul 21 15:53 2009  -
3393 pool/home/bob  used                  21K                    -
3394 pool/home/bob  available             20.0G                  -
3395 pool/home/bob  referenced            21K                    -
3396 pool/home/bob  compressratio         1.00x                  -
3397 pool/home/bob  mounted               yes                    -
3398 pool/home/bob  quota                 20G                    local
3399 pool/home/bob  reservation           none                   default
3400 pool/home/bob  recordsize            128K                   default
3401 pool/home/bob  mountpoint            /pool/home/bob         default
3402 pool/home/bob  sharenfs              off                    default
3403 pool/home/bob  checksum              on                     default
3404 pool/home/bob  compression           on                     local
3405 pool/home/bob  atime                 on                     default
3406 pool/home/bob  devices               on                     default
3407 pool/home/bob  exec                  on                     default
3408 pool/home/bob  setuid                on                     default
3409 pool/home/bob  readonly              off                    default
3410 pool/home/bob  zoned                 off                    default
3411 pool/home/bob  snapdir               hidden                 default
3412 pool/home/bob  aclmode               discard                default
3413 pool/home/bob  aclinherit            restricted             default
3414 pool/home/bob  canmount              on                     default
3415 pool/home/bob  shareiscsi            off                    default
3416 pool/home/bob  xattr                 on                     default
3417 pool/home/bob  copies                1                      default
3418 pool/home/bob  version               4                      -
3419 pool/home/bob  utf8only              off                    -
3420 pool/home/bob  normalization         none                   -
3421 pool/home/bob  casesensitivity       sensitive              -
3422 pool/home/bob  vscan                 off                    default
3423 pool/home/bob  nbmand                off                    default
3424 pool/home/bob  sharesmb              off                    default
3425 pool/home/bob  refquota              none                   default
3426 pool/home/bob  refreservation        none                   default
3427 pool/home/bob  primarycache          all                    default
3428 pool/home/bob  secondarycache        all                    default
3429 pool/home/bob  usedbysnapshots       0                      -
3430 pool/home/bob  usedbydataset         21K                    -
3431 pool/home/bob  usedbychildren        0                      -
3432 pool/home/bob  usedbyrefreservation  0                      -
3433 .fi
3434 .in -2
3435 .sp
3436 
3437 .sp
3438 .LP
3439 The following command gets a single property value.
3440 
3441 .sp
3442 .in +2
3443 .nf
3444 # \fBzfs get -H -o value compression pool/home/bob\fR
3445 on
3446 .fi
3447 .in -2
3448 .sp
3449 
3450 .sp
3451 .LP
3452 The following command lists all properties with local settings for
3453 \fBpool/home/bob\fR.
3454 
3455 .sp
3456 .in +2
3457 .nf
3458 # \fBzfs get -r -s local -o name,property,value all pool/home/bob\fR
3459 NAME           PROPERTY              VALUE
3460 pool/home/bob  quota                 20G
3461 pool/home/bob  compression           on
3462 .fi
3463 .in -2
3464 .sp
3465 
3466 .LP
3467 \fBExample 8 \fRRolling Back a ZFS File System
3468 .sp
3469 .LP
3470 The following command reverts the contents of \fBpool/home/anne\fR to the
3471 snapshot named \fByesterday\fR, deleting all intermediate snapshots.
3472 
3473 .sp
3474 .in +2
3475 .nf
3476 # \fBzfs rollback -r pool/home/anne@yesterday\fR
3477 .fi
3478 .in -2
3479 .sp
3480 
3481 .LP
3482 \fBExample 9 \fRCreating a ZFS Clone
3483 .sp
3484 .LP
3485 The following command creates a writable file system whose initial contents are
3486 the same as \fBpool/home/bob@yesterday\fR.
3487 
3488 .sp
3489 .in +2
3490 .nf
3491 # \fBzfs clone pool/home/bob@yesterday pool/clone\fR
3492 .fi
3493 .in -2
3494 .sp
3495 
3496 .LP
3497 \fBExample 10 \fRPromoting a ZFS Clone
3498 .sp
3499 .LP
3500 The following commands illustrate how to test out changes to a file system, and
3501 then replace the original file system with the changed one, using clones, clone
3502 promotion, and renaming:
3503 
3504 .sp
3505 .in +2
3506 .nf
3507 # \fBzfs create pool/project/production\fR
3508   populate /pool/project/production with data
3509 # \fBzfs snapshot pool/project/production@today\fR
3510 # \fBzfs clone pool/project/production@today pool/project/beta\fR
3511 make changes to /pool/project/beta and test them
3512 # \fBzfs promote pool/project/beta\fR
3513 # \fBzfs rename pool/project/production pool/project/legacy\fR
3514 # \fBzfs rename pool/project/beta pool/project/production\fR
3515 once the legacy version is no longer needed, it can be destroyed
3516 # \fBzfs destroy pool/project/legacy\fR
3517 .fi
3518 .in -2
3519 .sp
3520 
3521 .LP
3522 \fBExample 11 \fRInheriting ZFS Properties
3523 .sp
3524 .LP
3525 The following command causes \fBpool/home/bob\fR and \fBpool/home/anne\fR to
3526 inherit the \fBchecksum\fR property from their parent.
3527 
3528 .sp
3529 .in +2
3530 .nf
3531 # \fBzfs inherit checksum pool/home/bob pool/home/anne\fR
3532 .fi
3533 .in -2
3534 .sp
3535 
3536 .LP
3537 \fBExample 12 \fRRemotely Replicating ZFS Data
3538 .sp
3539 .LP
3540 The following commands send a full stream and then an incremental stream to a
3541 remote machine, restoring them into \fBpoolB/received/fs@a\fRand
3542 \fBpoolB/received/fs@b\fR, respectively. \fBpoolB\fR must contain the file
3543 system \fBpoolB/received\fR, and must not initially contain
3544 \fBpoolB/received/fs\fR.
3545 
3546 .sp
3547 .in +2
3548 .nf
3549 # \fBzfs send pool/fs@a | \e\fR
3550    \fBssh host zfs receive poolB/received/fs@a\fR
3551 # \fBzfs send -i a pool/fs@b | ssh host \e\fR
3552    \fBzfs receive poolB/received/fs\fR
3553 .fi
3554 .in -2
3555 .sp
3556 
3557 .LP
3558 \fBExample 13 \fRUsing the \fBzfs receive\fR \fB-d\fR Option
3559 .sp
3560 .LP
3561 The following command sends a full stream of \fBpoolA/fsA/fsB@snap\fR to a
3562 remote machine, receiving it into \fBpoolB/received/fsA/fsB@snap\fR. The
3563 \fBfsA/fsB@snap\fR portion of the received snapshot's name is determined from
3564 the name of the sent snapshot. \fBpoolB\fR must contain the file system
3565 \fBpoolB/received\fR. If \fBpoolB/received/fsA\fR does not exist, it is created
3566 as an empty file system.
3567 
3568 .sp
3569 .in +2
3570 .nf
3571 # \fBzfs send poolA/fsA/fsB@snap | \e
3572    ssh host zfs receive -d poolB/received\fR
3573 .fi
3574 .in -2
3575 .sp
3576 
3577 .LP
3578 \fBExample 14 \fRSetting User Properties
3579 .sp
3580 .LP
3581 The following example sets the user-defined \fBcom.example:department\fR
3582 property for a dataset.
3583 
3584 .sp
3585 .in +2
3586 .nf
3587 # \fBzfs set com.example:department=12345 tank/accounting\fR
3588 .fi
3589 .in -2
3590 .sp
3591 
3592 .LP
3593 \fBExample 15 \fRCreating a ZFS Volume as an iSCSI Target Device
3594 .sp
3595 .LP
3596 The following example shows how to create a \fBZFS\fR volume as an \fBiSCSI\fR
3597 target.
3598 
3599 .sp
3600 .in +2
3601 .nf
3602 # \fBzfs create -V 2g pool/volumes/vol1\fR
3603 # \fBzfs set shareiscsi=on pool/volumes/vol1\fR
3604 # \fBiscsitadm list target\fR
3605 Target: pool/volumes/vol1
3606  iSCSI Name:
3607  iqn.1986-03.com.sun:02:7b4b02a6-3277-eb1b-e686-a24762c52a8c
3608  Connections: 0
3609 .fi
3610 .in -2
3611 .sp
3612 
3613 .sp
3614 .LP
3615 After the \fBiSCSI\fR target is created, set up the \fBiSCSI\fR initiator. For
3616 more information about the Solaris \fBiSCSI\fR initiator, see
3617 \fBiscsitadm\fR(1M).
3618 .LP
3619 \fBExample 16 \fRPerforming a Rolling Snapshot
3620 .sp
3621 .LP
3622 The following example shows how to maintain a history of snapshots with a
3623 consistent naming scheme. To keep a week's worth of snapshots, the user
3624 destroys the oldest snapshot, renames the remaining snapshots, and then creates
3625 a new snapshot, as follows:
3626 
3627 .sp
3628 .in +2
3629 .nf
3630 # \fBzfs destroy -r pool/users@7daysago\fR
3631 # \fBzfs rename -r pool/users@6daysago @7daysago\fR
3632 # \fBzfs rename -r pool/users@5daysago @6daysago\fR
3633 # \fBzfs rename -r pool/users@yesterday @5daysago\fR
3634 # \fBzfs rename -r pool/users@yesterday @4daysago\fR
3635 # \fBzfs rename -r pool/users@yesterday @3daysago\fR
3636 # \fBzfs rename -r pool/users@yesterday @2daysago\fR
3637 # \fBzfs rename -r pool/users@today @yesterday\fR
3638 # \fBzfs snapshot -r pool/users@today\fR
3639 .fi
3640 .in -2
3641 .sp
3642 
3643 .LP
3644 \fBExample 17 \fRSetting \fBsharenfs\fR Property Options on a ZFS File System
3645 .sp
3646 .LP
3647 The following commands show how to set \fBsharenfs\fR property options to
3648 enable \fBrw\fR access for a set of \fBIP\fR addresses and to enable root
3649 access for system \fBneo\fR on the \fBtank/home\fR file system.
3650 
3651 .sp
3652 .in +2
3653 .nf
3654 # \fB# zfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home\fR
3655 .fi
3656 .in -2
3657 .sp
3658 
3659 .sp
3660 .LP
3661 If you are using \fBDNS\fR for host name resolution, specify the fully
3662 qualified hostname.
3663 
3664 .LP
3665 \fBExample 18 \fRDelegating ZFS Administration Permissions on a ZFS Dataset
3666 .sp
3667 .LP
3668 The following example shows how to set permissions so that user \fBcindys\fR
3669 can create, destroy, mount, and take snapshots on \fBtank/cindys\fR. The
3670 permissions on \fBtank/cindys\fR are also displayed.
3671 
3672 .sp
3673 .in +2
3674 .nf
3675 # \fBzfs allow cindys create,destroy,mount,snapshot tank/cindys\fR
3676 # \fBzfs allow tank/cindys\fR
3677 -------------------------------------------------------------
3678 Local+Descendent permissions on (tank/cindys)
3679           user cindys create,destroy,mount,snapshot
3680 -------------------------------------------------------------
3681 .fi
3682 .in -2
3683 .sp
3684 
3685 .sp
3686 .LP
3687 Because the \fBtank/cindys\fR mount point permission is set to 755 by default,
3688 user \fBcindys\fR will be unable to mount file systems under \fBtank/cindys\fR.
3689 Set an \fBACL\fR similar to the following syntax to provide mount point access:
3690 .sp
3691 .in +2
3692 .nf
3693 # \fBchmod A+user:cindys:add_subdirectory:allow /tank/cindys\fR
3694 .fi
3695 .in -2
3696 .sp
3697 
3698 .LP
3699 \fBExample 19 \fRDelegating Create Time Permissions on a ZFS Dataset
3700 .sp
3701 .LP
3702 The following example shows how to grant anyone in the group \fBstaff\fR to
3703 create file systems in \fBtank/users\fR. This syntax also allows staff members
3704 to destroy their own file systems, but not destroy anyone else's file system.
3705 The permissions on \fBtank/users\fR are also displayed.
3706 
3707 .sp
3708 .in +2
3709 .nf
3710 # \fB# zfs allow staff create,mount tank/users\fR
3711 # \fBzfs allow -c destroy tank/users\fR
3712 # \fBzfs allow tank/users\fR
3713 -------------------------------------------------------------
3714 Create time permissions on (tank/users)
3715           create,destroy
3716 Local+Descendent permissions on (tank/users)
3717           group staff create,mount
3718 -------------------------------------------------------------
3719 .fi
3720 .in -2
3721 .sp
3722 
3723 .LP
3724 \fBExample 20 \fRDefining and Granting a Permission Set on a ZFS Dataset
3725 .sp
3726 .LP
3727 The following example shows how to define and grant a permission set on the
3728 \fBtank/users\fR file system. The permissions on \fBtank/users\fR are also
3729 displayed.
3730 
3731 .sp
3732 .in +2
3733 .nf
3734 # \fBzfs allow -s @pset create,destroy,snapshot,mount tank/users\fR
3735 # \fBzfs allow staff @pset tank/users\fR
3736 # \fBzfs allow tank/users\fR
3737 -------------------------------------------------------------
3738 Permission sets on (tank/users)
3739         @pset create,destroy,mount,snapshot
3740 Create time permissions on (tank/users)
3741         create,destroy
3742 Local+Descendent permissions on (tank/users)
3743         group staff @pset,create,mount
3744 -------------------------------------------------------------
3745 .fi
3746 .in -2
3747 .sp
3748 
3749 .LP
3750 \fBExample 21 \fRDelegating Property Permissions on a ZFS Dataset
3751 .sp
3752 .LP
3753 The following example shows to grant the ability to set quotas and reservations
3754 on the \fBusers/home\fR file system. The permissions on \fBusers/home\fR are
3755 also displayed.
3756 
3757 .sp
3758 .in +2
3759 .nf
3760 # \fBzfs allow cindys quota,reservation users/home\fR
3761 # \fBzfs allow users/home\fR
3762 -------------------------------------------------------------
3763 Local+Descendent permissions on (users/home)
3764         user cindys quota,reservation
3765 -------------------------------------------------------------
3766 cindys% \fBzfs set quota=10G users/home/marks\fR
3767 cindys% \fBzfs get quota users/home/marks\fR
3768 NAME              PROPERTY  VALUE             SOURCE
3769 users/home/marks  quota     10G               local
3770 .fi
3771 .in -2
3772 .sp
3773 
3774 .LP
3775 \fBExample 22 \fRRemoving ZFS Delegated Permissions on a ZFS Dataset
3776 .sp
3777 .LP
3778 The following example shows how to remove the snapshot permission from the
3779 \fBstaff\fR group on the \fBtank/users\fR file system. The permissions on
3780 \fBtank/users\fR are also displayed.
3781 
3782 .sp
3783 .in +2
3784 .nf
3785 # \fBzfs unallow staff snapshot tank/users\fR
3786 # \fBzfs allow tank/users\fR
3787 -------------------------------------------------------------
3788 Permission sets on (tank/users)
3789         @pset create,destroy,mount,snapshot
3790 Create time permissions on (tank/users)
3791         create,destroy
3792 Local+Descendent permissions on (tank/users)
3793         group staff @pset,create,mount
3794 -------------------------------------------------------------
3795 .fi
3796 .in -2
3797 .sp
3798 
3799 .SH EXIT STATUS
3800 .sp
3801 .LP
3802 The following exit values are returned:
3803 .sp
3804 .ne 2
3805 .na
3806 \fB\fB0\fR\fR
3807 .ad
3808 .sp .6
3809 .RS 4n
3810 Successful completion.
3811 .RE
3812 
3813 .sp
3814 .ne 2
3815 .na
3816 \fB\fB1\fR\fR
3817 .ad
3818 .sp .6
3819 .RS 4n
3820 An error occurred.
3821 .RE
3822 
3823 .sp
3824 .ne 2
3825 .na
3826 \fB\fB2\fR\fR
3827 .ad
3828 .sp .6
3829 .RS 4n
3830 Invalid command line options were specified.
3831 .RE
3832 
3833 .SH ATTRIBUTES
3834 .sp
3835 .LP
3836 See \fBattributes\fR(5) for descriptions of the following attributes:
3837 .sp
3838 
3839 .sp
3840 .TS
3841 box;
3842 c | c
3843 l | l .
3844 ATTRIBUTE TYPE  ATTRIBUTE VALUE
3845 _
3846 Interface Stability     Committed
3847 .TE
3848 
3849 .SH SEE ALSO
3850 .sp
3851 .LP
3852 \fBssh\fR(1), \fBiscsitadm\fR(1M), \fBmount\fR(1M), \fBshare\fR(1M),
3853 \fBsharemgr\fR(1M), \fBunshare\fR(1M), \fBzonecfg\fR(1M), \fBzpool\fR(1M),
3854 \fBchmod\fR(2), \fBstat\fR(2), \fBwrite\fR(2), \fBfsync\fR(3C),
3855 \fBdfstab\fR(4), \fBattributes\fR(5)
3856 .sp
3857 .LP
3858 See the \fBgzip\fR(1) man page, which is not part of the SunOS man page
3859 collection.
3860 .sp
3861 .LP
3862 For information about using the \fBZFS\fR web-based management tool and other
3863 \fBZFS\fR features, see the \fISolaris ZFS Administration Guide\fR.