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