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