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