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