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