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