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