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