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 \fBfilesystem_limit\fR and \fBsnapshot_limit\fR properties of the delegated
406 dataset can only be set from the global zone.
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\fBdevices\fR=\fBon\fR | \fBoff\fR\fR
951 .ad
952 .sp .6
953 .RS 4n
954 Controls whether device nodes can be opened on this file system. The default
955 value is \fBon\fR.
956 .RE
957
958 .sp
959 .ne 2
960 .na
961 \fB\fBexec\fR=\fBon\fR | \fBoff\fR\fR
962 .ad
963 .sp .6
964 .RS 4n
965 Controls whether processes can be executed from within this file system. The
966 default value is \fBon\fR.
967 .RE
968
969 .sp
970 .ne 2
971 .na
972 \fB\fBfilesystem_limit\fR=\fIcount\fR | \fBnone\fR\fR
973 .ad
974 .sp .6
975 .RS 4n
976 Limits the number of filesystems and volumes that can exist at this point in
977 the dataset tree. The count of nested filesystems and volumes includes the
978 filesystem on which the limit is set, thus the minimum value is 1. The limit is
979 not enforced if the user is allowed to change the limit. Setting a
980 filesystem_limit on a descendent of a filesystem that already has a
981 filesystem_limit does not override the ancestor's filesystem_limit, but rather
982 imposes an additional limit. This feature must be enabled to be used
983 (see \fBzpool-features\fR(5)).
984 .RE
985 .sp
986 .ne 2
987 .na
988 \fB\fBmountpoint\fR=\fIpath\fR | \fBnone\fR | \fBlegacy\fR\fR
989 .ad
990 .sp .6
991 .RS 4n
992 Controls the mount point used for this file system. See the "Mount Points"
993 section for more information on how this property is used.
994 .sp
995 When the \fBmountpoint\fR property is changed for a file system, the file
996 system and any children that inherit the mount point are unmounted. If the new
997 value is \fBlegacy\fR, then they remain unmounted. Otherwise, they are
998 automatically remounted in the new location if the property was previously
999 \fBlegacy\fR or \fBnone\fR, or if they were mounted before the property was
1000 changed. In addition, any shared file systems are unshared and shared in the
1001 new location.
1002 .RE
1003
1004 .sp
1005 .ne 2
1006 .na
1007 \fB\fBnbmand\fR=\fBon\fR | \fBoff\fR\fR
1008 .ad
1009 .sp .6
1010 .RS 4n
1011 Controls whether the file system should be mounted with \fBnbmand\fR (Non
1012 Blocking mandatory locks). This is used for \fBCIFS\fR clients. Changes to this
1013 property only take effect when the file system is umounted and remounted. See
1014 \fBmount\fR(1M) for more information on \fBnbmand\fR mounts.
1015 .RE
1016
1017 .sp
1018 .ne 2
1019 .na
1020 \fB\fBprimarycache\fR=\fBall\fR | \fBnone\fR | \fBmetadata\fR\fR
1021 .ad
1022 .sp .6
1023 .RS 4n
1024 Controls what is cached in the primary cache (ARC). If this property is set to
1025 \fBall\fR, then both user data and metadata is cached. If this property is set
1026 to \fBnone\fR, then neither user data nor metadata is cached. If this property
1027 is set to \fBmetadata\fR, then only metadata is cached. The default value is
1028 \fBall\fR.
1029 .RE
1030
1031 .sp
1032 .ne 2
1033 .na
1034 \fB\fBquota\fR=\fIsize\fR | \fBnone\fR\fR
1035 .ad
1036 .sp .6
1037 .RS 4n
1038 Limits the amount of space a dataset and its descendents can consume. This
1039 property enforces a hard limit on the amount of space used. This includes all
1040 space consumed by descendents, including file systems and snapshots. Setting a
1041 quota on a descendent of a dataset that already has a quota does not override
1042 the ancestor's quota, but rather imposes an additional limit.
1043 .sp
1044 Quotas cannot be set on volumes, as the \fBvolsize\fR property acts as an
1045 implicit quota.
1046 .RE
1047
1048 .sp
1049 .ne 2
1050 .na
1051 \fB\fBsnapshot_limit\fR=\fIcount\fR | \fBnone\fR\fR
1052 .ad
1053 .sp .6
1054 .RS 4n
1055 Limits the number of snapshots that can be created on a dataset and its
1056 descendents. Setting a snapshot_limit on a descendent of a dataset that already
1057 has a snapshot_limit does not override the ancestor's snapshot_limit, but
1058 rather imposes an additional limit. The limit is not enforced if the user is
1059 allowed to change the limit. This means that recursive snapshots taken from the
1060 global zone are counted against each delegated dataset. This feature must be
1061 enabled to be used (see \fBzpool-features\fR(5)).
1062 .RE
1063
1064 .sp
1065 .ne 2
1066 .na
1067 \fB\fBuserquota@\fR\fIuser\fR=\fIsize\fR | \fBnone\fR\fR
1068 .ad
1069 .sp .6
1070 .RS 4n
1071 Limits the amount of space consumed by the specified user. User space
1072 consumption is identified by the \fBuserspace@\fR\fIuser\fR property.
1073 .sp
1074 Enforcement of user quotas may be delayed by several seconds. This delay means
1075 that a user might exceed their quota before the system notices that they are
1076 over quota and begins to refuse additional writes with the \fBEDQUOT\fR error
1077 message . See the \fBzfs userspace\fR subcommand for more information.
1078 .sp
1079 Unprivileged users can only access their own groups' space usage. The root
1080 user, or a user who has been granted the \fBuserquota\fR privilege with \fBzfs
1081 allow\fR, can get and set everyone's quota.
1082 .sp
1083 This property is not available on volumes, on file systems before version 4, or
1084 on pools before version 15. The \fBuserquota@\fR... properties are not
1085 displayed by \fBzfs get all\fR. The user's name must be appended after the
1086 \fB@\fR symbol, using one of the following forms:
1087 .RS +4
1088 .TP
1089 .ie t \(bu
1090 .el o
1091 \fIPOSIX name\fR (for example, \fBjoe\fR)
1092 .RE
1093 .RS +4
1094 .TP
1095 .ie t \(bu
1096 .el o
1097 \fIPOSIX numeric ID\fR (for example, \fB789\fR)
1098 .RE
1099 .RS +4
1100 .TP
1101 .ie t \(bu
1102 .el o
1103 \fISID name\fR (for example, \fBjoe.smith@mydomain\fR)
1104 .RE
1105 .RS +4
1106 .TP
1107 .ie t \(bu
1108 .el o
1109 \fISID numeric ID\fR (for example, \fBS-1-123-456-789\fR)
1110 .RE
1111 .RE
1112
1113 .sp
1114 .ne 2
1115 .na
1116 \fB\fBgroupquota@\fR\fIgroup\fR=\fIsize\fR | \fBnone\fR\fR
1117 .ad
1118 .sp .6
1119 .RS 4n
1120 Limits the amount of space consumed by the specified group. Group space
1121 consumption is identified by the \fBuserquota@\fR\fIuser\fR property.
1122 .sp
1123 Unprivileged users can access only their own groups' space usage. The root
1124 user, or a user who has been granted the \fBgroupquota\fR privilege with \fBzfs
1125 allow\fR, can get and set all groups' quotas.
1126 .RE
1127
1128 .sp
1129 .ne 2
1130 .na
1131 \fB\fBreadonly\fR=\fBon\fR | \fBoff\fR\fR
1132 .ad
1133 .sp .6
1134 .RS 4n
1135 Controls whether this dataset can be modified. The default value is \fBoff\fR.
1136 .sp
1137 This property can also be referred to by its shortened column name,
1138 \fBrdonly\fR.
1139 .RE
1140
1141 .sp
1142 .ne 2
1143 .na
1144 \fB\fBrecordsize\fR=\fIsize\fR\fR
1145 .ad
1146 .sp .6
1147 .RS 4n
1148 Specifies a suggested block size for files in the file system. This property is
1149 designed solely for use with database workloads that access files in fixed-size
1150 records. \fBZFS\fR automatically tunes block sizes according to internal
1151 algorithms optimized for typical access patterns.
1152 .sp
1153 For databases that create very large files but access them in small random
1154 chunks, these algorithms may be suboptimal. Specifying a \fBrecordsize\fR
1155 greater than or equal to the record size of the database can result in
1156 significant performance gains. Use of this property for general purpose file
1157 systems is strongly discouraged, and may adversely affect performance.
1158 .sp
1159 The size specified must be a power of two greater than or equal to 512 and less
1160 than or equal to 128 Kbytes.
1161 .sp
1162 Changing the file system's \fBrecordsize\fR affects only files created
1163 afterward; existing files are unaffected.
1164 .sp
1165 This property can also be referred to by its shortened column name,
1166 \fBrecsize\fR.
1167 .RE
1168
1169 .sp
1170 .ne 2
1171 .na
1172 \fB\fBrefquota\fR=\fIsize\fR | \fBnone\fR\fR
1173 .ad
1174 .sp .6
1175 .RS 4n
1176 Limits the amount of space a dataset can consume. This property enforces a hard
1177 limit on the amount of space used. This hard limit does not include space used
1178 by descendents, including file systems and snapshots.
1179 .RE
1180
1181 .sp
1182 .ne 2
1183 .na
1184 \fB\fBrefreservation\fR=\fIsize\fR | \fBnone\fR\fR
1185 .ad
1186 .sp .6
1187 .RS 4n
1188 The minimum amount of space guaranteed to a dataset, not including its
1189 descendents. When the amount of space used is below this value, the dataset is
1190 treated as if it were taking up the amount of space specified by
1191 \fBrefreservation\fR. The \fBrefreservation\fR reservation is accounted for in
1192 the parent datasets' space used, and counts against the parent datasets' quotas
1193 and reservations.
1194 .sp
1195 If \fBrefreservation\fR is set, a snapshot is only allowed if there is enough
1196 free pool space outside of this reservation to accommodate the current number
1197 of "referenced" bytes in the dataset.
1198 .sp
1199 This property can also be referred to by its shortened column name,
1200 \fBrefreserv\fR.
1201 .RE
1202
1203 .sp
1204 .ne 2
1205 .na
1206 \fB\fBreservation\fR=\fIsize\fR | \fBnone\fR\fR
1207 .ad
1208 .sp .6
1209 .RS 4n
1210 The minimum amount of space guaranteed to a dataset and its descendents. When
1211 the amount of space used is below this value, the dataset is treated as if it
1212 were taking up the amount of space specified by its reservation. Reservations
1213 are accounted for in the parent datasets' space used, and count against the
1214 parent datasets' quotas and reservations.
1215 .sp
1216 This property can also be referred to by its shortened column name,
1217 \fBreserv\fR.
1218 .RE
1219
1220 .sp
1221 .ne 2
1222 .na
1223 \fB\fBsecondarycache\fR=\fBall\fR | \fBnone\fR | \fBmetadata\fR\fR
1224 .ad
1225 .sp .6
1226 .RS 4n
1227 Controls what is cached in the secondary cache (L2ARC). If this property is set
1228 to \fBall\fR, then both user data and metadata is cached. If this property is
1229 set to \fBnone\fR, then neither user data nor metadata is cached. If this
1230 property is set to \fBmetadata\fR, then only metadata is cached. The default
1231 value is \fBall\fR.
1232 .RE
1233
1234 .sp
1235 .ne 2
1236 .na
1237 \fB\fBsetuid\fR=\fBon\fR | \fBoff\fR\fR
1238 .ad
1239 .sp .6
1240 .RS 4n
1241 Controls whether the set-\fBUID\fR bit is respected for the file system. The
1242 default value is \fBon\fR.
1243 .RE
1244
1245 .sp
1246 .ne 2
1247 .na
1248 \fB\fBshareiscsi\fR=\fBon\fR | \fBoff\fR\fR
1249 .ad
1250 .sp .6
1251 .RS 4n
1252 Like the \fBsharenfs\fR property, \fBshareiscsi\fR indicates whether a
1253 \fBZFS\fR volume is exported as an \fBiSCSI\fR target. The acceptable values
1254 for this property are \fBon\fR, \fBoff\fR, and \fBtype=disk\fR. The default
1255 value is \fBoff\fR. In the future, other target types might be supported. For
1256 example, \fBtape\fR.
1257 .sp
1258 You might want to set \fBshareiscsi=on\fR for a file system so that all
1259 \fBZFS\fR volumes within the file system are shared by default. However,
1260 setting this property on a file system has no direct effect.
1261 .RE
1262
1263 .sp
1264 .ne 2
1265 .na
1266 \fB\fBsharesmb\fR=\fBon\fR | \fBoff\fR | \fIopts\fR\fR
1267 .ad
1268 .sp .6
1269 .RS 4n
1270 Controls whether the file system is shared by using the Solaris \fBCIFS\fR
1271 service, and what options are to be used. A file system with the \fBsharesmb\fR
1272 property set to \fBoff\fR is managed through traditional tools such as
1273 \fBsharemgr\fR(1M). Otherwise, the file system is automatically shared and
1274 unshared with the \fBzfs share\fR and \fBzfs unshare\fR commands. If the
1275 property is set to \fBon\fR, the \fBsharemgr\fR(1M) command is invoked with no
1276 options. Otherwise, the \fBsharemgr\fR(1M) command is invoked with options
1277 equivalent to the contents of this property.
1278 .sp
1279 Because \fBSMB\fR shares requires a resource name, a unique resource name is
1280 constructed from the dataset name. The constructed name is a copy of the
1281 dataset name except that the characters in the dataset name, which would be
1282 illegal in the resource name, are replaced with underscore (\fB_\fR)
1283 characters. A pseudo property "name" is also supported that allows you to
1284 replace the data set name with a specified name. The specified name is then
1285 used to replace the prefix dataset in the case of inheritance. For example, if
1286 the dataset \fBdata/home/john\fR is set to \fBname=john\fR, then
1287 \fBdata/home/john\fR has a resource name of \fBjohn\fR. If a child dataset of
1288 \fBdata/home/john/backups\fR, it has a resource name of \fBjohn_backups\fR.
1289 .sp
1290 When SMB shares are created, the SMB share name appears as an entry in the
1291 \fB\&.zfs/shares\fR directory. You can use the \fBls\fR or \fBchmod\fR command
1292 to display the share-level ACLs on the entries in this directory.
1293 .sp
1294 When the \fBsharesmb\fR property is changed for a dataset, the dataset and any
1295 children inheriting the property are re-shared with the new options, only if
1296 the property was previously set to \fBoff\fR, or if they were shared before the
1297 property was changed. If the new property is set to \fBoff\fR, the file systems
1298 are unshared.
1299 .RE
1300
1301 .sp
1302 .ne 2
1303 .na
1304 \fB\fBsharenfs\fR=\fBon\fR | \fBoff\fR | \fIopts\fR\fR
1305 .ad
1306 .sp .6
1307 .RS 4n
1308 Controls whether the file system is shared via \fBNFS\fR, and what options are
1309 used. A file system with a \fBsharenfs\fR property of \fBoff\fR is managed
1310 through traditional tools such as \fBshare\fR(1M), \fBunshare\fR(1M), and
1311 \fBdfstab\fR(4). Otherwise, the file system is automatically shared and
1312 unshared with the \fBzfs share\fR and \fBzfs unshare\fR commands. If the
1313 property is set to \fBon\fR, the \fBshare\fR(1M) command is invoked with no
1314 options. Otherwise, the \fBshare\fR(1M) command is invoked with options
1315 equivalent to the contents of this property.
1316 .sp
1317 When the \fBsharenfs\fR property is changed for a dataset, the dataset and any
1318 children inheriting the property are re-shared with the new options, only if
1319 the property was previously \fBoff\fR, or if they were shared before the
1320 property was changed. If the new property is \fBoff\fR, the file systems are
1321 unshared.
1322 .RE
1323
1324 .sp
1325 .ne 2
1326 .na
1327 \fB\fBlogbias\fR = \fBlatency\fR | \fBthroughput\fR\fR
1328 .ad
1329 .sp .6
1330 .RS 4n
1331 Provide a hint to ZFS about handling of synchronous requests in this dataset.
1332 If \fBlogbias\fR is set to \fBlatency\fR (the default), ZFS will use pool log
1333 devices (if configured) to handle the requests at low latency. If \fBlogbias\fR
1334 is set to \fBthroughput\fR, ZFS will not use configured pool log devices. ZFS
1335 will instead optimize synchronous operations for global pool throughput and
1336 efficient use of resources.
1337 .RE
1338
1339 .sp
1340 .ne 2
1341 .na
1342 \fB\fBsnapdir\fR=\fBhidden\fR | \fBvisible\fR\fR
1343 .ad
1344 .sp .6
1345 .RS 4n
1346 Controls whether the \fB\&.zfs\fR directory is hidden or visible in the root of
1347 the file system as discussed in the "Snapshots" section. The default value is
1348 \fBhidden\fR.
1349 .RE
1350
1351 .sp
1352 .ne 2
1353 .na
1354 \fB\fBsync\fR=\fBdefault\fR | \fBalways\fR | \fBdisabled\fR\fR
1355 .ad
1356 .sp .6
1357 .RS 4n
1358 Controls the behavior of synchronous requests (e.g. fsync, O_DSYNC).
1359 \fBdefault\fR is the POSIX specified behavior of ensuring all synchronous
1360 requests are written to stable storage and all devices are flushed to ensure
1361 data is not cached by device controllers (this is the default). \fBalways\fR
1362 causes every file system transaction to be written and flushed before its
1363 system call returns. This has a large performance penalty. \fBdisabled\fR
1364 disables synchronous requests. File system transactions are only committed to
1365 stable storage periodically. This option will give the highest performance.
1366 However, it is very dangerous as ZFS would be ignoring the synchronous
1367 transaction demands of applications such as databases or NFS. Administrators
1368 should only use this option when the risks are understood.
1369 .RE
1370
1371 .sp
1372 .ne 2
1373 .na
1374 \fB\fBversion\fR=\fB1\fR | \fB2\fR | \fBcurrent\fR\fR
1375 .ad
1376 .sp .6
1377 .RS 4n
1378 The on-disk version of this file system, which is independent of the pool
1379 version. This property can only be set to later supported versions. See the
1380 \fBzfs upgrade\fR command.
1381 .RE
1382
1383 .sp
1384 .ne 2
1385 .na
1386 \fB\fBvolsize\fR=\fIsize\fR\fR
1387 .ad
1388 .sp .6
1389 .RS 4n
1390 For volumes, specifies the logical size of the volume. By default, creating a
1391 volume establishes a reservation of equal size. For storage pools with a
1392 version number of 9 or higher, a \fBrefreservation\fR is set instead. Any
1393 changes to \fBvolsize\fR are reflected in an equivalent change to the
1394 reservation (or \fBrefreservation\fR). The \fBvolsize\fR can only be set to a
1395 multiple of \fBvolblocksize\fR, and cannot be zero.
1396 .sp
1397 The reservation is kept equal to the volume's logical size to prevent
1398 unexpected behavior for consumers. Without the reservation, the volume could
1399 run out of space, resulting in undefined behavior or data corruption, depending
1400 on how the volume is used. These effects can also occur when the volume size is
1401 changed while it is in use (particularly when shrinking the size). Extreme care
1402 should be used when adjusting the volume size.
1403 .sp
1404 Though not recommended, a "sparse volume" (also known as "thin provisioning")
1405 can be created by specifying the \fB-s\fR option to the \fBzfs create -V\fR
1406 command, or by changing the reservation after the volume has been created. A
1407 "sparse volume" is a volume where the reservation is less then the volume size.
1408 Consequently, writes to a sparse volume can fail with \fBENOSPC\fR when the
1409 pool is low on space. For a sparse volume, changes to \fBvolsize\fR are not
1410 reflected in the reservation.
1411 .RE
1412
1413 .sp
1414 .ne 2
1415 .na
1416 \fB\fBvscan\fR=\fBon\fR | \fBoff\fR\fR
1417 .ad
1418 .sp .6
1419 .RS 4n
1420 Controls whether regular files should be scanned for viruses when a file is
1421 opened and closed. In addition to enabling this property, the virus scan
1422 service must also be enabled for virus scanning to occur. The default value is
1423 \fBoff\fR.
1424 .RE
1425
1426 .sp
1427 .ne 2
1428 .na
1429 \fB\fBxattr\fR=\fBon\fR | \fBoff\fR\fR
1430 .ad
1431 .sp .6
1432 .RS 4n
1433 Controls whether extended attributes are enabled for this file system. The
1434 default value is \fBon\fR.
1435 .RE
1436
1437 .sp
1438 .ne 2
1439 .na
1440 \fB\fBzoned\fR=\fBon\fR | \fBoff\fR\fR
1441 .ad
1442 .sp .6
1443 .RS 4n
1444 Controls whether the dataset is managed from a non-global zone. See the "Zones"
1445 section for more information. The default value is \fBoff\fR.
1446 .RE
1447
1448 .sp
1449 .LP
1450 The following three properties cannot be changed after the file system is
1451 created, and therefore, should be set when the file system is created. If the
1452 properties are not set with the \fBzfs create\fR or \fBzpool create\fR
1453 commands, these properties are inherited from the parent dataset. If the parent
1454 dataset lacks these properties due to having been created prior to these
1455 features being supported, the new file system will have the default values for
1456 these properties.
1457 .sp
1458 .ne 2
1459 .na
1460 \fB\fBcasesensitivity\fR=\fBsensitive\fR | \fBinsensitive\fR | \fBmixed\fR\fR
1461 .ad
1462 .sp .6
1463 .RS 4n
1464 Indicates whether the file name matching algorithm used by the file system
1465 should be case-sensitive, case-insensitive, or allow a combination of both
1466 styles of matching. The default value for the \fBcasesensitivity\fR property is
1467 \fBsensitive\fR. Traditionally, UNIX and POSIX file systems have case-sensitive
1468 file names.
1469 .sp
1470 The \fBmixed\fR value for the \fBcasesensitivity\fR property indicates that the
1471 file system can support requests for both case-sensitive and case-insensitive
1472 matching behavior. Currently, case-insensitive matching behavior on a file
1473 system that supports mixed behavior is limited to the Solaris CIFS server
1474 product. For more information about the \fBmixed\fR value behavior, see the
1475 \fISolaris ZFS Administration Guide\fR.
1476 .RE
1477
1478 .sp
1479 .ne 2
1480 .na
1481 \fB\fBnormalization\fR = \fBnone\fR | \fBformC\fR | \fBformD\fR | \fBformKC\fR
1482 | \fBformKD\fR\fR
1483 .ad
1484 .sp .6
1485 .RS 4n
1486 Indicates whether the file system should perform a \fBunicode\fR normalization
1487 of file names whenever two file names are compared, and which normalization
1488 algorithm should be used. File names are always stored unmodified, names are
1489 normalized as part of any comparison process. If this property is set to a
1490 legal value other than \fBnone\fR, and the \fButf8only\fR property was left
1491 unspecified, the \fButf8only\fR property is automatically set to \fBon\fR. The
1492 default value of the \fBnormalization\fR property is \fBnone\fR. This property
1493 cannot be changed after the file system is created.
1494 .RE
1495
1496 .sp
1497 .ne 2
1498 .na
1499 \fB\fButf8only\fR=\fBon\fR | \fBoff\fR\fR
1500 .ad
1501 .sp .6
1502 .RS 4n
1503 Indicates whether the file system should reject file names that include
1504 characters that are not present in the \fBUTF-8\fR character code set. If this
1505 property is explicitly set to \fBoff\fR, the normalization property must either
1506 not be explicitly set or be set to \fBnone\fR. The default value for the
1507 \fButf8only\fR property is \fBoff\fR. This property cannot be changed after the
1508 file system is created.
1509 .RE
1510
1511 .sp
1512 .LP
1513 The \fBcasesensitivity\fR, \fBnormalization\fR, and \fButf8only\fR properties
1514 are also new permissions that can be assigned to non-privileged users by using
1515 the \fBZFS\fR delegated administration feature.
1516 .SS "Temporary Mount Point Properties"
1517 .sp
1518 .LP
1519 When a file system is mounted, either through \fBmount\fR(1M) for legacy mounts
1520 or the \fBzfs mount\fR command for normal file systems, its mount options are
1521 set according to its properties. The correlation between properties and mount
1522 options is as follows:
1523 .sp
1524 .in +2
1525 .nf
1526 PROPERTY MOUNT OPTION
1527 devices devices/nodevices
1528 exec exec/noexec
1529 readonly ro/rw
1530 setuid setuid/nosetuid
1531 xattr xattr/noxattr
1532 .fi
1533 .in -2
1534 .sp
1535
1536 .sp
1537 .LP
1538 In addition, these options can be set on a per-mount basis using the \fB-o\fR
1539 option, without affecting the property that is stored on disk. The values
1540 specified on the command line override the values stored in the dataset. The
1541 \fB-nosuid\fR option is an alias for \fBnodevices,nosetuid\fR. These properties
1542 are reported as "temporary" by the \fBzfs get\fR command. If the properties are
1543 changed while the dataset is mounted, the new setting overrides any temporary
1544 settings.
1545 .SS "User Properties"
1546 .sp
1547 .LP
1548 In addition to the standard native properties, \fBZFS\fR supports arbitrary
1549 user properties. User properties have no effect on \fBZFS\fR behavior, but
1550 applications or administrators can use them to annotate datasets (file systems,
1551 volumes, and snapshots).
1552 .sp
1553 .LP
1554 User property names must contain a colon (\fB:\fR) character to distinguish
1555 them from native properties. They may contain lowercase letters, numbers, and
1556 the following punctuation characters: colon (\fB:\fR), dash (\fB-\fR), period
1557 (\fB\&.\fR), and underscore (\fB_\fR). The expected convention is that the
1558 property name is divided into two portions such as
1559 \fImodule\fR\fB:\fR\fIproperty\fR, but this namespace is not enforced by
1560 \fBZFS\fR. User property names can be at most 256 characters, and cannot begin
1561 with a dash (\fB-\fR).
1562 .sp
1563 .LP
1564 When making programmatic use of user properties, it is strongly suggested to
1565 use a reversed \fBDNS\fR domain name for the \fImodule\fR component of property
1566 names to reduce the chance that two independently-developed packages use the
1567 same property name for different purposes. Property names beginning with
1568 \fBcom.sun\fR. are reserved for use by Sun Microsystems.
1569 .sp
1570 .LP
1571 The values of user properties are arbitrary strings, are always inherited, and
1572 are never validated. All of the commands that operate on properties (\fBzfs
1573 list\fR, \fBzfs get\fR, \fBzfs set\fR, and so forth) can be used to manipulate
1574 both native properties and user properties. Use the \fBzfs inherit\fR command
1575 to clear a user property . If the property is not defined in any parent
1576 dataset, it is removed entirely. Property values are limited to 1024
1577 characters.
1578 .SS "ZFS Volumes as Swap or Dump Devices"
1579 .sp
1580 .LP
1581 During an initial installation a swap device and dump device are created on
1582 \fBZFS\fR volumes in the \fBZFS\fR root pool. By default, the swap area size is
1583 based on 1/2 the size of physical memory up to 2 Gbytes. The size of the dump
1584 device depends on the kernel's requirements at installation time. Separate
1585 \fBZFS\fR volumes must be used for the swap area and dump devices. Do not swap
1586 to a file on a \fBZFS\fR file system. A \fBZFS\fR swap file configuration is
1587 not supported.
1588 .sp
1589 .LP
1590 If you need to change your swap area or dump device after the system is
1591 installed or upgraded, use the \fBswap\fR(1M) and \fBdumpadm\fR(1M) commands.
1592 If you need to change the size of your swap area or dump device, see the
1593 \fISolaris ZFS Administration Guide\fR.
1594 .SH SUBCOMMANDS
1595 .sp
1596 .LP
1597 All subcommands that modify state are logged persistently to the pool in their
1598 original form.
1599 .sp
1600 .ne 2
1601 .na
1602 \fB\fBzfs ?\fR\fR
1603 .ad
1604 .sp .6
1605 .RS 4n
1606 Displays a help message.
1607 .RE
1608
1609 .sp
1610 .ne 2
1611 .na
1612 \fB\fBzfs create\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ...
1613 \fIfilesystem\fR\fR
1614 .ad
1615 .sp .6
1616 .RS 4n
1617 Creates a new \fBZFS\fR file system. The file system is automatically mounted
1618 according to the \fBmountpoint\fR property inherited from the parent.
1619 .sp
1620 .ne 2
1621 .na
1622 \fB\fB-p\fR\fR
1623 .ad
1624 .sp .6
1625 .RS 4n
1626 Creates all the non-existing parent datasets. Datasets created in this manner
1627 are automatically mounted according to the \fBmountpoint\fR property inherited
1628 from their parent. Any property specified on the command line using the
1629 \fB-o\fR option is ignored. If the target filesystem already exists, the
1630 operation completes successfully.
1631 .RE
1632
1633 .sp
1634 .ne 2
1635 .na
1636 \fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
1637 .ad
1638 .sp .6
1639 .RS 4n
1640 Sets the specified property as if the command \fBzfs set\fR
1641 \fIproperty\fR=\fIvalue\fR was invoked at the same time the dataset was
1642 created. Any editable \fBZFS\fR property can also be set at creation time.
1643 Multiple \fB-o\fR options can be specified. An error results if the same
1644 property is specified in multiple \fB-o\fR options.
1645 .RE
1646
1647 .RE
1648
1649 .sp
1650 .ne 2
1651 .na
1652 \fB\fBzfs create\fR [\fB-ps\fR] [\fB-b\fR \fIblocksize\fR] [\fB-o\fR
1653 \fIproperty\fR=\fIvalue\fR] ... \fB-V\fR \fIsize\fR \fIvolume\fR\fR
1654 .ad
1655 .sp .6
1656 .RS 4n
1657 Creates a volume of the given size. The volume is exported as a block device in
1658 \fB/dev/zvol/{dsk,rdsk}/\fR\fIpath\fR, where \fIpath\fR is the name of the
1659 volume in the \fBZFS\fR namespace. The size represents the logical size as
1660 exported by the device. By default, a reservation of equal size is created.
1661 .sp
1662 \fIsize\fR is automatically rounded up to the nearest 128 Kbytes to ensure that
1663 the volume has an integral number of blocks regardless of \fIblocksize\fR.
1664 .sp
1665 .ne 2
1666 .na
1667 \fB\fB-p\fR\fR
1668 .ad
1669 .sp .6
1670 .RS 4n
1671 Creates all the non-existing parent datasets. Datasets created in this manner
1672 are automatically mounted according to the \fBmountpoint\fR property inherited
1673 from their parent. Any property specified on the command line using the
1674 \fB-o\fR option is ignored. If the target filesystem already exists, the
1675 operation completes successfully.
1676 .RE
1677
1678 .sp
1679 .ne 2
1680 .na
1681 \fB\fB-s\fR\fR
1682 .ad
1683 .sp .6
1684 .RS 4n
1685 Creates a sparse volume with no reservation. See \fBvolsize\fR in the Native
1686 Properties section for more information about sparse volumes.
1687 .RE
1688
1689 .sp
1690 .ne 2
1691 .na
1692 \fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
1693 .ad
1694 .sp .6
1695 .RS 4n
1696 Sets the specified property as if the \fBzfs set\fR \fIproperty\fR=\fIvalue\fR
1697 command was invoked at the same time the dataset was created. Any editable
1698 \fBZFS\fR property can also be set at creation time. Multiple \fB-o\fR options
1699 can be specified. An error results if the same property is specified in
1700 multiple \fB-o\fR options.
1701 .RE
1702
1703 .sp
1704 .ne 2
1705 .na
1706 \fB\fB-b\fR \fIblocksize\fR\fR
1707 .ad
1708 .sp .6
1709 .RS 4n
1710 Equivalent to \fB-o\fR \fBvolblocksize\fR=\fIblocksize\fR. If this option is
1711 specified in conjunction with \fB-o\fR \fBvolblocksize\fR, the resulting
1712 behavior is undefined.
1713 .RE
1714
1715 .RE
1716
1717 .sp
1718 .ne 2
1719 .na
1720 \fBzfs destroy\fR [\fB-fnpRrv\fR] \fIfilesystem\fR|\fIvolume\fR
1721 .ad
1722 .sp .6
1723 .RS 4n
1724 Destroys the given dataset. By default, the command unshares any file systems
1725 that are currently shared, unmounts any file systems that are currently
1726 mounted, and refuses to destroy a dataset that has active dependents (children
1727 or clones).
1728 .sp
1729 .ne 2
1730 .na
1731 \fB\fB-r\fR\fR
1732 .ad
1733 .sp .6
1734 .RS 4n
1735 Recursively destroy all children.
1736 .RE
1737
1738 .sp
1739 .ne 2
1740 .na
1741 \fB\fB-R\fR\fR
1742 .ad
1743 .sp .6
1744 .RS 4n
1745 Recursively destroy all dependents, including cloned file systems outside the
1746 target hierarchy.
1747 .RE
1748
1749 .sp
1750 .ne 2
1751 .na
1752 \fB\fB-f\fR\fR
1753 .ad
1754 .sp .6
1755 .RS 4n
1756 Force an unmount of any file systems using the \fBunmount -f\fR command. This
1757 option has no effect on non-file systems or unmounted file systems.
1758 .RE
1759
1760 .sp
1761 .ne 2
1762 .na
1763 \fB\fB-n\fR\fR
1764 .ad
1765 .sp .6
1766 .RS 4n
1767 Do a dry-run ("No-op") deletion. No data will be deleted. This is
1768 useful in conjunction with the \fB-v\fR or \fB-p\fR flags to determine what
1769 data would be deleted.
1770 .RE
1771
1772 .sp
1773 .ne 2
1774 .na
1775 \fB\fB-p\fR\fR
1776 .ad
1777 .sp .6
1778 .RS 4n
1779 Print machine-parsable verbose information about the deleted data.
1780 .RE
1781
1782 .sp
1783 .ne 2
1784 .na
1785 \fB\fB-v\fR\fR
1786 .ad
1787 .sp .6
1788 .RS 4n
1789 Print verbose information about the deleted data.
1790 .RE
1791 .sp
1792 Extreme care should be taken when applying either the \fB-r\fR or the \fB-R\fR
1793 options, as they can destroy large portions of a pool and cause unexpected
1794 behavior for mounted file systems in use.
1795 .RE
1796
1797 .sp
1798 .ne 2
1799 .na
1800 \fBzfs destroy\fR [\fB-dnpRrv\fR] \fIfilesystem\fR|\fIvolume\fR@\fIsnap\fR[%\fIsnap\fR][,...]
1801 .ad
1802 .sp .6
1803 .RS 4n
1804 The given snapshots are destroyed immediately if and only if the \fBzfs
1805 destroy\fR command without the \fB-d\fR option would have destroyed it. Such
1806 immediate destruction would occur, for example, if the snapshot had no clones
1807 and the user-initiated reference count were zero.
1808 .sp
1809 If a snapshot does not qualify for immediate destruction, it is marked for
1810 deferred deletion. In this state, it exists as a usable, visible snapshot until
1811 both of the preconditions listed above are met, at which point it is destroyed.
1812 .sp
1813 An inclusive range of snapshots may be specified by separating the
1814 first and last snapshots with a percent sign.
1815 The first and/or last snapshots may be left blank, in which case the
1816 filesystem's oldest or newest snapshot will be implied.
1817 .sp
1818 Multiple snapshots
1819 (or ranges of snapshots) of the same filesystem or volume may be specified
1820 in a comma-separated list of snapshots.
1821 Only the snapshot's short name (the
1822 part after the \fB@\fR) should be specified when using a range or
1823 comma-separated list to identify multiple snapshots.
1824 .sp
1825 .ne 2
1826 .na
1827 \fB\fB-d\fR\fR
1828 .ad
1829 .sp .6
1830 .RS 4n
1831 Defer snapshot deletion.
1832 .RE
1833
1834 .sp
1835 .ne 2
1836 .na
1837 \fB\fB-r\fR\fR
1838 .ad
1839 .sp .6
1840 .RS 4n
1841 Destroy (or mark for deferred deletion) all snapshots with this name in
1842 descendent file systems.
1843 .RE
1844
1845 .sp
1846 .ne 2
1847 .na
1848 \fB\fB-R\fR\fR
1849 .ad
1850 .sp .6
1851 .RS 4n
1852 Recursively destroy all dependents.
1853 .RE
1854
1855 .sp
1856 .ne 2
1857 .na
1858 \fB\fB-n\fR\fR
1859 .ad
1860 .sp .6
1861 .RS 4n
1862 Do a dry-run ("No-op") deletion. No data will be deleted. This is
1863 useful in conjunction with the \fB-v\fR or \fB-p\fR flags to determine what
1864 data would be deleted.
1865 .RE
1866
1867 .sp
1868 .ne 2
1869 .na
1870 \fB\fB-p\fR\fR
1871 .ad
1872 .sp .6
1873 .RS 4n
1874 Print machine-parsable verbose information about the deleted data.
1875 .RE
1876
1877 .sp
1878 .ne 2
1879 .na
1880 \fB\fB-v\fR\fR
1881 .ad
1882 .sp .6
1883 .RS 4n
1884 Print verbose information about the deleted data.
1885 .RE
1886
1887 .sp
1888 Extreme care should be taken when applying either the \fB-r\fR or the \fB-f\fR
1889 options, as they can destroy large portions of a pool and cause unexpected
1890 behavior for mounted file systems in use.
1891 .RE
1892
1893 .sp
1894 .ne 2
1895 .na
1896 \fB\fBzfs snapshot\fR [\fB-r\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ...
1897 \fIfilesystem@snapname\fR|\fIvolume@snapname\fR\fR...
1898 .ad
1899 .sp .6
1900 .RS 4n
1901 Creates snapshots with the given names. All previous modifications by
1902 successful system calls to the file system are part of the snapshots.
1903 Snapshots are taken atomically, so that all snapshots correspond to the same
1904 moment in time. See the "Snapshots" section for details.
1905 .sp
1906 .ne 2
1907 .na
1908 \fB\fB-r\fR\fR
1909 .ad
1910 .sp .6
1911 .RS 4n
1912 Recursively create snapshots of all descendent datasets
1913 .RE
1914
1915 .sp
1916 .ne 2
1917 .na
1918 \fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
1919 .ad
1920 .sp .6
1921 .RS 4n
1922 Sets the specified property; see \fBzfs create\fR for details.
1923 .RE
1924
1925 .RE
1926
1927 .sp
1928 .ne 2
1929 .na
1930 \fB\fBzfs rollback\fR [\fB-rRf\fR] \fIsnapshot\fR\fR
1931 .ad
1932 .sp .6
1933 .RS 4n
1934 Roll back the given dataset to a previous snapshot. When a dataset is rolled
1935 back, all data that has changed since the snapshot is discarded, and the
1936 dataset reverts to the state at the time of the snapshot. By default, the
1937 command refuses to roll back to a snapshot other than the most recent one. In
1938 order to do so, all intermediate snapshots must be destroyed by specifying the
1939 \fB-r\fR option.
1940 .sp
1941 The \fB-rR\fR options do not recursively destroy the child snapshots of a
1942 recursive snapshot. Only the top-level recursive snapshot is destroyed by
1943 either of these options. To completely roll back a recursive snapshot, you must
1944 rollback the individual child snapshots.
1945 .sp
1946 .ne 2
1947 .na
1948 \fB\fB-r\fR\fR
1949 .ad
1950 .sp .6
1951 .RS 4n
1952 Recursively destroy any snapshots more recent than the one specified.
1953 .RE
1954
1955 .sp
1956 .ne 2
1957 .na
1958 \fB\fB-R\fR\fR
1959 .ad
1960 .sp .6
1961 .RS 4n
1962 Recursively destroy any more recent snapshots, as well as any clones of those
1963 snapshots.
1964 .RE
1965
1966 .sp
1967 .ne 2
1968 .na
1969 \fB\fB-f\fR\fR
1970 .ad
1971 .sp .6
1972 .RS 4n
1973 Used with the \fB-R\fR option to force an unmount of any clone file systems
1974 that are to be destroyed.
1975 .RE
1976
1977 .RE
1978
1979 .sp
1980 .ne 2
1981 .na
1982 \fB\fBzfs clone\fR [\fB-p\fR] [\fB-o\fR \fIproperty\fR=\fIvalue\fR] ...
1983 \fIsnapshot\fR \fIfilesystem\fR|\fIvolume\fR\fR
1984 .ad
1985 .sp .6
1986 .RS 4n
1987 Creates a clone of the given snapshot. See the "Clones" section for details.
1988 The target dataset can be located anywhere in the \fBZFS\fR hierarchy, and is
1989 created as the same type as the original.
1990 .sp
1991 .ne 2
1992 .na
1993 \fB\fB-p\fR\fR
1994 .ad
1995 .sp .6
1996 .RS 4n
1997 Creates all the non-existing parent datasets. Datasets created in this manner
1998 are automatically mounted according to the \fBmountpoint\fR property inherited
1999 from their parent. If the target filesystem or volume already exists, the
2000 operation completes successfully.
2001 .RE
2002
2003 .sp
2004 .ne 2
2005 .na
2006 \fB\fB-o\fR \fIproperty\fR=\fIvalue\fR\fR
2007 .ad
2008 .sp .6
2009 .RS 4n
2010 Sets the specified property; see \fBzfs create\fR for details.
2011 .RE
2012
2013 .RE
2014
2015 .sp
2016 .ne 2
2017 .na
2018 \fB\fBzfs promote\fR \fIclone-filesystem\fR\fR
2019 .ad
2020 .sp .6
2021 .RS 4n
2022 Promotes a clone file system to no longer be dependent on its "origin"
2023 snapshot. This makes it possible to destroy the file system that the clone was
2024 created from. The clone parent-child dependency relationship is reversed, so
2025 that the origin file system becomes a clone of the specified file system.
2026 .sp
2027 The snapshot that was cloned, and any snapshots previous to this snapshot, are
2028 now owned by the promoted clone. The space they use moves from the origin file
2029 system to the promoted clone, so enough space must be available to accommodate
2030 these snapshots. No new space is consumed by this operation, but the space
2031 accounting is adjusted. The promoted clone must not have any conflicting
2032 snapshot names of its own. The \fBrename\fR subcommand can be used to rename
2033 any conflicting snapshots.
2034 .RE
2035
2036 .sp
2037 .ne 2
2038 .na
2039 \fB\fBzfs rename\fR [\fB-f\fR] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR\fR
2040 .ad
2041 .br
2042 .na
2043 \fB\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR\fR
2044 .ad
2045 .br
2046 .na
2047 \fB\fBzfs rename\fR [\fB-fp\fR] \fIfilesystem\fR|\fIvolume\fR
2048 \fIfilesystem\fR|\fIvolume\fR\fR
2049 .ad
2050 .sp .6
2051 .RS 4n
2052 Renames the given dataset. The new target can be located anywhere in the
2053 \fBZFS\fR hierarchy, with the exception of snapshots. Snapshots can only be
2054 renamed within the parent file system or volume. When renaming a snapshot, the
2055 parent file system of the snapshot does not need to be specified as part of the
2056 second argument. Renamed file systems can inherit new mount points, in which
2057 case they are unmounted and remounted at the new mount point.
2058 .sp
2059 .ne 2
2060 .na
2061 \fB\fB-p\fR\fR
2062 .ad
2063 .sp .6
2064 .RS 4n
2065 Creates all the nonexistent parent datasets. Datasets created in this manner
2066 are automatically mounted according to the \fBmountpoint\fR property inherited
2067 from their parent.
2068 .RE
2069
2070 .sp
2071 .ne 2
2072 .na
2073 \fB\fB-f\fR\fR
2074 .ad
2075 .sp .6
2076 .RS 4n
2077 Force unmount any filesystems that need to be unmounted in the process.
2078 .RE
2079
2080 .RE
2081
2082 .sp
2083 .ne 2
2084 .na
2085 \fB\fBzfs rename\fR \fB-r\fR \fIsnapshot\fR \fIsnapshot\fR\fR
2086 .ad
2087 .sp .6
2088 .RS 4n
2089 Recursively rename the snapshots of all descendent datasets. Snapshots are the
2090 only dataset that can be renamed recursively.
2091 .RE
2092
2093 .sp
2094 .ne 2
2095 .na
2096 \fB\fBzfs\fR \fBlist\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR] [\fB-Hp\fR] [\fB-o\fR
2097 \fIproperty\fR[,\fI\&...\fR]] [ \fB-t\fR \fItype\fR[,\fI\&...\fR]] [ \fB-s\fR
2098 \fIproperty\fR ] ... [ \fB-S\fR \fIproperty\fR ] ...
2099 [\fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR] ...\fR
2100 .ad
2101 .sp .6
2102 .RS 4n
2103 Lists the property information for the given datasets in tabular form. If
2104 specified, you can list property information by the absolute pathname or the
2105 relative pathname. By default, all file systems and volumes are displayed.
2106 Snapshots are displayed if the \fBlistsnaps\fR property is \fBon\fR (the
2107 default is \fBoff\fR) . The following fields are displayed,
2108 \fBname,used,available,referenced,mountpoint\fR.
2109 .sp
2110 .ne 2
2111 .na
2112 \fB\fB-H\fR\fR
2113 .ad
2114 .sp .6
2115 .RS 4n
2116 Used for scripting mode. Do not print headers and separate fields by a single
2117 tab instead of arbitrary white space.
2118 .RE
2119
2120 .sp
2121 .ne 2
2122 .na
2123 \fB\fB-r\fR\fR
2124 .ad
2125 .sp .6
2126 .RS 4n
2127 Recursively display any children of the dataset on the command line.
2128 .RE
2129
2130 .sp
2131 .ne 2
2132 .na
2133 \fB\fB-d\fR \fIdepth\fR\fR
2134 .ad
2135 .sp .6
2136 .RS 4n
2137 Recursively display any children of the dataset, limiting the recursion to
2138 \fIdepth\fR. A depth of \fB1\fR will display only the dataset and its direct
2139 children.
2140 .RE
2141
2142 .sp
2143 .ne 2
2144 .na
2145 \fB\fB-o\fR \fIproperty\fR\fR
2146 .ad
2147 .sp .6
2148 .RS 4n
2149 A comma-separated list of properties to display. The property must be:
2150 .RS +4
2151 .TP
2152 .ie t \(bu
2153 .el o
2154 One of the properties described in the "Native Properties" section
2155 .RE
2156 .RS +4
2157 .TP
2158 .ie t \(bu
2159 .el o
2160 A user property
2161 .RE
2162 .RS +4
2163 .TP
2164 .ie t \(bu
2165 .el o
2166 The value \fBname\fR to display the dataset name
2167 .RE
2168 .RS +4
2169 .TP
2170 .ie t \(bu
2171 .el o
2172 The value \fBspace\fR to display space usage properties on file systems and
2173 volumes. This is a shortcut for specifying \fB-o
2174 name,avail,used,usedsnap,usedds,usedrefreserv,usedchild\fR \fB-t
2175 filesystem,volume\fR syntax.
2176 .RE
2177 .RE
2178
2179 .sp
2180 .ne 2
2181 .na
2182 \fB\fB-s\fR \fIproperty\fR\fR
2183 .ad
2184 .sp .6
2185 .RS 4n
2186 A property for sorting the output by column in ascending order based on the
2187 value of the property. The property must be one of the properties described in
2188 the "Properties" section, or the special value \fBname\fR to sort by the
2189 dataset name. Multiple properties can be specified at one time using multiple
2190 \fB-s\fR property options. Multiple \fB-s\fR options are evaluated from left to
2191 right in decreasing order of importance.
2192 .sp
2193 The following is a list of sorting criteria:
2194 .RS +4
2195 .TP
2196 .ie t \(bu
2197 .el o
2198 Numeric types sort in numeric order.
2199 .RE
2200 .RS +4
2201 .TP
2202 .ie t \(bu
2203 .el o
2204 String types sort in alphabetical order.
2205 .RE
2206 .RS +4
2207 .TP
2208 .ie t \(bu
2209 .el o
2210 Types inappropriate for a row sort that row to the literal bottom, regardless
2211 of the specified ordering.
2212 .RE
2213 .RS +4
2214 .TP
2215 .ie t \(bu
2216 .el o
2217 If no sorting options are specified the existing behavior of \fBzfs list\fR is
2218 preserved.
2219 .RE
2220 .RE
2221
2222 .sp
2223 .ne 2
2224 .na
2225 \fB\fB-S\fR \fIproperty\fR\fR
2226 .ad
2227 .sp .6
2228 .RS 4n
2229 Same as the \fB-s\fR option, but sorts by property in descending order.
2230 .RE
2231
2232 .sp
2233 .ne 2
2234 .na
2235 \fB\fB-t\fR \fItype\fR\fR
2236 .ad
2237 .sp .6
2238 .RS 4n
2239 A comma-separated list of types to display, where \fItype\fR is one of
2240 \fBfilesystem\fR, \fBsnapshot\fR , \fBvolume\fR, or \fBall\fR. For example,
2241 specifying \fB-t snapshot\fR displays only snapshots.
2242 .RE
2243
2244 .sp
2245 .ne 2
2246 .mk
2247 .na
2248 \fB\fB-p\fR\fR
2249 .ad
2250 .sp .6
2251 .RS 4n
2252 Display numbers in parseable (exact) values.
2253 .RE
2254
2255 .RE
2256
2257 .sp
2258 .ne 2
2259 .na
2260 \fB\fBzfs set\fR \fIproperty\fR=\fIvalue\fR
2261 \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...\fR
2262 .ad
2263 .sp .6
2264 .RS 4n
2265 Sets the property to the given value for each dataset. Only some properties can
2266 be edited. See the "Properties" section for more information on what properties
2267 can be set and acceptable values. Numeric values can be specified as exact
2268 values, or in a human-readable form with a suffix of \fBB\fR, \fBK\fR, \fBM\fR,
2269 \fBG\fR, \fBT\fR, \fBP\fR, \fBE\fR, \fBZ\fR (for bytes, kilobytes, megabytes,
2270 gigabytes, terabytes, petabytes, exabytes, or zettabytes, respectively). User
2271 properties can be set on snapshots. For more information, see the "User
2272 Properties" section.
2273 .RE
2274
2275 .sp
2276 .ne 2
2277 .na
2278 \fB\fBzfs get\fR [\fB-r\fR|\fB-d\fR \fIdepth\fR] [\fB-Hpc\fR] [\fB-o\fR
2279 \fIfield\fR[,...] [\fB-t\fR \fItype\fR[,...]] [\fB-s\fR \fIsource\fR[,...] "\fIall\fR" |
2280 \fIproperty\fR[,...] \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...\fR
2281 .ad
2282 .sp .6
2283 .RS 4n
2284 Displays properties for the given datasets. If no datasets are specified, then
2285 the command displays properties for all datasets on the system. For each
2286 property, the following columns are displayed:
2287 .sp
2288 .in +2
2289 .nf
2290 name Dataset name
2291 property Property name
2292 value Property value
2293 source Property source. Can either be local, default,
2294 temporary, inherited, or none (-).
2295 .fi
2296 .in -2
2297 .sp
2298
2299 All columns are displayed by default, though this can be controlled by using
2300 the \fB-o\fR option. This command takes a comma-separated list of properties as
2301 described in the "Native Properties" and "User Properties" sections.
2302 .sp
2303 The special value \fBall\fR can be used to display all properties that apply to
2304 the given dataset's type (filesystem, volume, or snapshot).
2305 .sp
2306 .ne 2
2307 .na
2308 \fB\fB-r\fR\fR
2309 .ad
2310 .sp .6
2311 .RS 4n
2312 Recursively display properties for any children.
2313 .RE
2314
2315 .sp
2316 .ne 2
2317 .na
2318 \fB\fB-d\fR \fIdepth\fR\fR
2319 .ad
2320 .sp .6
2321 .RS 4n
2322 Recursively display any children of the dataset, limiting the recursion to
2323 \fIdepth\fR. A depth of \fB1\fR will display only the dataset and its direct
2324 children.
2325 .RE
2326
2327 .sp
2328 .ne 2
2329 .na
2330 \fB\fB-H\fR\fR
2331 .ad
2332 .sp .6
2333 .RS 4n
2334 Display output in a form more easily parsed by scripts. Any headers are
2335 omitted, and fields are explicitly separated by a single tab instead of an
2336 arbitrary amount of space.
2337 .RE
2338
2339 .sp
2340 .ne 2
2341 .na
2342 \fB\fB-o\fR \fIfield\fR\fR
2343 .ad
2344 .sp .6
2345 .RS 4n
2346 A comma-separated list of columns to display. \fBname,property,value,source\fR
2347 is the default value.
2348 .RE
2349
2350 .sp
2351 .ne 2
2352 .na
2353 \fB\fB-s\fR \fIsource\fR\fR
2354 .ad
2355 .sp .6
2356 .RS 4n
2357 A comma-separated list of sources to display. Those properties coming from a
2358 source other than those in this list are ignored. Each source must be one of
2359 the following: \fBlocal,default,inherited,temporary,none\fR. The default value
2360 is all sources.
2361 .RE
2362
2363 .sp
2364 .ne 2
2365 .na
2366 \fB\fB-p\fR\fR
2367 .ad
2368 .sp .6
2369 .RS 4n
2370 Display numbers in parseable (exact) values.
2371 .RE
2372
2373 .sp
2374 .ne 2
2375 .na
2376 \fB\fB-c\fR\fR
2377 .ad
2378 .sp .6
2379 .RS 4n
2380 Only display properties which can be retrieved without issuing any I/O requests,
2381 i.e. properties which are already cached. Most properties are cached except for
2382 create-time properties (normalization, utf8only, casesensitivity) as well as a
2383 volume's size and block size.
2384 .RE
2385
2386 .RE
2387
2388 .sp
2389 .ne 2
2390 .na
2391 \fB\fBzfs inherit\fR [\fB-r\fR] \fIproperty\fR
2392 \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR ...\fR
2393 .ad
2394 .sp .6
2395 .RS 4n
2396 Clears the specified property, causing it to be inherited from an ancestor. If
2397 no ancestor has the property set, then the default value is used. See the
2398 "Properties" section for a listing of default values, and details on which
2399 properties can be inherited.
2400 .sp
2401 .ne 2
2402 .na
2403 \fB\fB-r\fR\fR
2404 .ad
2405 .sp .6
2406 .RS 4n
2407 Recursively inherit the given property for all children.
2408 .RE
2409
2410 .RE
2411
2412 .sp
2413 .ne 2
2414 .na
2415 \fB\fBzfs upgrade\fR [\fB-v\fR]\fR
2416 .ad
2417 .sp .6
2418 .RS 4n
2419 Displays a list of file systems that are not the most recent version.
2420 .RE
2421
2422 .sp
2423 .ne 2
2424 .na
2425 \fB\fBzfs upgrade\fR [\fB-r\fR] [\fB-V\fR \fIversion\fR] [\fB-a\fR |
2426 \fIfilesystem\fR]\fR
2427 .ad
2428 .sp .6
2429 .RS 4n
2430 Upgrades file systems to a new on-disk version. Once this is done, the file
2431 systems will no longer be accessible on systems running older versions of the
2432 software. \fBzfs send\fR streams generated from new snapshots of these file
2433 systems cannot be accessed on systems running older versions of the software.
2434 .sp
2435 In general, the file system version is independent of the pool version. See
2436 \fBzpool\fR(1M) for information on the \fBzpool upgrade\fR command.
2437 .sp
2438 In some cases, the file system version and the pool version are interrelated
2439 and the pool version must be upgraded before the file system version can be
2440 upgraded.
2441 .sp
2442 .ne 2
2443 .na
2444 \fB\fB-a\fR\fR
2445 .ad
2446 .sp .6
2447 .RS 4n
2448 Upgrade all file systems on all imported pools.
2449 .RE
2450
2451 .sp
2452 .ne 2
2453 .na
2454 \fB\fIfilesystem\fR\fR
2455 .ad
2456 .sp .6
2457 .RS 4n
2458 Upgrade the specified file system.
2459 .RE
2460
2461 .sp
2462 .ne 2
2463 .na
2464 \fB\fB-r\fR\fR
2465 .ad
2466 .sp .6
2467 .RS 4n
2468 Upgrade the specified file system and all descendent file systems
2469 .RE
2470
2471 .sp
2472 .ne 2
2473 .na
2474 \fB\fB-V\fR \fIversion\fR\fR
2475 .ad
2476 .sp .6
2477 .RS 4n
2478 Upgrade to the specified \fIversion\fR. If the \fB-V\fR flag is not specified,
2479 this command upgrades to the most recent version. This option can only be used
2480 to increase the version number, and only up to the most recent version
2481 supported by this software.
2482 .RE
2483
2484 .RE
2485
2486 .sp
2487 .ne 2
2488 .na
2489 \fBzfs\fR \fBuserspace\fR [\fB-Hinp\fR] [\fB-o\fR \fIfield\fR[,...]]
2490 [\fB-s\fR \fIfield\fR] ...
2491 [\fB-S\fR \fIfield\fR] ...
2492 [\fB-t\fR \fItype\fR[,...]] \fIfilesystem\fR|\fIsnapshot\fR
2493 .ad
2494 .sp .6
2495 .RS 4n
2496 Displays space consumed by, and quotas on, each user in the specified
2497 filesystem or snapshot. This corresponds to the \fBuserused@\fR\fIuser\fR and
2498 \fBuserquota@\fR\fIuser\fR properties.
2499 .sp
2500 .ne 2
2501 .na
2502 \fB\fB-n\fR\fR
2503 .ad
2504 .sp .6
2505 .RS 4n
2506 Print numeric ID instead of user/group name.
2507 .RE
2508
2509 .sp
2510 .ne 2
2511 .na
2512 \fB\fB-H\fR\fR
2513 .ad
2514 .sp .6
2515 .RS 4n
2516 Do not print headers, use tab-delimited output.
2517 .RE
2518
2519 .sp
2520 .ne 2
2521 .na
2522 \fB\fB-p\fR\fR
2523 .ad
2524 .sp .6
2525 .RS 4n
2526 Use exact (parsable) numeric output.
2527 .RE
2528
2529 .sp
2530 .ne 2
2531 .na
2532 \fB\fB-o\fR \fIfield\fR[,...]\fR
2533 .ad
2534 .sp .6
2535 .RS 4n
2536 Display only the specified fields from the following
2537 set: \fBtype, name, used, quota\fR. The default is to display all fields.
2538 .RE
2539
2540 .sp
2541 .ne 2
2542 .na
2543 \fB\fB-s\fR \fIfield\fR\fR
2544 .ad
2545 .sp .6
2546 .RS 4n
2547 Sort output by this field. The \fIs\fR and \fIS\fR flags may be specified
2548 multiple times to sort first by one field, then by another. The default is
2549 \fB-s type\fR \fB-s name\fR.
2550 .RE
2551
2552 .sp
2553 .ne 2
2554 .na
2555 \fB\fB-S\fR \fIfield\fR\fR
2556 .ad
2557 .sp .6
2558 .RS 4n
2559 Sort by this field in reverse order. See \fB-s\fR.
2560 .RE
2561
2562 .sp
2563 .ne 2
2564 .na
2565 \fB\fB-t\fR \fItype\fR[,...]\fR
2566 .ad
2567 .sp .6
2568 .RS 4n
2569 Print only the specified types from the following
2570 set: \fBall, posixuser, smbuser, posixgroup, smbgroup\fR. The default
2571 is \fB-t posixuser,smbuser\fR. The default can be changed to include group
2572 types.
2573 .RE
2574
2575 .sp
2576 .ne 2
2577 .na
2578 \fB\fB-i\fR\fR
2579 .ad
2580 .sp .6
2581 .RS 4n
2582 Translate SID to POSIX ID. The POSIX ID may be ephemeral if no mapping exists.
2583 Normal POSIX interfaces (for example, \fBstat\fR(2), \fBls\fR \fB-l\fR) perform
2584 this translation, so the \fB-i\fR option allows the output from \fBzfs
2585 userspace\fR to be compared directly with those utilities. However, \fB-i\fR
2586 may lead to confusion if some files were created by an SMB user before a
2587 SMB-to-POSIX name mapping was established. In such a case, some files will be owned
2588 by the SMB entity and some by the POSIX entity. However, the \fB-i\fR option
2589 will report that the POSIX entity has the total usage and quota for both.
2590 .RE
2591
2592 .RE
2593
2594 .sp
2595 .ne 2
2596 .na
2597 \fBzfs\fR \fBgroupspace\fR [\fB-Hinp\fR] [\fB-o\fR \fIfield\fR[,...]]
2598 [\fB-s\fR \fIfield\fR] ...
2599 [\fB-S\fR \fIfield\fR] ...
2600 [\fB-t\fR \fItype\fR[,...]] \fIfilesystem\fR|\fIsnapshot\fR
2601 .ad
2602 .sp .6
2603 .RS 4n
2604 Displays space consumed by, and quotas on, each group in the specified
2605 filesystem or snapshot. This subcommand is identical to \fBzfs userspace\fR,
2606 except that the default types to display are \fB-t posixgroup,smbgroup\fR.
2607 .RE
2608
2609 .sp
2610 .ne 2
2611 .na
2612 \fB\fBzfs mount\fR\fR
2613 .ad
2614 .sp .6
2615 .RS 4n
2616 Displays all \fBZFS\fR file systems currently mounted.
2617 .RE
2618
2619 .sp
2620 .ne 2
2621 .na
2622 \fB\fBzfs mount\fR [\fB-vO\fR] [\fB-o\fR \fIoptions\fR] \fB-a\fR |
2623 \fIfilesystem\fR\fR
2624 .ad
2625 .sp .6
2626 .RS 4n
2627 Mounts \fBZFS\fR file systems. Invoked automatically as part of the boot
2628 process.
2629 .sp
2630 .ne 2
2631 .na
2632 \fB\fB-o\fR \fIoptions\fR\fR
2633 .ad
2634 .sp .6
2635 .RS 4n
2636 An optional, comma-separated list of mount options to use temporarily for the
2637 duration of the mount. See the "Temporary Mount Point Properties" section for
2638 details.
2639 .RE
2640
2641 .sp
2642 .ne 2
2643 .na
2644 \fB\fB-O\fR\fR
2645 .ad
2646 .sp .6
2647 .RS 4n
2648 Perform an overlay mount. See \fBmount\fR(1M) for more information.
2649 .RE
2650
2651 .sp
2652 .ne 2
2653 .na
2654 \fB\fB-v\fR\fR
2655 .ad
2656 .sp .6
2657 .RS 4n
2658 Report mount progress.
2659 .RE
2660
2661 .sp
2662 .ne 2
2663 .na
2664 \fB\fB-a\fR\fR
2665 .ad
2666 .sp .6
2667 .RS 4n
2668 Mount all available \fBZFS\fR file systems. Invoked automatically as part of
2669 the boot process.
2670 .RE
2671
2672 .sp
2673 .ne 2
2674 .na
2675 \fB\fIfilesystem\fR\fR
2676 .ad
2677 .sp .6
2678 .RS 4n
2679 Mount the specified filesystem.
2680 .RE
2681
2682 .RE
2683
2684 .sp
2685 .ne 2
2686 .na
2687 \fB\fBzfs unmount\fR [\fB-f\fR] \fB-a\fR | \fIfilesystem\fR|\fImountpoint\fR\fR
2688 .ad
2689 .sp .6
2690 .RS 4n
2691 Unmounts currently mounted \fBZFS\fR file systems. Invoked automatically as
2692 part of the shutdown process.
2693 .sp
2694 .ne 2
2695 .na
2696 \fB\fB-f\fR\fR
2697 .ad
2698 .sp .6
2699 .RS 4n
2700 Forcefully unmount the file system, even if it is currently in use.
2701 .RE
2702
2703 .sp
2704 .ne 2
2705 .na
2706 \fB\fB-a\fR\fR
2707 .ad
2708 .sp .6
2709 .RS 4n
2710 Unmount all available \fBZFS\fR file systems. Invoked automatically as part of
2711 the boot process.
2712 .RE
2713
2714 .sp
2715 .ne 2
2716 .na
2717 \fB\fIfilesystem\fR|\fImountpoint\fR\fR
2718 .ad
2719 .sp .6
2720 .RS 4n
2721 Unmount the specified filesystem. The command can also be given a path to a
2722 \fBZFS\fR file system mount point on the system.
2723 .RE
2724
2725 .RE
2726
2727 .sp
2728 .ne 2
2729 .na
2730 \fB\fBzfs share\fR \fB-a\fR | \fIfilesystem\fR\fR
2731 .ad
2732 .sp .6
2733 .RS 4n
2734 Shares available \fBZFS\fR file systems.
2735 .sp
2736 .ne 2
2737 .na
2738 \fB\fB-a\fR\fR
2739 .ad
2740 .sp .6
2741 .RS 4n
2742 Share all available \fBZFS\fR file systems. Invoked automatically as part of
2743 the boot process.
2744 .RE
2745
2746 .sp
2747 .ne 2
2748 .na
2749 \fB\fIfilesystem\fR\fR
2750 .ad
2751 .sp .6
2752 .RS 4n
2753 Share the specified filesystem according to the \fBsharenfs\fR and
2754 \fBsharesmb\fR properties. File systems are shared when the \fBsharenfs\fR or
2755 \fBsharesmb\fR property is set.
2756 .RE
2757
2758 .RE
2759
2760 .sp
2761 .ne 2
2762 .na
2763 \fB\fBzfs unshare\fR \fB-a\fR | \fIfilesystem\fR|\fImountpoint\fR\fR
2764 .ad
2765 .sp .6
2766 .RS 4n
2767 Unshares currently shared \fBZFS\fR file systems. This is invoked automatically
2768 as part of the shutdown process.
2769 .sp
2770 .ne 2
2771 .na
2772 \fB\fB-a\fR\fR
2773 .ad
2774 .sp .6
2775 .RS 4n
2776 Unshare all available \fBZFS\fR file systems. Invoked automatically as part of
2777 the boot process.
2778 .RE
2779
2780 .sp
2781 .ne 2
2782 .na
2783 \fB\fIfilesystem\fR|\fImountpoint\fR\fR
2784 .ad
2785 .sp .6
2786 .RS 4n
2787 Unshare the specified filesystem. The command can also be given a path to a
2788 \fBZFS\fR file system shared on the system.
2789 .RE
2790
2791 .RE
2792
2793 .sp
2794 .ne 2
2795 .na
2796 \fBzfs send\fR [\fB-DnPpRrv\fR] [\fB-\fR[\fBiI\fR] \fIsnapshot\fR] \fIsnapshot\fR
2797 .ad
2798 .sp .6
2799 .RS 4n
2800 Creates a stream representation of the second \fIsnapshot\fR, which is written
2801 to standard output. The output can be redirected to a file or to a different
2802 system (for example, using \fBssh\fR(1). By default, a full stream is
2803 generated.
2804 .sp
2805 .ne 2
2806 .na
2807 \fB\fB-i\fR \fIsnapshot\fR\fR
2808 .ad
2809 .sp .6
2810 .RS 4n
2811 Generate an incremental stream from the first \fIsnapshot\fR to the second
2812 \fIsnapshot\fR. The incremental source (the first \fIsnapshot\fR) can be
2813 specified as the last component of the snapshot name (for example, the part
2814 after the \fB@\fR), and it is assumed to be from the same file system as the
2815 second \fIsnapshot\fR.
2816 .sp
2817 If the destination is a clone, the source may be the origin snapshot, which
2818 must be fully specified (for example, \fBpool/fs@origin\fR, not just
2819 \fB@origin\fR).
2820 .RE
2821
2822 .sp
2823 .ne 2
2824 .na
2825 \fB\fB-I\fR \fIsnapshot\fR\fR
2826 .ad
2827 .sp .6
2828 .RS 4n
2829 Generate a stream package that sends all intermediary snapshots from the first
2830 snapshot to the second snapshot. For example, \fB-I @a fs@d\fR is similar to
2831 \fB-i @a fs@b; -i @b fs@c; -i @c fs@d\fR. The incremental source snapshot may
2832 be specified as with the \fB-i\fR option.
2833 .RE
2834
2835 .sp
2836 .ne 2
2837 .na
2838 \fB\fB-R\fR\fR
2839 .ad
2840 .sp .6
2841 .RS 4n
2842 Generate a replication stream package, which will replicate the specified
2843 filesystem, and all descendent file systems, up to the named snapshot. When
2844 received, all properties, snapshots, descendent file systems, and clones are
2845 preserved.
2846 .sp
2847 If the \fB-i\fR or \fB-I\fR flags are used in conjunction with the \fB-R\fR
2848 flag, an incremental replication stream is generated. The current values of
2849 properties, and current snapshot and file system names are set when the stream
2850 is received. If the \fB-F\fR flag is specified when this stream is received,
2851 snapshots and file systems that do not exist on the sending side are destroyed.
2852 .RE
2853
2854 .sp
2855 .ne 2
2856 .na
2857 \fB\fB-D\fR\fR
2858 .ad
2859 .sp .6
2860 .RS 4n
2861 Generate a deduplicated stream. Blocks which would have been sent multiple
2862 times in the send stream will only be sent once. The receiving system must
2863 also support this feature to recieve a deduplicated stream. This flag can
2864 be used regardless of the dataset's \fBdedup\fR property, but performance
2865 will be much better if the filesystem uses a dedup-capable checksum (eg.
2866 \fBsha256\fR).
2867 .RE
2868
2869 .sp
2870 .ne 2
2871 .na
2872 \fB\fB-r\fR\fR
2873 .ad
2874 .sp .6
2875 .RS 4n
2876 Recursively send all descendant snapshots. This is similar to the \fB-R\fR
2877 flag, but information about deleted and renamed datasets is not included, and
2878 property information is only included if the \fB-p\fR flag is specified.
2879 .RE
2880
2881 .sp
2882 .ne 2
2883 .na
2884 \fB\fB-p\fR\fR
2885 .ad
2886 .sp .6
2887 .RS 4n
2888 Include the dataset's properties in the stream. This flag is implicit when
2889 \fB-R\fR is specified. The receiving system must also support this feature.
2890 .RE
2891
2892 .sp
2893 .ne 2
2894 .na
2895 \fB\fB-n\fR\fR
2896 .ad
2897 .sp .6
2898 .RS 4n
2899 Do a dry-run ("No-op") send. Do not generate any actual send data. This is
2900 useful in conjunction with the \fB-v\fR or \fB-P\fR flags to determine what
2901 data will be sent.
2902 .RE
2903
2904 .sp
2905 .ne 2
2906 .na
2907 \fB\fB-P\fR\fR
2908 .ad
2909 .sp .6
2910 .RS 4n
2911 Print machine-parsable verbose information about the stream package generated.
2912 .RE
2913
2914 .sp
2915 .ne 2
2916 .na
2917 \fB\fB-v\fR\fR
2918 .ad
2919 .sp .6
2920 .RS 4n
2921 Print verbose information about the stream package generated. This information
2922 includes a per-second report of how much data has been sent.
2923 .RE
2924
2925 The format of the stream is committed. You will be able to receive your streams
2926 on future versions of \fBZFS\fR.
2927 .RE
2928
2929 .sp
2930 .ne 2
2931 .na
2932 \fB\fBzfs receive\fR [\fB-vnFu\fR]
2933 \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR\fR
2934 .ad
2935 .br
2936 .na
2937 \fB\fBzfs receive\fR [\fB-vnFu\fR] [\fB-d\fR|\fB-e\fR] \fIfilesystem\fR\fR
2938 .ad
2939 .sp .6
2940 .RS 4n
2941 Creates a snapshot whose contents are as specified in the stream provided on
2942 standard input. If a full stream is received, then a new file system is created
2943 as well. Streams are created using the \fBzfs send\fR subcommand, which by
2944 default creates a full stream. \fBzfs recv\fR can be used as an alias for
2945 \fBzfs receive\fR.
2946 .sp
2947 If an incremental stream is received, then the destination file system must
2948 already exist, and its most recent snapshot must match the incremental stream's
2949 source. For \fBzvols\fR, the destination device link is destroyed and
2950 recreated, which means the \fBzvol\fR cannot be accessed during the
2951 \fBreceive\fR operation.
2952 .sp
2953 When a snapshot replication package stream that is generated by using the
2954 \fBzfs send\fR \fB-R\fR command is received, any snapshots that do not exist
2955 on the sending location are destroyed by using the \fBzfs destroy\fR \fB-d\fR
2956 command.
2957 .sp
2958 The name of the snapshot (and file system, if a full stream is received) that
2959 this subcommand creates depends on the argument type and the use of the
2960 \fB-d\fR or \fB-e\fR options.
2961 .sp
2962 If the argument is a snapshot name, the specified \fIsnapshot\fR is created. If
2963 the argument is a file system or volume name, a snapshot with the same name as
2964 the sent snapshot is created within the specified \fIfilesystem\fR or
2965 \fIvolume\fR. If neither of the \fB-d\fR or \fB-e\fR options are specified,
2966 the provided target snapshot name is used exactly as provided.
2967 .sp
2968 The \fB-d\fR and \fB-e\fR options cause the file system name of the target
2969 snapshot to be determined by appending a portion of the sent snapshot's name to
2970 the specified target \fIfilesystem\fR. If the \fB-d\fR option is specified, all
2971 but the first element of the sent snapshot's file system path (usually the
2972 pool name) is used and any required intermediate file systems within the
2973 specified one are created. If the \fB-e\fR option is specified, then only the
2974 last element of the sent snapshot's file system name (i.e. the name of the
2975 source file system itself) is used as the target file system name.
2976 .sp
2977 .ne 2
2978 .na
2979 \fB\fB-d\fR\fR
2980 .ad
2981 .sp .6
2982 .RS 4n
2983 Discard the first element of the sent snapshot's file system name, using
2984 the remaining elements to determine the name of the target file system for
2985 the new snapshot as described in the paragraph above.
2986 .RE
2987
2988 .sp
2989 .ne 2
2990 .na
2991 \fB\fB-e\fR\fR
2992 .ad
2993 .sp .6
2994 .RS 4n
2995 Discard all but the last element of the sent snapshot's file system name,
2996 using that element to determine the name of the target file system for
2997 the new snapshot as described in the paragraph above.
2998 .RE
2999
3000 .sp
3001 .ne 2
3002 .na
3003 \fB\fB-u\fR\fR
3004 .ad
3005 .sp .6
3006 .RS 4n
3007 File system that is associated with the received stream is not mounted.
3008 .RE
3009
3010 .sp
3011 .ne 2
3012 .na
3013 \fB\fB-v\fR\fR
3014 .ad
3015 .sp .6
3016 .RS 4n
3017 Print verbose information about the stream and the time required to perform the
3018 receive operation.
3019 .RE
3020
3021 .sp
3022 .ne 2
3023 .na
3024 \fB\fB-n\fR\fR
3025 .ad
3026 .sp .6
3027 .RS 4n
3028 Do not actually receive the stream. This can be useful in conjunction with the
3029 \fB-v\fR option to verify the name the receive operation would use.
3030 .RE
3031
3032 .sp
3033 .ne 2
3034 .na
3035 \fB\fB-F\fR\fR
3036 .ad
3037 .sp .6
3038 .RS 4n
3039 Force a rollback of the file system to the most recent snapshot before
3040 performing the receive operation. If receiving an incremental replication
3041 stream (for example, one generated by \fBzfs send -R -[iI]\fR), destroy
3042 snapshots and file systems that do not exist on the sending side.
3043 .RE
3044
3045 .RE
3046
3047 .sp
3048 .ne 2
3049 .na
3050 \fB\fBzfs allow\fR \fIfilesystem\fR | \fIvolume\fR\fR
3051 .ad
3052 .sp .6
3053 .RS 4n
3054 Displays permissions that have been delegated on the specified filesystem or
3055 volume. See the other forms of \fBzfs allow\fR for more information.
3056 .RE
3057
3058 .sp
3059 .ne 2
3060 .na
3061 \fB\fBzfs allow\fR [\fB-ldug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...]
3062 \fIperm\fR|@\fIsetname\fR[,...] \fIfilesystem\fR| \fIvolume\fR\fR
3063 .ad
3064 .br
3065 .na
3066 \fB\fBzfs allow\fR [\fB-ld\fR] \fB-e\fR \fIperm\fR|@\fIsetname\fR[,...]
3067 \fIfilesystem\fR | \fIvolume\fR\fR
3068 .ad
3069 .sp .6
3070 .RS 4n
3071 Delegates \fBZFS\fR administration permission for the file systems to
3072 non-privileged users.
3073 .sp
3074 .ne 2
3075 .na
3076 \fB[\fB-ug\fR] "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...]\fR
3077 .ad
3078 .sp .6
3079 .RS 4n
3080 Specifies to whom the permissions are delegated. Multiple entities can be
3081 specified as a comma-separated list. If neither of the \fB-ug\fR options are
3082 specified, then the argument is interpreted preferentially as the keyword
3083 "everyone", then as a user name, and lastly as a group name. To specify a user
3084 or group named "everyone", use the \fB-u\fR or \fB-g\fR options. To specify a
3085 group with the same name as a user, use the \fB-g\fR options.
3086 .RE
3087
3088 .sp
3089 .ne 2
3090 .na
3091 \fB[\fB-e\fR] \fIperm\fR|@\fIsetname\fR[,...]\fR
3092 .ad
3093 .sp .6
3094 .RS 4n
3095 Specifies that the permissions be delegated to "everyone." Multiple permissions
3096 may be specified as a comma-separated list. Permission names are the same as
3097 \fBZFS\fR subcommand and property names. See the property list below. Property
3098 set names, which begin with an at sign (\fB@\fR) , may be specified. See the
3099 \fB-s\fR form below for details.
3100 .RE
3101
3102 .sp
3103 .ne 2
3104 .na
3105 \fB[\fB-ld\fR] \fIfilesystem\fR|\fIvolume\fR\fR
3106 .ad
3107 .sp .6
3108 .RS 4n
3109 Specifies where the permissions are delegated. If neither of the \fB-ld\fR
3110 options are specified, or both are, then the permissions are allowed for the
3111 file system or volume, and all of its descendents. If only the \fB-l\fR option
3112 is used, then is allowed "locally" only for the specified file system. If only
3113 the \fB-d\fR option is used, then is allowed only for the descendent file
3114 systems.
3115 .RE
3116
3117 .RE
3118
3119 .sp
3120 .LP
3121 Permissions are generally the ability to use a \fBZFS\fR subcommand or change a
3122 \fBZFS\fR property. The following permissions are available:
3123 .sp
3124 .in +2
3125 .nf
3126 NAME TYPE NOTES
3127 allow subcommand Must also have the permission that is being
3128 allowed
3129 clone subcommand Must also have the 'create' ability and 'mount'
3130 ability in the origin file system
3131 create subcommand Must also have the 'mount' ability
3132 destroy subcommand Must also have the 'mount' ability
3133 diff subcommand Allows lookup of paths within a dataset
3134 given an object number, and the ability to
3135 create snapshots necessary to 'zfs diff'.
3136 mount subcommand Allows mount/umount of ZFS datasets
3137 promote subcommand Must also have the 'mount'
3138 and 'promote' ability in the origin file system
3139 receive subcommand Must also have the 'mount' and 'create' ability
3140 rename subcommand Must also have the 'mount' and 'create'
3141 ability in the new parent
3142 rollback subcommand Must also have the 'mount' ability
3143 send subcommand
3144 share subcommand Allows sharing file systems over NFS or SMB
3145 protocols
3146 snapshot subcommand Must also have the 'mount' ability
3147 groupquota other Allows accessing any groupquota@... property
3148 groupused other Allows reading any groupused@... property
3149 userprop other Allows changing any user property
3150 userquota other Allows accessing any userquota@... property
3151 userused other Allows reading any userused@... property
3152
3153 aclinherit property
3154 aclmode property
3155 atime property
3156 canmount property
3157 casesensitivity property
3158 checksum property
3159 compression property
3160 copies property
3161 devices property
3162 exec property
3163 filesystem_limit property
3164 mountpoint property
3165 nbmand property
3166 normalization property
3167 primarycache property
3168 quota property
3169 readonly property
3170 recordsize property
3171 refquota property
3172 refreservation property
3173 reservation property
3174 secondarycache property
3175 setuid property
3176 shareiscsi property
3177 sharenfs property
3178 sharesmb property
3179 snapdir property
3180 snapshot_limit property
3181 utf8only property
3182 version property
3183 volblocksize property
3184 volsize property
3185 vscan property
3186 xattr property
3187 zoned property
3188 .fi
3189 .in -2
3190 .sp
3191
3192 .sp
3193 .ne 2
3194 .na
3195 \fB\fBzfs allow\fR \fB-c\fR \fIperm\fR|@\fIsetname\fR[,...]
3196 \fIfilesystem\fR|\fIvolume\fR\fR
3197 .ad
3198 .sp .6
3199 .RS 4n
3200 Sets "create time" permissions. These permissions are granted (locally) to the
3201 creator of any newly-created descendent file system.
3202 .RE
3203
3204 .sp
3205 .ne 2
3206 .na
3207 \fB\fBzfs allow\fR \fB-s\fR @\fIsetname\fR \fIperm\fR|@\fIsetname\fR[,...]
3208 \fIfilesystem\fR|\fIvolume\fR\fR
3209 .ad
3210 .sp .6
3211 .RS 4n
3212 Defines or adds permissions to a permission set. The set can be used by other
3213 \fBzfs allow\fR commands for the specified file system and its descendents.
3214 Sets are evaluated dynamically, so changes to a set are immediately reflected.
3215 Permission sets follow the same naming restrictions as ZFS file systems, but
3216 the name must begin with an "at sign" (\fB@\fR), and can be no more than 64
3217 characters long.
3218 .RE
3219
3220 .sp
3221 .ne 2
3222 .na
3223 \fB\fBzfs unallow\fR [\fB-rldug\fR]
3224 "\fIeveryone\fR"|\fIuser\fR|\fIgroup\fR[,...]
3225 [\fIperm\fR|@\fIsetname\fR[, ...]] \fIfilesystem\fR|\fIvolume\fR\fR
3226 .ad
3227 .br
3228 .na
3229 \fB\fBzfs unallow\fR [\fB-rld\fR] \fB-e\fR [\fIperm\fR|@\fIsetname\fR [,...]]
3230 \fIfilesystem\fR|\fIvolume\fR\fR
3231 .ad
3232 .br
3233 .na
3234 \fB\fBzfs unallow\fR [\fB-r\fR] \fB-c\fR [\fIperm\fR|@\fIsetname\fR[,...]]\fR
3235 .ad
3236 .br
3237 .na
3238 \fB\fIfilesystem\fR|\fIvolume\fR\fR
3239 .ad
3240 .sp .6
3241 .RS 4n
3242 Removes permissions that were granted with the \fBzfs allow\fR command. No
3243 permissions are explicitly denied, so other permissions granted are still in
3244 effect. For example, if the permission is granted by an ancestor. If no
3245 permissions are specified, then all permissions for the specified \fIuser\fR,
3246 \fIgroup\fR, or \fIeveryone\fR are removed. Specifying "everyone" (or using the
3247 \fB-e\fR option) only removes the permissions that were granted to "everyone",
3248 not all permissions for every user and group. See the \fBzfs allow\fR command
3249 for a description of the \fB-ldugec\fR options.
3250 .sp
3251 .ne 2
3252 .na
3253 \fB\fB-r\fR\fR
3254 .ad
3255 .sp .6
3256 .RS 4n
3257 Recursively remove the permissions from this file system and all descendents.
3258 .RE
3259
3260 .RE
3261
3262 .sp
3263 .ne 2
3264 .na
3265 \fB\fBzfs unallow\fR [\fB-r\fR] \fB-s\fR @\fIsetname\fR
3266 [\fIperm\fR|@\fIsetname\fR[,...]]\fR
3267 .ad
3268 .br
3269 .na
3270 \fB\fIfilesystem\fR|\fIvolume\fR\fR
3271 .ad
3272 .sp .6
3273 .RS 4n
3274 Removes permissions from a permission set. If no permissions are specified,
3275 then all permissions are removed, thus removing the set entirely.
3276 .RE
3277
3278 .sp
3279 .ne 2
3280 .na
3281 \fB\fBzfs hold\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...\fR
3282 .ad
3283 .sp .6
3284 .RS 4n
3285 Adds a single reference, named with the \fItag\fR argument, to the specified
3286 snapshot or snapshots. Each snapshot has its own tag namespace, and tags must
3287 be unique within that space.
3288 .sp
3289 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
3290 \fBzfs destroy\fR command return \fBEBUSY\fR.
3291 .sp
3292 .ne 2
3293 .na
3294 \fB\fB-r\fR\fR
3295 .ad
3296 .sp .6
3297 .RS 4n
3298 Specifies that a hold with the given tag is applied recursively to the
3299 snapshots of all descendent file systems.
3300 .RE
3301
3302 .RE
3303
3304 .sp
3305 .ne 2
3306 .na
3307 \fB\fBzfs holds\fR [\fB-r\fR] \fIsnapshot\fR...\fR
3308 .ad
3309 .sp .6
3310 .RS 4n
3311 Lists all existing user references for the given snapshot or snapshots.
3312 .sp
3313 .ne 2
3314 .na
3315 \fB\fB-r\fR\fR
3316 .ad
3317 .sp .6
3318 .RS 4n
3319 Lists the holds that are set on the named descendent snapshots, in addition to
3320 listing the holds on the named snapshot.
3321 .RE
3322
3323 .RE
3324
3325 .sp
3326 .ne 2
3327 .na
3328 \fB\fBzfs release\fR [\fB-r\fR] \fItag\fR \fIsnapshot\fR...\fR
3329 .ad
3330 .sp .6
3331 .RS 4n
3332 Removes a single reference, named with the \fItag\fR argument, from the
3333 specified snapshot or snapshots. The tag must already exist for each snapshot.
3334 .sp
3335 If a hold exists on a snapshot, attempts to destroy that snapshot by using the
3336 \fBzfs destroy\fR command return \fBEBUSY\fR.
3337 .sp
3338 .ne 2
3339 .na
3340 \fB\fB-r\fR\fR
3341 .ad
3342 .sp .6
3343 .RS 4n
3344 Recursively releases a hold with the given tag on the snapshots of all
3345 descendent file systems.
3346 .RE
3347
3348 .sp
3349 .ne 2
3350 .na
3351 \fBzfs diff\fR [\fB-FHt\fR] \fIsnapshot\fR \fIsnapshot|filesystem\fR
3352 .ad
3353 .sp .6
3354 .RS 4n
3355 Display the difference between a snapshot of a given filesystem and another
3356 snapshot of that filesystem from a later time or the current contents of the
3357 filesystem. The first column is a character indicating the type of change,
3358 the other columns indicate pathname, new pathname (in case of rename), change
3359 in link count, and optionally file type and/or change time.
3360
3361 The types of change are:
3362 .in +2
3363 .nf
3364 - The path has been removed
3365 + The path has been created
3366 M The path has been modified
3367 R The path has been renamed
3368 .fi
3369 .in -2
3370 .sp
3371 .ne 2
3372 .na
3373 \fB-F\fR
3374 .ad
3375 .sp .6
3376 .RS 4n
3377 Display an indication of the type of file, in a manner similar to the \fB-F\fR
3378 option of \fBls\fR(1).
3379 .in +2
3380 .nf
3381 B Block device
3382 C Character device
3383 / Directory
3384 > Door
3385 | Named pipe
3386 @ Symbolic link
3387 P Event port
3388 = Socket
3389 F Regular file
3390 .fi
3391 .in -2
3392 .RE
3393 .sp
3394 .ne 2
3395 .na
3396 \fB-H\fR
3397 .ad
3398 .sp .6
3399 .RS 4n
3400 Give more parseable tab-separated output, without header lines and without arrows.
3401 .RE
3402 .sp
3403 .ne 2
3404 .na
3405 \fB-t\fR
3406 .ad
3407 .sp .6
3408 .RS 4n
3409 Display the path's inode change time as the first column of output.
3410 .RE
3411
3412 .SH EXAMPLES
3413 .LP
3414 \fBExample 1 \fRCreating a ZFS File System Hierarchy
3415 .sp
3416 .LP
3417 The following commands create a file system named \fBpool/home\fR and a file
3418 system named \fBpool/home/bob\fR. The mount point \fB/export/home\fR is set for
3419 the parent file system, and is automatically inherited by the child file
3420 system.
3421
3422 .sp
3423 .in +2
3424 .nf
3425 # \fBzfs create pool/home\fR
3426 # \fBzfs set mountpoint=/export/home pool/home\fR
3427 # \fBzfs create pool/home/bob\fR
3428 .fi
3429 .in -2
3430 .sp
3431
3432 .LP
3433 \fBExample 2 \fRCreating a ZFS Snapshot
3434 .sp
3435 .LP
3436 The following command creates a snapshot named \fByesterday\fR. This snapshot
3437 is mounted on demand in the \fB\&.zfs/snapshot\fR directory at the root of the
3438 \fBpool/home/bob\fR file system.
3439
3440 .sp
3441 .in +2
3442 .nf
3443 # \fBzfs snapshot pool/home/bob@yesterday\fR
3444 .fi
3445 .in -2
3446 .sp
3447
3448 .LP
3449 \fBExample 3 \fRCreating and Destroying Multiple Snapshots
3450 .sp
3451 .LP
3452 The following command creates snapshots named \fByesterday\fR of
3453 \fBpool/home\fR and all of its descendent file systems. Each snapshot is
3454 mounted on demand in the \fB\&.zfs/snapshot\fR directory at the root of its
3455 file system. The second command destroys the newly created snapshots.
3456
3457 .sp
3458 .in +2
3459 .nf
3460 # \fBzfs snapshot -r pool/home@yesterday\fR
3461 # \fBzfs destroy -r pool/home@yesterday\fR
3462 .fi
3463 .in -2
3464 .sp
3465
3466 .LP
3467 \fBExample 4 \fRDisabling and Enabling File System Compression
3468 .sp
3469 .LP
3470 The following command disables the \fBcompression\fR property for all file
3471 systems under \fBpool/home\fR. The next command explicitly enables
3472 \fBcompression\fR for \fBpool/home/anne\fR.
3473
3474 .sp
3475 .in +2
3476 .nf
3477 # \fBzfs set compression=off pool/home\fR
3478 # \fBzfs set compression=on pool/home/anne\fR
3479 .fi
3480 .in -2
3481 .sp
3482
3483 .LP
3484 \fBExample 5 \fRListing ZFS Datasets
3485 .sp
3486 .LP
3487 The following command lists all active file systems and volumes in the system.
3488 Snapshots are displayed if the \fBlistsnaps\fR property is \fBon\fR. The
3489 default is \fBoff\fR. See \fBzpool\fR(1M) for more information on pool
3490 properties.
3491
3492 .sp
3493 .in +2
3494 .nf
3495 # \fBzfs list\fR
3496 NAME USED AVAIL REFER MOUNTPOINT
3497 pool 450K 457G 18K /pool
3498 pool/home 315K 457G 21K /export/home
3499 pool/home/anne 18K 457G 18K /export/home/anne
3500 pool/home/bob 276K 457G 276K /export/home/bob
3501 .fi
3502 .in -2
3503 .sp
3504
3505 .LP
3506 \fBExample 6 \fRSetting a Quota on a ZFS File System
3507 .sp
3508 .LP
3509 The following command sets a quota of 50 Gbytes for \fBpool/home/bob\fR.
3510
3511 .sp
3512 .in +2
3513 .nf
3514 # \fBzfs set quota=50G pool/home/bob\fR
3515 .fi
3516 .in -2
3517 .sp
3518
3519 .LP
3520 \fBExample 7 \fRListing ZFS Properties
3521 .sp
3522 .LP
3523 The following command lists all properties for \fBpool/home/bob\fR.
3524
3525 .sp
3526 .in +2
3527 .nf
3528 # \fBzfs get all pool/home/bob\fR
3529 NAME PROPERTY VALUE SOURCE
3530 pool/home/bob type filesystem -
3531 pool/home/bob creation Tue Jul 21 15:53 2009 -
3532 pool/home/bob used 21K -
3533 pool/home/bob available 20.0G -
3534 pool/home/bob referenced 21K -
3535 pool/home/bob compressratio 1.00x -
3536 pool/home/bob mounted yes -
3537 pool/home/bob quota 20G local
3538 pool/home/bob reservation none default
3539 pool/home/bob recordsize 128K default
3540 pool/home/bob mountpoint /pool/home/bob default
3541 pool/home/bob sharenfs off default
3542 pool/home/bob checksum on default
3543 pool/home/bob compression on local
3544 pool/home/bob atime on default
3545 pool/home/bob devices on default
3546 pool/home/bob exec on default
3547 pool/home/bob setuid on default
3548 pool/home/bob readonly off default
3549 pool/home/bob zoned off default
3550 pool/home/bob snapdir hidden default
3551 pool/home/bob aclmode discard default
3552 pool/home/bob aclinherit restricted default
3553 pool/home/bob canmount on default
3554 pool/home/bob shareiscsi off default
3555 pool/home/bob xattr on default
3556 pool/home/bob copies 1 default
3557 pool/home/bob version 4 -
3558 pool/home/bob utf8only off -
3559 pool/home/bob normalization none -
3560 pool/home/bob casesensitivity sensitive -
3561 pool/home/bob vscan off default
3562 pool/home/bob nbmand off default
3563 pool/home/bob sharesmb off default
3564 pool/home/bob refquota none default
3565 pool/home/bob refreservation none default
3566 pool/home/bob primarycache all default
3567 pool/home/bob secondarycache all default
3568 pool/home/bob usedbysnapshots 0 -
3569 pool/home/bob usedbydataset 21K -
3570 pool/home/bob usedbychildren 0 -
3571 pool/home/bob usedbyrefreservation 0 -
3572 .fi
3573 .in -2
3574 .sp
3575
3576 .sp
3577 .LP
3578 The following command gets a single property value.
3579
3580 .sp
3581 .in +2
3582 .nf
3583 # \fBzfs get -H -o value compression pool/home/bob\fR
3584 on
3585 .fi
3586 .in -2
3587 .sp
3588
3589 .sp
3590 .LP
3591 The following command lists all properties with local settings for
3592 \fBpool/home/bob\fR.
3593
3594 .sp
3595 .in +2
3596 .nf
3597 # \fBzfs get -r -s local -o name,property,value all pool/home/bob\fR
3598 NAME PROPERTY VALUE
3599 pool/home/bob quota 20G
3600 pool/home/bob compression on
3601 .fi
3602 .in -2
3603 .sp
3604
3605 .LP
3606 \fBExample 8 \fRRolling Back a ZFS File System
3607 .sp
3608 .LP
3609 The following command reverts the contents of \fBpool/home/anne\fR to the
3610 snapshot named \fByesterday\fR, deleting all intermediate snapshots.
3611
3612 .sp
3613 .in +2
3614 .nf
3615 # \fBzfs rollback -r pool/home/anne@yesterday\fR
3616 .fi
3617 .in -2
3618 .sp
3619
3620 .LP
3621 \fBExample 9 \fRCreating a ZFS Clone
3622 .sp
3623 .LP
3624 The following command creates a writable file system whose initial contents are
3625 the same as \fBpool/home/bob@yesterday\fR.
3626
3627 .sp
3628 .in +2
3629 .nf
3630 # \fBzfs clone pool/home/bob@yesterday pool/clone\fR
3631 .fi
3632 .in -2
3633 .sp
3634
3635 .LP
3636 \fBExample 10 \fRPromoting a ZFS Clone
3637 .sp
3638 .LP
3639 The following commands illustrate how to test out changes to a file system, and
3640 then replace the original file system with the changed one, using clones, clone
3641 promotion, and renaming:
3642
3643 .sp
3644 .in +2
3645 .nf
3646 # \fBzfs create pool/project/production\fR
3647 populate /pool/project/production with data
3648 # \fBzfs snapshot pool/project/production@today\fR
3649 # \fBzfs clone pool/project/production@today pool/project/beta\fR
3650 make changes to /pool/project/beta and test them
3651 # \fBzfs promote pool/project/beta\fR
3652 # \fBzfs rename pool/project/production pool/project/legacy\fR
3653 # \fBzfs rename pool/project/beta pool/project/production\fR
3654 once the legacy version is no longer needed, it can be destroyed
3655 # \fBzfs destroy pool/project/legacy\fR
3656 .fi
3657 .in -2
3658 .sp
3659
3660 .LP
3661 \fBExample 11 \fRInheriting ZFS Properties
3662 .sp
3663 .LP
3664 The following command causes \fBpool/home/bob\fR and \fBpool/home/anne\fR to
3665 inherit the \fBchecksum\fR property from their parent.
3666
3667 .sp
3668 .in +2
3669 .nf
3670 # \fBzfs inherit checksum pool/home/bob pool/home/anne\fR
3671 .fi
3672 .in -2
3673 .sp
3674
3675 .LP
3676 \fBExample 12 \fRRemotely Replicating ZFS Data
3677 .sp
3678 .LP
3679 The following commands send a full stream and then an incremental stream to a
3680 remote machine, restoring them into \fBpoolB/received/fs@a\fRand
3681 \fBpoolB/received/fs@b\fR, respectively. \fBpoolB\fR must contain the file
3682 system \fBpoolB/received\fR, and must not initially contain
3683 \fBpoolB/received/fs\fR.
3684
3685 .sp
3686 .in +2
3687 .nf
3688 # \fBzfs send pool/fs@a | \e\fR
3689 \fBssh host zfs receive poolB/received/fs@a\fR
3690 # \fBzfs send -i a pool/fs@b | ssh host \e\fR
3691 \fBzfs receive poolB/received/fs\fR
3692 .fi
3693 .in -2
3694 .sp
3695
3696 .LP
3697 \fBExample 13 \fRUsing the \fBzfs receive\fR \fB-d\fR Option
3698 .sp
3699 .LP
3700 The following command sends a full stream of \fBpoolA/fsA/fsB@snap\fR to a
3701 remote machine, receiving it into \fBpoolB/received/fsA/fsB@snap\fR. The
3702 \fBfsA/fsB@snap\fR portion of the received snapshot's name is determined from
3703 the name of the sent snapshot. \fBpoolB\fR must contain the file system
3704 \fBpoolB/received\fR. If \fBpoolB/received/fsA\fR does not exist, it is created
3705 as an empty file system.
3706
3707 .sp
3708 .in +2
3709 .nf
3710 # \fBzfs send poolA/fsA/fsB@snap | \e
3711 ssh host zfs receive -d poolB/received\fR
3712 .fi
3713 .in -2
3714 .sp
3715
3716 .LP
3717 \fBExample 14 \fRSetting User Properties
3718 .sp
3719 .LP
3720 The following example sets the user-defined \fBcom.example:department\fR
3721 property for a dataset.
3722
3723 .sp
3724 .in +2
3725 .nf
3726 # \fBzfs set com.example:department=12345 tank/accounting\fR
3727 .fi
3728 .in -2
3729 .sp
3730
3731 .LP
3732 \fBExample 15 \fRCreating a ZFS Volume as an iSCSI Target Device
3733 .sp
3734 .LP
3735 The following example shows how to create a \fBZFS\fR volume as an \fBiSCSI\fR
3736 target.
3737
3738 .sp
3739 .in +2
3740 .nf
3741 # \fBzfs create -V 2g pool/volumes/vol1\fR
3742 # \fBzfs set shareiscsi=on pool/volumes/vol1\fR
3743 # \fBiscsitadm list target\fR
3744 Target: pool/volumes/vol1
3745 iSCSI Name:
3746 iqn.1986-03.com.sun:02:7b4b02a6-3277-eb1b-e686-a24762c52a8c
3747 Connections: 0
3748 .fi
3749 .in -2
3750 .sp
3751
3752 .sp
3753 .LP
3754 After the \fBiSCSI\fR target is created, set up the \fBiSCSI\fR initiator. For
3755 more information about the Solaris \fBiSCSI\fR initiator, see
3756 \fBiscsitadm\fR(1M).
3757 .LP
3758 \fBExample 16 \fRPerforming a Rolling Snapshot
3759 .sp
3760 .LP
3761 The following example shows how to maintain a history of snapshots with a
3762 consistent naming scheme. To keep a week's worth of snapshots, the user
3763 destroys the oldest snapshot, renames the remaining snapshots, and then creates
3764 a new snapshot, as follows:
3765
3766 .sp
3767 .in +2
3768 .nf
3769 # \fBzfs destroy -r pool/users@7daysago\fR
3770 # \fBzfs rename -r pool/users@6daysago @7daysago\fR
3771 # \fBzfs rename -r pool/users@5daysago @6daysago\fR
3772 # \fBzfs rename -r pool/users@yesterday @5daysago\fR
3773 # \fBzfs rename -r pool/users@yesterday @4daysago\fR
3774 # \fBzfs rename -r pool/users@yesterday @3daysago\fR
3775 # \fBzfs rename -r pool/users@yesterday @2daysago\fR
3776 # \fBzfs rename -r pool/users@today @yesterday\fR
3777 # \fBzfs snapshot -r pool/users@today\fR
3778 .fi
3779 .in -2
3780 .sp
3781
3782 .LP
3783 \fBExample 17 \fRSetting \fBsharenfs\fR Property Options on a ZFS File System
3784 .sp
3785 .LP
3786 The following commands show how to set \fBsharenfs\fR property options to
3787 enable \fBrw\fR access for a set of \fBIP\fR addresses and to enable root
3788 access for system \fBneo\fR on the \fBtank/home\fR file system.
3789
3790 .sp
3791 .in +2
3792 .nf
3793 # \fBzfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home\fR
3794 .fi
3795 .in -2
3796 .sp
3797
3798 .sp
3799 .LP
3800 If you are using \fBDNS\fR for host name resolution, specify the fully
3801 qualified hostname.
3802
3803 .LP
3804 \fBExample 18 \fRDelegating ZFS Administration Permissions on a ZFS Dataset
3805 .sp
3806 .LP
3807 The following example shows how to set permissions so that user \fBcindys\fR
3808 can create, destroy, mount, and take snapshots on \fBtank/cindys\fR. The
3809 permissions on \fBtank/cindys\fR are also displayed.
3810
3811 .sp
3812 .in +2
3813 .nf
3814 # \fBzfs allow cindys create,destroy,mount,snapshot tank/cindys\fR
3815 # \fBzfs allow tank/cindys\fR
3816 -------------------------------------------------------------
3817 Local+Descendent permissions on (tank/cindys)
3818 user cindys create,destroy,mount,snapshot
3819 -------------------------------------------------------------
3820 .fi
3821 .in -2
3822 .sp
3823
3824 .sp
3825 .LP
3826 Because the \fBtank/cindys\fR mount point permission is set to 755 by default,
3827 user \fBcindys\fR will be unable to mount file systems under \fBtank/cindys\fR.
3828 Set an \fBACL\fR similar to the following syntax to provide mount point access:
3829 .sp
3830 .in +2
3831 .nf
3832 # \fBchmod A+user:cindys:add_subdirectory:allow /tank/cindys\fR
3833 .fi
3834 .in -2
3835 .sp
3836
3837 .LP
3838 \fBExample 19 \fRDelegating Create Time Permissions on a ZFS Dataset
3839 .sp
3840 .LP
3841 The following example shows how to grant anyone in the group \fBstaff\fR to
3842 create file systems in \fBtank/users\fR. This syntax also allows staff members
3843 to destroy their own file systems, but not destroy anyone else's file system.
3844 The permissions on \fBtank/users\fR are also displayed.
3845
3846 .sp
3847 .in +2
3848 .nf
3849 # \fBzfs allow staff create,mount tank/users\fR
3850 # \fBzfs allow -c destroy tank/users\fR
3851 # \fBzfs allow tank/users\fR
3852 -------------------------------------------------------------
3853 Create time permissions on (tank/users)
3854 create,destroy
3855 Local+Descendent permissions on (tank/users)
3856 group staff create,mount
3857 -------------------------------------------------------------
3858 .fi
3859 .in -2
3860 .sp
3861
3862 .LP
3863 \fBExample 20 \fRDefining and Granting a Permission Set on a ZFS Dataset
3864 .sp
3865 .LP
3866 The following example shows how to define and grant a permission set on the
3867 \fBtank/users\fR file system. The permissions on \fBtank/users\fR are also
3868 displayed.
3869
3870 .sp
3871 .in +2
3872 .nf
3873 # \fBzfs allow -s @pset create,destroy,snapshot,mount tank/users\fR
3874 # \fBzfs allow staff @pset tank/users\fR
3875 # \fBzfs allow tank/users\fR
3876 -------------------------------------------------------------
3877 Permission sets on (tank/users)
3878 @pset create,destroy,mount,snapshot
3879 Create time permissions on (tank/users)
3880 create,destroy
3881 Local+Descendent permissions on (tank/users)
3882 group staff @pset,create,mount
3883 -------------------------------------------------------------
3884 .fi
3885 .in -2
3886 .sp
3887
3888 .LP
3889 \fBExample 21 \fRDelegating Property Permissions on a ZFS Dataset
3890 .sp
3891 .LP
3892 The following example shows to grant the ability to set quotas and reservations
3893 on the \fBusers/home\fR file system. The permissions on \fBusers/home\fR are
3894 also displayed.
3895
3896 .sp
3897 .in +2
3898 .nf
3899 # \fBzfs allow cindys quota,reservation users/home\fR
3900 # \fBzfs allow users/home\fR
3901 -------------------------------------------------------------
3902 Local+Descendent permissions on (users/home)
3903 user cindys quota,reservation
3904 -------------------------------------------------------------
3905 cindys% \fBzfs set quota=10G users/home/marks\fR
3906 cindys% \fBzfs get quota users/home/marks\fR
3907 NAME PROPERTY VALUE SOURCE
3908 users/home/marks quota 10G local
3909 .fi
3910 .in -2
3911 .sp
3912
3913 .LP
3914 \fBExample 22 \fRRemoving ZFS Delegated Permissions on a ZFS Dataset
3915 .sp
3916 .LP
3917 The following example shows how to remove the snapshot permission from the
3918 \fBstaff\fR group on the \fBtank/users\fR file system. The permissions on
3919 \fBtank/users\fR are also displayed.
3920
3921 .sp
3922 .in +2
3923 .nf
3924 # \fBzfs unallow staff snapshot tank/users\fR
3925 # \fBzfs allow tank/users\fR
3926 -------------------------------------------------------------
3927 Permission sets on (tank/users)
3928 @pset create,destroy,mount,snapshot
3929 Create time permissions on (tank/users)
3930 create,destroy
3931 Local+Descendent permissions on (tank/users)
3932 group staff @pset,create,mount
3933 -------------------------------------------------------------
3934 .fi
3935 .in -2
3936 .sp
3937
3938 .LP
3939 \fBExample 23\fR Showing the differences between a snapshot and a ZFS Dataset
3940 .sp
3941 .LP
3942 The following example shows how to see what has changed between a prior
3943 snapshot of a ZFS Dataset and its current state. The \fB-F\fR option is used
3944 to indicate type information for the files affected.
3945
3946 .sp
3947 .in +2
3948 .nf
3949 # zfs diff -F tank/test@before tank/test
3950 M / /tank/test/
3951 M F /tank/test/linked (+1)
3952 R F /tank/test/oldname -> /tank/test/newname
3953 - F /tank/test/deleted
3954 + F /tank/test/created
3955 M F /tank/test/modified
3956 .fi
3957 .in -2
3958 .sp
3959
3960 .SH EXIT STATUS
3961 .sp
3962 .LP
3963 The following exit values are returned:
3964 .sp
3965 .ne 2
3966 .na
3967 \fB\fB0\fR\fR
3968 .ad
3969 .sp .6
3970 .RS 4n
3971 Successful completion.
3972 .RE
3973
3974 .sp
3975 .ne 2
3976 .na
3977 \fB\fB1\fR\fR
3978 .ad
3979 .sp .6
3980 .RS 4n
3981 An error occurred.
3982 .RE
3983
3984 .sp
3985 .ne 2
3986 .na
3987 \fB\fB2\fR\fR
3988 .ad
3989 .sp .6
3990 .RS 4n
3991 Invalid command line options were specified.
3992 .RE
3993
3994 .SH ATTRIBUTES
3995 .sp
3996 .LP
3997 See \fBattributes\fR(5) for descriptions of the following attributes:
3998 .sp
3999
4000 .sp
4001 .TS
4002 box;
4003 c | c
4004 l | l .
4005 ATTRIBUTE TYPE ATTRIBUTE VALUE
4006 _
4007 Interface Stability Committed
4008 .TE
4009
4010 .SH SEE ALSO
4011 .sp
4012 .LP
4013 \fBssh\fR(1), \fBiscsitadm\fR(1M), \fBmount\fR(1M), \fBshare\fR(1M),
4014 \fBsharemgr\fR(1M), \fBunshare\fR(1M), \fBzonecfg\fR(1M), \fBzpool\fR(1M),
4015 \fBchmod\fR(2), \fBstat\fR(2), \fBwrite\fR(2), \fBfsync\fR(3C),
4016 \fBdfstab\fR(4), \fBattributes\fR(5)
4017 .sp
4018 .LP
4019 See the \fBgzip\fR(1) man page, which is not part of the SunOS man page
4020 collection.
4021 .sp
4022 .LP
4023 For information about using the \fBZFS\fR web-based management tool and other
4024 \fBZFS\fR features, see the \fISolaris ZFS Administration Guide\fR.