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