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