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