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