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