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