]>
Commit | Line | Data |
---|---|---|
5990da81 YP |
1 | .\" |
2 | .\" CDDL HEADER START | |
3 | .\" | |
4 | .\" The contents of this file are subject to the terms of the | |
5 | .\" Common Development and Distribution License (the "License"). | |
6 | .\" You may not use this file except in compliance with the License. | |
7 | .\" | |
8 | .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE | |
9 | .\" or http://www.opensolaris.org/os/licensing. | |
10 | .\" See the License for the specific language governing permissions | |
11 | .\" and limitations under the License. | |
12 | .\" | |
13 | .\" When distributing Covered Code, include this CDDL HEADER in each | |
14 | .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE. | |
15 | .\" If applicable, add the following below this CDDL HEADER, with the | |
16 | .\" fields enclosed by brackets "[]" replaced with your own identifying | |
17 | .\" information: Portions Copyright [yyyy] [name of copyright owner] | |
18 | .\" | |
19 | .\" CDDL HEADER END | |
20 | .\" | |
21 | .\" | |
058ac9ba | 22 | .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. |
5990da81 | 23 | .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> |
fdbaf44f | 24 | .\" Copyright (c) 2011, 2016 by Delphix. All rights reserved. |
9759c60f | 25 | .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. |
44f09cdc BB |
26 | .\" Copyright (c) 2014, Joyent, Inc. All rights reserved. |
27 | .\" Copyright (c) 2014 by Adam Stevko. All rights reserved. | |
28 | .\" Copyright (c) 2014 Integros [integros.com] | |
76281da4 | 29 | .\" Copyright 2016 Richard Laager. All rights reserved. |
d7323e79 | 30 | .\" Copyright 2017 Nexenta Systems, Inc. |
5990da81 | 31 | .\" |
44f09cdc BB |
32 | .Dd June 28, 2017 |
33 | .Dt ZFS 8 SMM | |
34 | .Os Linux | |
35 | .Sh NAME | |
36 | .Nm zfs | |
37 | .Nd configures ZFS file systems | |
38 | .Sh SYNOPSIS | |
39 | .Nm | |
40 | .Fl ? | |
41 | .Nm | |
42 | .Cm create | |
43 | .Op Fl p | |
44 | .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... | |
45 | .Ar filesystem | |
46 | .Nm | |
47 | .Cm create | |
48 | .Op Fl ps | |
49 | .Op Fl b Ar blocksize | |
50 | .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... | |
51 | .Fl V Ar size Ar volume | |
52 | .Nm | |
53 | .Cm destroy | |
54 | .Op Fl Rfnprv | |
55 | .Ar filesystem Ns | Ns Ar volume | |
56 | .Nm | |
57 | .Cm destroy | |
58 | .Op Fl Rdnprv | |
59 | .Ar filesystem Ns | Ns Ar volume Ns @ Ns Ar snap Ns | |
60 | .Oo % Ns Ar snap Ns Oo , Ns Ar snap Ns Oo % Ns Ar snap Oc Oc Oc Ns ... | |
61 | .Nm | |
62 | .Cm destroy | |
63 | .Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark | |
64 | .Nm | |
65 | .Cm snapshot | |
66 | .Op Fl r | |
67 | .Oo Fl o Ar property Ns = Ns value Oc Ns ... | |
68 | .Ar filesystem Ns @ Ns Ar snapname Ns | Ns Ar volume Ns @ Ns Ar snapname Ns ... | |
69 | .Nm | |
70 | .Cm rollback | |
71 | .Op Fl Rfr | |
72 | .Ar snapshot | |
73 | .Nm | |
74 | .Cm clone | |
75 | .Op Fl p | |
76 | .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... | |
77 | .Ar snapshot Ar filesystem Ns | Ns Ar volume | |
78 | .Nm | |
79 | .Cm promote | |
80 | .Ar clone-filesystem | |
81 | .Nm | |
82 | .Cm rename | |
83 | .Op Fl f | |
84 | .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot | |
85 | .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot | |
86 | .Nm | |
87 | .Cm rename | |
88 | .Op Fl fp | |
89 | .Ar filesystem Ns | Ns Ar volume | |
90 | .Ar filesystem Ns | Ns Ar volume | |
91 | .Nm | |
92 | .Cm rename | |
93 | .Fl r | |
94 | .Ar snapshot Ar snapshot | |
95 | .Nm | |
96 | .Cm list | |
97 | .Op Fl r Ns | Ns Fl d Ar depth | |
98 | .Op Fl Hp | |
99 | .Oo Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... Oc | |
100 | .Oo Fl s Ar property Oc Ns ... | |
101 | .Oo Fl S Ar property Oc Ns ... | |
102 | .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc | |
103 | .Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Oc Ns ... | |
104 | .Nm | |
105 | .Cm set | |
106 | .Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ... | |
107 | .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... | |
108 | .Nm | |
109 | .Cm get | |
110 | .Op Fl r Ns | Ns Fl d Ar depth | |
111 | .Op Fl Hp | |
112 | .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc | |
113 | .Oo Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... Oc | |
114 | .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc | |
115 | .Cm all | Ar property Ns Oo , Ns Ar property Oc Ns ... | |
116 | .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns | Ns Ar bookmark Ns ... | |
117 | .Nm | |
118 | .Cm inherit | |
119 | .Op Fl rS | |
120 | .Ar property Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... | |
121 | .Nm | |
122 | .Cm upgrade | |
123 | .Nm | |
124 | .Cm upgrade | |
125 | .Fl v | |
126 | .Nm | |
127 | .Cm upgrade | |
128 | .Op Fl r | |
129 | .Op Fl V Ar version | |
130 | .Fl a | Ar filesystem | |
131 | .Nm | |
132 | .Cm userspace | |
133 | .Op Fl Hinp | |
134 | .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc | |
135 | .Oo Fl s Ar field Oc Ns ... | |
136 | .Oo Fl S Ar field Oc Ns ... | |
137 | .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc | |
138 | .Ar filesystem Ns | Ns Ar snapshot | |
139 | .Nm | |
140 | .Cm groupspace | |
141 | .Op Fl Hinp | |
142 | .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc | |
143 | .Oo Fl s Ar field Oc Ns ... | |
144 | .Oo Fl S Ar field Oc Ns ... | |
145 | .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc | |
146 | .Ar filesystem Ns | Ns Ar snapshot | |
147 | .Nm | |
148 | .Cm mount | |
149 | .Nm | |
150 | .Cm mount | |
b5256303 | 151 | .Op Fl Olv |
44f09cdc BB |
152 | .Op Fl o Ar options |
153 | .Fl a | Ar filesystem | |
154 | .Nm | |
155 | .Cm unmount | |
156 | .Op Fl f | |
157 | .Fl a | Ar filesystem Ns | Ns Ar mountpoint | |
158 | .Nm | |
159 | .Cm share | |
160 | .Fl a | Ar filesystem | |
161 | .Nm | |
162 | .Cm unshare | |
163 | .Fl a | Ar filesystem Ns | Ns Ar mountpoint | |
164 | .Nm | |
165 | .Cm bookmark | |
166 | .Ar snapshot bookmark | |
167 | .Nm | |
168 | .Cm send | |
b5256303 | 169 | .Op Fl DLPRcenpvw |
44f09cdc BB |
170 | .Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot |
171 | .Ar snapshot | |
172 | .Nm | |
173 | .Cm send | |
b5256303 | 174 | .Op Fl Lcew |
44f09cdc BB |
175 | .Op Fl i Ar snapshot Ns | Ns Ar bookmark |
176 | .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot | |
177 | .Nm | |
178 | .Cm send | |
179 | .Op Fl Penv | |
180 | .Fl t Ar receive_resume_token | |
181 | .Nm | |
182 | .Cm receive | |
183 | .Op Fl Fnsuv | |
184 | .Op Fl o Sy origin Ns = Ns Ar snapshot | |
185 | .Op Fl o Ar property Ns = Ns Ar value | |
186 | .Op Fl x Ar property | |
187 | .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot | |
188 | .Nm | |
189 | .Cm receive | |
190 | .Op Fl Fnsuv | |
191 | .Op Fl d Ns | Ns Fl e | |
192 | .Op Fl o Sy origin Ns = Ns Ar snapshot | |
193 | .Op Fl o Ar property Ns = Ns Ar value | |
194 | .Op Fl x Ar property | |
195 | .Ar filesystem | |
196 | .Nm | |
197 | .Cm receive | |
198 | .Fl A | |
199 | .Ar filesystem Ns | Ns Ar volume | |
200 | .Nm | |
201 | .Cm allow | |
202 | .Ar filesystem Ns | Ns Ar volume | |
203 | .Nm | |
204 | .Cm allow | |
205 | .Op Fl dglu | |
206 | .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ... | |
207 | .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns | |
208 | .Ar setname Oc Ns ... | |
209 | .Ar filesystem Ns | Ns Ar volume | |
210 | .Nm | |
211 | .Cm allow | |
212 | .Op Fl dl | |
213 | .Fl e Ns | Ns Sy everyone | |
214 | .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns | |
215 | .Ar setname Oc Ns ... | |
216 | .Ar filesystem Ns | Ns Ar volume | |
217 | .Nm | |
218 | .Cm allow | |
219 | .Fl c | |
220 | .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns | |
221 | .Ar setname Oc Ns ... | |
222 | .Ar filesystem Ns | Ns Ar volume | |
223 | .Nm | |
224 | .Cm allow | |
225 | .Fl s No @ Ns Ar setname | |
226 | .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns | |
227 | .Ar setname Oc Ns ... | |
228 | .Ar filesystem Ns | Ns Ar volume | |
229 | .Nm | |
230 | .Cm unallow | |
231 | .Op Fl dglru | |
232 | .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ... | |
233 | .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns | |
234 | .Ar setname Oc Ns ... Oc | |
235 | .Ar filesystem Ns | Ns Ar volume | |
236 | .Nm | |
237 | .Cm unallow | |
238 | .Op Fl dlr | |
239 | .Fl e Ns | Ns Sy everyone | |
240 | .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns | |
241 | .Ar setname Oc Ns ... Oc | |
242 | .Ar filesystem Ns | Ns Ar volume | |
243 | .Nm | |
244 | .Cm unallow | |
245 | .Op Fl r | |
246 | .Fl c | |
247 | .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns | |
248 | .Ar setname Oc Ns ... Oc | |
249 | .Ar filesystem Ns | Ns Ar volume | |
250 | .Nm | |
251 | .Cm unallow | |
252 | .Op Fl r | |
253 | .Fl s @ Ns Ar setname | |
254 | .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns | |
255 | .Ar setname Oc Ns ... Oc | |
256 | .Ar filesystem Ns | Ns Ar volume | |
257 | .Nm | |
258 | .Cm hold | |
259 | .Op Fl r | |
260 | .Ar tag Ar snapshot Ns ... | |
261 | .Nm | |
262 | .Cm holds | |
263 | .Op Fl r | |
264 | .Ar snapshot Ns ... | |
265 | .Nm | |
266 | .Cm release | |
267 | .Op Fl r | |
268 | .Ar tag Ar snapshot Ns ... | |
269 | .Nm | |
270 | .Cm diff | |
271 | .Op Fl FHt | |
272 | .Ar snapshot Ar snapshot Ns | Ns Ar filesystem | |
b5256303 TC |
273 | .Nm |
274 | .Cm load-key | |
275 | .Op Fl nr | |
276 | .Op Fl L Ar keylocation | |
277 | .Fl a | Ar filesystem | |
278 | .Nm | |
279 | .Cm unload-key | |
280 | .Op Fl r | |
281 | .Fl a | Ar filesystem | |
282 | .Nm | |
283 | .Cm change-key | |
284 | .Op Fl l | |
285 | .Op Fl o Ar keylocation Ns = Ns Ar value | |
286 | .Op Fl o Ar keyformat Ns = Ns Ar value | |
287 | .Op Fl o Ar pbkdf2iters Ns = Ns Ar value | |
288 | .Ar filesystem | |
289 | .Nm | |
290 | .Cm change-key | |
291 | .Fl i | |
292 | .Op Fl l | |
293 | .Ar filesystem | |
44f09cdc BB |
294 | .Sh DESCRIPTION |
295 | The | |
296 | .Nm | |
297 | command configures ZFS datasets within a ZFS storage pool, as described in | |
298 | .Xr zpool 8 . | |
299 | A dataset is identified by a unique path within the ZFS namespace. | |
300 | For example: | |
301 | .Bd -literal | |
058ac9ba | 302 | pool/{filesystem,volume,snapshot} |
44f09cdc BB |
303 | .Ed |
304 | .Pp | |
305 | where the maximum length of a dataset name is | |
306 | .Dv MAXNAMELEN | |
307 | .Pq 256 bytes . | |
308 | .Pp | |
058ac9ba | 309 | A dataset can be one of the following: |
44f09cdc BB |
310 | .Bl -tag -width "file system" |
311 | .It Sy file system | |
312 | A ZFS dataset of type | |
313 | .Sy filesystem | |
314 | can be mounted within the standard system namespace and behaves like other file | |
315 | systems. | |
316 | While ZFS file systems are designed to be POSIX compliant, known issues exist | |
317 | that prevent compliance in some cases. | |
318 | Applications that depend on standards conformance might fail due to non-standard | |
319 | behavior when checking file system free space. | |
320 | .It Sy volume | |
321 | A logical volume exported as a raw or block device. | |
322 | This type of dataset should only be used under special circumstances. | |
323 | File systems are typically used in most environments. | |
324 | .It Sy snapshot | |
325 | A read-only version of a file system or volume at a given point in time. | |
326 | It is specified as | |
327 | .Ar filesystem Ns @ Ns Ar name | |
328 | or | |
329 | .Ar volume Ns @ Ns Ar name . | |
330 | .It Sy bookmark | |
331 | Much like a | |
332 | .Sy snapshot , | |
333 | but without the hold on on-disk data. It can be used as the source of a send | |
334 | (but not for a receive). It is specified as | |
335 | .Ar filesystem Ns # Ns Ar name | |
336 | or | |
337 | .Ar volume Ns # Ns Ar name . | |
338 | .El | |
339 | .Ss ZFS File System Hierarchy | |
340 | A ZFS storage pool is a logical collection of devices that provide space for | |
341 | datasets. | |
342 | A storage pool is also the root of the ZFS file system hierarchy. | |
343 | .Pp | |
344 | The root of the pool can be accessed as a file system, such as mounting and | |
345 | unmounting, taking snapshots, and setting properties. | |
346 | The physical storage characteristics, however, are managed by the | |
347 | .Xr zpool 8 | |
348 | command. | |
349 | .Pp | |
350 | See | |
351 | .Xr zpool 8 | |
352 | for more information on creating and administering pools. | |
353 | .Ss Snapshots | |
354 | A snapshot is a read-only copy of a file system or volume. | |
355 | Snapshots can be created extremely quickly, and initially consume no additional | |
356 | space within the pool. | |
357 | As data within the active dataset changes, the snapshot consumes more data than | |
358 | would otherwise be shared with the active dataset. | |
359 | .Pp | |
360 | Snapshots can have arbitrary names. | |
361 | Snapshots of volumes can be cloned or rolled back, visibility is determined | |
362 | by the | |
363 | .Sy snapdev | |
364 | property of the parent volume. | |
365 | .Pp | |
366 | File system snapshots can be accessed under the | |
367 | .Pa .zfs/snapshot | |
368 | directory in the root of the file system. | |
369 | Snapshots are automatically mounted on demand and may be unmounted at regular | |
370 | intervals. | |
371 | The visibility of the | |
372 | .Pa .zfs | |
373 | directory can be controlled by the | |
374 | .Sy snapdir | |
375 | property. | |
376 | .Ss Bookmarks | |
377 | A bookmark is like a snapshot, a read-only copy of a file system or volume. | |
378 | Bookmarks can be created extremely quickly, compared to snapshots, and they | |
379 | consume no additional space within the pool. Bookmarks can also have arbitrary | |
380 | names, much like snapshots. | |
381 | .Pp | |
382 | Unlike snapshots, bookmarks can not be accessed through the filesystem in any | |
383 | way. From a storage standpoint a bookmark just provides a way to reference | |
384 | when a snapshot was created as a distinct object. Bookmarks are initially | |
385 | tied to a snapshot, not the filesystem or volume, and they will survive if the | |
386 | snapshot itself is destroyed. Since they are very light weight there's little | |
387 | incentive to destroy them. | |
388 | .Ss Clones | |
389 | A clone is a writable volume or file system whose initial contents are the same | |
390 | as another dataset. | |
391 | As with snapshots, creating a clone is nearly instantaneous, and initially | |
392 | consumes no additional space. | |
393 | .Pp | |
394 | Clones can only be created from a snapshot. | |
395 | When a snapshot is cloned, it creates an implicit dependency between the parent | |
396 | and child. | |
397 | Even though the clone is created somewhere else in the dataset hierarchy, the | |
398 | original snapshot cannot be destroyed as long as a clone exists. | |
399 | The | |
400 | .Sy origin | |
401 | property exposes this dependency, and the | |
402 | .Cm destroy | |
403 | command lists any such dependencies, if they exist. | |
404 | .Pp | |
405 | The clone parent-child dependency relationship can be reversed by using the | |
406 | .Cm promote | |
407 | subcommand. | |
408 | This causes the | |
409 | .Qq origin | |
410 | file system to become a clone of the specified file system, which makes it | |
411 | possible to destroy the file system that the clone was created from. | |
412 | .Ss "Mount Points" | |
413 | Creating a ZFS file system is a simple operation, so the number of file systems | |
414 | per system is likely to be numerous. | |
415 | To cope with this, ZFS automatically manages mounting and unmounting file | |
416 | systems without the need to edit the | |
417 | .Pa /etc/fstab | |
418 | file. | |
419 | All automatically managed file systems are mounted by ZFS at boot time. | |
420 | .Pp | |
421 | By default, file systems are mounted under | |
422 | .Pa /path , | |
423 | where | |
424 | .Ar path | |
425 | is the name of the file system in the ZFS namespace. | |
426 | Directories are created and destroyed as needed. | |
427 | .Pp | |
428 | A file system can also have a mount point set in the | |
429 | .Sy mountpoint | |
430 | property. | |
431 | This directory is created as needed, and ZFS automatically mounts the file | |
432 | system when the | |
433 | .Nm zfs Cm mount Fl a | |
434 | command is invoked | |
435 | .Po without editing | |
436 | .Pa /etc/fstab | |
437 | .Pc . | |
438 | The | |
439 | .Sy mountpoint | |
440 | property can be inherited, so if | |
441 | .Em pool/home | |
442 | has a mount point of | |
443 | .Pa /export/stuff , | |
444 | then | |
445 | .Em pool/home/user | |
446 | automatically inherits a mount point of | |
447 | .Pa /export/stuff/user . | |
448 | .Pp | |
449 | A file system | |
450 | .Sy mountpoint | |
451 | property of | |
452 | .Sy none | |
453 | prevents the file system from being mounted. | |
454 | .Pp | |
455 | If needed, ZFS file systems can also be managed with traditional tools | |
456 | .Po | |
457 | .Nm mount , | |
458 | .Nm umount , | |
459 | .Pa /etc/fstab | |
460 | .Pc . | |
461 | If a file system's mount point is set to | |
462 | .Sy legacy , | |
463 | ZFS makes no attempt to manage the file system, and the administrator is | |
464 | responsible for mounting and unmounting the file system. | |
465 | .Ss Deduplication | |
466 | Deduplication is the process for removing redundant data at the block level, | |
467 | reducing the total amount of data stored. If a file system has the | |
468 | .Sy dedup | |
469 | property enabled, duplicate data blocks are removed synchronously. The result | |
470 | is that only unique data is stored and common components are shared among files. | |
471 | .Pp | |
472 | Deduplicating data is a very resource-intensive operation. It is generally | |
473 | recommended that you have at least 1.25 GiB of RAM per 1 TiB of storage when | |
474 | you enable deduplication. Calculating the exact requirement depends heavily | |
475 | on the type of data stored in the pool. | |
476 | .Pp | |
477 | Enabling deduplication on an improperly-designed system can result in | |
478 | performance issues (slow IO and administrative operations). It can potentially | |
479 | lead to problems importing a pool due to memory exhaustion. Deduplication | |
480 | can consume significant processing power (CPU) and memory as well as generate | |
481 | additional disk IO. | |
482 | .Pp | |
483 | Before creating a pool with deduplication enabled, ensure that you have planned | |
484 | your hardware requirements appropriately and implemented appropriate recovery | |
485 | practices, such as regular backups. As an alternative to deduplication | |
486 | consider using | |
487 | .Sy compression=lz4 , | |
488 | as a less resource-intensive alternative. | |
489 | .Ss Native Properties | |
490 | Properties are divided into two types, native properties and user-defined | |
491 | .Po or | |
492 | .Qq user | |
493 | .Pc | |
494 | properties. | |
495 | Native properties either export internal statistics or control ZFS behavior. | |
496 | In addition, native properties are either editable or read-only. | |
497 | User properties have no effect on ZFS behavior, but you can use them to annotate | |
498 | datasets in a way that is meaningful in your environment. | |
499 | For more information about user properties, see the | |
500 | .Sx User Properties | |
501 | section, below. | |
502 | .Pp | |
503 | Every dataset has a set of properties that export statistics about the dataset | |
504 | as well as control various behaviors. | |
505 | Properties are inherited from the parent unless overridden by the child. | |
506 | Some properties apply only to certain types of datasets | |
507 | .Pq file systems, volumes, or snapshots . | |
508 | .Pp | |
509 | The values of numeric properties can be specified using human-readable suffixes | |
510 | .Po for example, | |
511 | .Sy k , | |
512 | .Sy KB , | |
513 | .Sy M , | |
514 | .Sy Gb , | |
515 | and so forth, up to | |
516 | .Sy Z | |
517 | for zettabyte | |
518 | .Pc . | |
519 | The following are all valid | |
520 | .Pq and equal | |
521 | specifications: | |
522 | .Li 1536M, 1.5g, 1.50GB . | |
523 | .Pp | |
524 | The values of non-numeric properties are case sensitive and must be lowercase, | |
525 | except for | |
526 | .Sy mountpoint , | |
527 | .Sy sharenfs , | |
528 | and | |
529 | .Sy sharesmb . | |
530 | .Pp | |
531 | The following native properties consist of read-only statistics about the | |
532 | dataset. | |
533 | These properties can be neither set, nor inherited. | |
534 | Native properties apply to all dataset types unless otherwise noted. | |
535 | .Bl -tag -width "usedbyrefreservation" | |
536 | .It Sy available | |
537 | The amount of space available to the dataset and all its children, assuming that | |
538 | there is no other activity in the pool. | |
539 | Because space is shared within a pool, availability can be limited by any number | |
540 | of factors, including physical pool size, quotas, reservations, or other | |
541 | datasets within the pool. | |
542 | .Pp | |
543 | This property can also be referred to by its shortened column name, | |
544 | .Sy avail . | |
545 | .It Sy compressratio | |
546 | For non-snapshots, the compression ratio achieved for the | |
547 | .Sy used | |
548 | space of this dataset, expressed as a multiplier. | |
549 | The | |
550 | .Sy used | |
551 | property includes descendant datasets, and, for clones, does not include the | |
552 | space shared with the origin snapshot. | |
553 | For snapshots, the | |
554 | .Sy compressratio | |
555 | is the same as the | |
556 | .Sy refcompressratio | |
557 | property. | |
558 | Compression can be turned on by running: | |
559 | .Nm zfs Cm set Sy compression Ns = Ns Sy on Ar dataset . | |
560 | The default value is | |
561 | .Sy off . | |
562 | .It Sy createtxg | |
563 | The transaction group (txg) in which the dataset was created. Bookmarks have | |
564 | the same | |
565 | .Sy createtxg | |
566 | as the snapshot they are initially tied to. This property is suitable for | |
567 | ordering a list of snapshots, e.g. for incremental send and receive. | |
568 | .It Sy creation | |
058ac9ba | 569 | The time this dataset was created. |
44f09cdc BB |
570 | .It Sy clones |
571 | For snapshots, this property is a comma-separated list of filesystems or volumes | |
572 | which are clones of this snapshot. | |
573 | The clones' | |
574 | .Sy origin | |
575 | property is this snapshot. | |
576 | If the | |
577 | .Sy clones | |
578 | property is not empty, then this snapshot can not be destroyed | |
579 | .Po even with the | |
580 | .Fl r | |
581 | or | |
582 | .Fl f | |
583 | options | |
584 | .Pc . | |
585 | The roles of origin and clone can be swapped by promoting the clone with the | |
586 | .Nm zfs Cm promote | |
587 | command. | |
588 | .It Sy defer_destroy | |
589 | This property is | |
590 | .Sy on | |
591 | if the snapshot has been marked for deferred destroy by using the | |
592 | .Nm zfs Cm destroy Fl d | |
593 | command. | |
594 | Otherwise, the property is | |
595 | .Sy off . | |
b5256303 TC |
596 | .It Sy encryptionroot |
597 | For encrypted datasets, indicates where the dataset is currently inheriting its | |
598 | encryption key from. Loading or unloading a key for the | |
599 | .Sy encryptionroot | |
600 | will implicitly load / unload the key for any inheriting datasets (see | |
601 | .Nm zfs Cm load-key | |
602 | and | |
603 | .Nm zfs Cm unload-key | |
604 | for details). | |
605 | Clones will always share an | |
606 | encryption key with their origin. See the | |
607 | .Sx Encryption | |
608 | section for details. | |
44f09cdc BB |
609 | .It Sy filesystem_count |
610 | The total number of filesystems and volumes that exist under this location in | |
611 | the dataset tree. | |
612 | This value is only available when a | |
613 | .Sy filesystem_limit | |
614 | has been set somewhere in the tree under which the dataset resides. | |
b5256303 TC |
615 | .It Sy keystatus |
616 | Indicates if an encryption key is currently loaded into ZFS. The possible | |
617 | values are | |
618 | .Sy none , | |
619 | .Sy available , | |
620 | and | |
621 | .Sy unavailable . | |
622 | See | |
623 | .Nm zfs Cm load-key | |
624 | and | |
625 | .Nm zfs Cm unload-key . | |
44f09cdc BB |
626 | .It Sy guid |
627 | The 64 bit GUID of this dataset or bookmark which does not change over its | |
628 | entire lifetime. When a snapshot is sent to another pool, the received | |
629 | snapshot has the same GUID. Thus, the | |
630 | .Sy guid | |
631 | is suitable to identify a snapshot across pools. | |
632 | .It Sy logicalreferenced | |
633 | The amount of space that is | |
634 | .Qq logically | |
635 | accessible by this dataset. | |
636 | See the | |
637 | .Sy referenced | |
638 | property. | |
639 | The logical space ignores the effect of the | |
640 | .Sy compression | |
641 | and | |
642 | .Sy copies | |
643 | properties, giving a quantity closer to the amount of data that applications | |
644 | see. | |
645 | However, it does include space consumed by metadata. | |
646 | .Pp | |
24a64651 | 647 | This property can also be referred to by its shortened column name, |
44f09cdc BB |
648 | .Sy lrefer . |
649 | .It Sy logicalused | |
650 | The amount of space that is | |
651 | .Qq logically | |
652 | consumed by this dataset and all its descendents. | |
653 | See the | |
654 | .Sy used | |
655 | property. | |
656 | The logical space ignores the effect of the | |
657 | .Sy compression | |
658 | and | |
659 | .Sy copies | |
660 | properties, giving a quantity closer to the amount of data that applications | |
661 | see. | |
24a64651 | 662 | However, it does include space consumed by metadata. |
44f09cdc | 663 | .Pp |
24a64651 | 664 | This property can also be referred to by its shortened column name, |
44f09cdc BB |
665 | .Sy lused . |
666 | .It Sy mounted | |
667 | For file systems, indicates whether the file system is currently mounted. | |
668 | This property can be either | |
669 | .Sy yes | |
670 | or | |
671 | .Sy no . | |
672 | .It Sy origin | |
673 | For cloned file systems or volumes, the snapshot from which the clone was | |
674 | created. | |
675 | See also the | |
676 | .Sy clones | |
f5fc4aca | 677 | property. |
44f09cdc BB |
678 | .It Sy receive_resume_token |
679 | For filesystems or volumes which have saved partially-completed state from | |
680 | .Sy zfs receive -s , | |
681 | this opaque token can be provided to | |
682 | .Sy zfs send -t | |
683 | to resume and complete the | |
684 | .Sy zfs receive . | |
685 | .It Sy referenced | |
686 | The amount of data that is accessible by this dataset, which may or may not be | |
687 | shared with other datasets in the pool. | |
688 | When a snapshot or clone is created, it initially references the same amount of | |
689 | space as the file system or snapshot it was created from, since its contents are | |
690 | identical. | |
691 | .Pp | |
692 | This property can also be referred to by its shortened column name, | |
693 | .Sy refer . | |
694 | .It Sy refcompressratio | |
695 | The compression ratio achieved for the | |
696 | .Sy referenced | |
697 | space of this dataset, expressed as a multiplier. | |
698 | See also the | |
699 | .Sy compressratio | |
700 | property. | |
701 | .It Sy snapshot_count | |
702 | The total number of snapshots that exist under this location in the dataset | |
703 | tree. | |
704 | This value is only available when a | |
705 | .Sy snapshot_limit | |
706 | has been set somewhere in the tree under which the dataset resides. | |
707 | .It Sy type | |
708 | The type of dataset: | |
709 | .Sy filesystem , | |
710 | .Sy volume , | |
711 | or | |
712 | .Sy snapshot . | |
713 | .It Sy used | |
714 | The amount of space consumed by this dataset and all its descendents. | |
715 | This is the value that is checked against this dataset's quota and reservation. | |
716 | The space used does not include this dataset's reservation, but does take into | |
717 | account the reservations of any descendent datasets. | |
718 | The amount of space that a dataset consumes from its parent, as well as the | |
719 | amount of space that is freed if this dataset is recursively destroyed, is the | |
720 | greater of its space used and its reservation. | |
721 | .Pp | |
722 | The used space of a snapshot | |
723 | .Po see the | |
724 | .Sx Snapshots | |
725 | section | |
726 | .Pc | |
727 | is space that is referenced exclusively by this snapshot. | |
728 | If this snapshot is destroyed, the amount of | |
729 | .Sy used | |
730 | space will be freed. | |
731 | Space that is shared by multiple snapshots isn't accounted for in this metric. | |
732 | When a snapshot is destroyed, space that was previously shared with this | |
733 | snapshot can become unique to snapshots adjacent to it, thus changing the used | |
734 | space of those snapshots. | |
735 | The used space of the latest snapshot can also be affected by changes in the | |
736 | file system. | |
737 | Note that the | |
738 | .Sy used | |
739 | space of a snapshot is a subset of the | |
740 | .Sy written | |
741 | space of the snapshot. | |
742 | .Pp | |
743 | The amount of space used, available, or referenced does not take into account | |
744 | pending changes. | |
745 | Pending changes are generally accounted for within a few seconds. | |
746 | Committing a change to a disk using | |
747 | .Xr fsync 2 | |
748 | or | |
749 | .Dv O_SYNC | |
750 | does not necessarily guarantee that the space usage information is updated | |
751 | immediately. | |
752 | .It Sy usedby* | |
753 | The | |
754 | .Sy usedby* | |
755 | properties decompose the | |
756 | .Sy used | |
757 | properties into the various reasons that space is used. | |
758 | Specifically, | |
759 | .Sy used No = | |
760 | .Sy usedbychildren No + | |
761 | .Sy usedbydataset No + | |
762 | .Sy usedbyrefreservation No + | |
763 | .Sy usedbysnapshots . | |
764 | These properties are only available for datasets created on | |
765 | .Nm zpool | |
766 | .Qo version 13 Qc | |
767 | pools. | |
768 | .It Sy usedbychildren | |
769 | The amount of space used by children of this dataset, which would be freed if | |
770 | all the dataset's children were destroyed. | |
771 | .It Sy usedbydataset | |
772 | The amount of space used by this dataset itself, which would be freed if the | |
773 | dataset were destroyed | |
774 | .Po after first removing any | |
775 | .Sy refreservation | |
776 | and destroying any necessary snapshots or descendents | |
777 | .Pc . | |
778 | .It Sy usedbyrefreservation | |
779 | The amount of space used by a | |
780 | .Sy refreservation | |
781 | set on this dataset, which would be freed if the | |
782 | .Sy refreservation | |
783 | was removed. | |
784 | .It Sy usedbysnapshots | |
785 | The amount of space consumed by snapshots of this dataset. | |
786 | In particular, it is the amount of space that would be freed if all of this | |
787 | dataset's snapshots were destroyed. | |
788 | Note that this is not simply the sum of the snapshots' | |
789 | .Sy used | |
790 | properties because space can be shared by multiple snapshots. | |
791 | .It Sy userused Ns @ Ns Em user | |
792 | The amount of space consumed by the specified user in this dataset. | |
793 | Space is charged to the owner of each file, as displayed by | |
794 | .Nm ls Fl l . | |
795 | The amount of space charged is displayed by | |
796 | .Nm du | |
797 | and | |
798 | .Nm ls Fl s . | |
799 | See the | |
800 | .Nm zfs Cm userspace | |
801 | subcommand for more information. | |
802 | .Pp | |
803 | Unprivileged users can access only their own space usage. | |
804 | The root user, or a user who has been granted the | |
805 | .Sy userused | |
806 | privilege with | |
807 | .Nm zfs Cm allow , | |
808 | can access everyone's usage. | |
809 | .Pp | |
810 | The | |
811 | .Sy userused Ns @ Ns Em ... | |
812 | properties are not displayed by | |
813 | .Nm zfs Cm get Sy all . | |
814 | The user's name must be appended after the @ symbol, using one of the following | |
815 | forms: | |
816 | .Bl -bullet -width "" | |
817 | .It | |
818 | .Em POSIX name | |
819 | .Po for example, | |
820 | .Sy joe | |
821 | .Pc | |
822 | .It | |
823 | .Em POSIX numeric ID | |
824 | .Po for example, | |
825 | .Sy 789 | |
826 | .Pc | |
827 | .It | |
828 | .Em SID name | |
829 | .Po for example, | |
830 | .Sy joe.smith@mydomain | |
831 | .Pc | |
832 | .It | |
833 | .Em SID numeric ID | |
834 | .Po for example, | |
835 | .Sy S-1-123-456-789 | |
836 | .Pc | |
837 | .El | |
838 | .Pp | |
f974e414 | 839 | Files created on Linux always have POSIX owners. |
44f09cdc BB |
840 | .It Sy userobjused Ns @ Ns Em user |
841 | The | |
842 | .Sy userobjused | |
843 | property is similar to | |
844 | .Sy userused | |
845 | but instead it counts the number of objects consumed by a user. This property | |
846 | counts all objects allocated on behalf of the user, it may differ from the | |
847 | results of system tools such as | |
848 | .Nm df Fl i . | |
849 | .Pp | |
850 | When the property | |
851 | .Sy xattr=on | |
852 | is set on a file system additional objects will be created per-file to store | |
853 | extended attributes. These additional objects are reflected in the | |
854 | .Sy userobjused | |
855 | value and are counted against the user's | |
856 | .Sy userobjquota . | |
857 | When a file system is configured to use | |
858 | .Sy xattr=sa | |
859 | no additional internal objects are normally required. | |
860 | .It Sy userrefs | |
861 | This property is set to the number of user holds on this snapshot. | |
862 | User holds are set by using the | |
863 | .Nm zfs Cm hold | |
864 | command. | |
865 | .It Sy groupused Ns @ Ns Em group | |
866 | The amount of space consumed by the specified group in this dataset. | |
867 | Space is charged to the group of each file, as displayed by | |
868 | .Nm ls Fl l . | |
869 | See the | |
870 | .Sy userused Ns @ Ns Em user | |
871 | property for more information. | |
872 | .Pp | |
873 | Unprivileged users can only access their own groups' space usage. | |
874 | The root user, or a user who has been granted the | |
875 | .Sy groupused | |
876 | privilege with | |
877 | .Nm zfs Cm allow , | |
878 | can access all groups' usage. | |
879 | .It Sy groupobjused Ns @ Ns Em group | |
880 | The number of objects consumed by the specified group in this dataset. | |
881 | Multiple objects may be charged to the group for each file when extended | |
882 | attributes are in use. See the | |
883 | .Sy userobjused Ns @ Ns Em user | |
884 | property for more information. | |
885 | .Pp | |
886 | Unprivileged users can only access their own groups' space usage. | |
887 | The root user, or a user who has been granted the | |
888 | .Sy groupobjused | |
889 | privilege with | |
890 | .Nm zfs Cm allow , | |
891 | can access all groups' usage. | |
892 | .It Sy volblocksize | |
893 | For volumes, specifies the block size of the volume. | |
894 | The | |
895 | .Sy blocksize | |
896 | cannot be changed once the volume has been written, so it should be set at | |
897 | volume creation time. | |
898 | The default | |
899 | .Sy blocksize | |
900 | for volumes is 8 Kbytes. | |
901 | Any power of 2 from 512 bytes to 128 Kbytes is valid. | |
902 | .Pp | |
903 | This property can also be referred to by its shortened column name, | |
904 | .Sy volblock . | |
905 | .It Sy written | |
906 | The amount of space | |
907 | .Sy referenced | |
908 | by this dataset, that was written since the previous snapshot | |
909 | .Pq i.e. that is not referenced by the previous snapshot . | |
910 | .It Sy written Ns @ Ns Em snapshot | |
911 | The amount of | |
912 | .Sy referenced | |
913 | space written to this dataset since the specified snapshot. | |
914 | This is the space that is referenced by this dataset but was not referenced by | |
915 | the specified snapshot. | |
916 | .Pp | |
917 | The | |
918 | .Em snapshot | |
919 | may be specified as a short snapshot name | |
920 | .Po just the part after the | |
921 | .Sy @ | |
922 | .Pc , | |
923 | in which case it will be interpreted as a snapshot in the same filesystem as | |
924 | this dataset. | |
925 | The | |
926 | .Em snapshot | |
927 | may be a full snapshot name | |
928 | .Po Em filesystem Ns @ Ns Em snapshot Pc , | |
929 | which for clones may be a snapshot in the origin's filesystem | |
930 | .Pq or the origin of the origin's filesystem, etc. | |
931 | .El | |
932 | .Pp | |
933 | The following native properties can be used to change the behavior of a ZFS | |
934 | dataset. | |
935 | .Bl -tag -width "" | |
936 | .It Xo | |
937 | .Sy aclinherit Ns = Ns Sy discard Ns | Ns Sy noallow Ns | Ns | |
938 | .Sy restricted Ns | Ns Sy passthrough Ns | Ns Sy passthrough-x | |
939 | .Xc | |
940 | Controls how ACEs are inherited when files and directories are created. | |
941 | .Bl -tag -width "passthrough-x" | |
942 | .It Sy discard | |
943 | does not inherit any ACEs. | |
944 | .It Sy noallow | |
945 | only inherits inheritable ACEs that specify | |
946 | .Qq deny | |
947 | permissions. | |
948 | .It Sy restricted | |
949 | default, removes the | |
950 | .Sy write_acl | |
951 | and | |
952 | .Sy write_owner | |
953 | permissions when the ACE is inherited. | |
954 | .It Sy passthrough | |
955 | inherits all inheritable ACEs without any modifications. | |
956 | .It Sy passthrough-x | |
957 | same meaning as | |
958 | .Sy passthrough , | |
959 | except that the | |
960 | .Sy owner@ , | |
961 | .Sy group@ , | |
962 | and | |
963 | .Sy everyone@ | |
964 | ACEs inherit the execute permission only if the file creation mode also requests | |
965 | the execute bit. | |
966 | .El | |
967 | .Pp | |
968 | When the property value is set to | |
969 | .Sy passthrough , | |
970 | files are created with a mode determined by the inheritable ACEs. | |
971 | If no inheritable ACEs exist that affect the mode, then the mode is set in | |
972 | accordance to the requested mode from the application. | |
973 | .Pp | |
974 | The | |
975 | .Sy aclinherit | |
976 | property does not apply to posix ACLs. | |
977 | .It Sy acltype Ns = Ns Sy off Ns | Ns Sy noacl Ns | Ns Sy posixacl | |
978 | Controls whether ACLs are enabled and if so what type of ACL to use. | |
979 | .Bl -tag -width "posixacl" | |
980 | .It Sy off | |
981 | default, when a file system has the | |
982 | .Sy acltype | |
983 | property set to off then ACLs are disabled. | |
984 | .It Sy noacl | |
985 | an alias for | |
986 | .Sy off | |
987 | .It Sy posixacl | |
988 | indicates posix ACLs should be used. Posix ACLs are specific to Linux and are | |
989 | not functional on other platforms. Posix ACLs are stored as an extended | |
990 | attribute and therefore will not overwrite any existing NFSv4 ACLs which | |
991 | may be set. | |
992 | .El | |
993 | .Pp | |
994 | To obtain the best performance when setting | |
995 | .Sy posixacl | |
996 | users are strongly encouraged to set the | |
997 | .Sy xattr=sa | |
998 | property. This will result in the posix ACL being stored more efficiently on | |
999 | disk. But as a consequence of this all new extended attributes will only be | |
1000 | accessible from OpenZFS implementations which support the | |
1001 | .Sy xattr=sa | |
1002 | property. See the | |
1003 | .Sy xattr | |
1004 | property for more details. | |
1005 | .It Sy atime Ns = Ns Sy on Ns | Ns Sy off | |
1006 | Controls whether the access time for files is updated when they are read. | |
1007 | Turning this property off avoids producing write traffic when reading files and | |
1008 | can result in significant performance gains, though it might confuse mailers | |
1009 | and other similar utilities. The values | |
1010 | .Sy on | |
1011 | and | |
1012 | .Sy off | |
1013 | are equivalent to the | |
1014 | .Sy atime | |
1015 | and | |
1016 | .Sy noatime | |
1017 | mount options. The default value is | |
1018 | .Sy on . | |
1019 | See also | |
1020 | .Sy relatime | |
1021 | below. | |
1022 | .It Sy canmount Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy noauto | |
1023 | If this property is set to | |
1024 | .Sy off , | |
1025 | the file system cannot be mounted, and is ignored by | |
1026 | .Nm zfs Cm mount Fl a . | |
1027 | Setting this property to | |
1028 | .Sy off | |
1029 | is similar to setting the | |
1030 | .Sy mountpoint | |
1031 | property to | |
1032 | .Sy none , | |
1033 | except that the dataset still has a normal | |
1034 | .Sy mountpoint | |
1035 | property, which can be inherited. | |
1036 | Setting this property to | |
1037 | .Sy off | |
1038 | allows datasets to be used solely as a mechanism to inherit properties. | |
1039 | One example of setting | |
1040 | .Sy canmount Ns = Ns Sy off | |
1041 | is to have two datasets with the same | |
1042 | .Sy mountpoint , | |
1043 | so that the children of both datasets appear in the same directory, but might | |
1044 | have different inherited characteristics. | |
1045 | .Pp | |
1046 | When set to | |
1047 | .Sy noauto , | |
1048 | a dataset can only be mounted and unmounted explicitly. | |
1049 | The dataset is not mounted automatically when the dataset is created or | |
1050 | imported, nor is it mounted by the | |
1051 | .Nm zfs Cm mount Fl a | |
1052 | command or unmounted by the | |
1053 | .Nm zfs Cm unmount Fl a | |
1054 | command. | |
1055 | .Pp | |
1056 | This property is not inherited. | |
1057 | .It Xo | |
1058 | .Sy checksum Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy fletcher2 Ns | Ns | |
1059 | .Sy fletcher4 Ns | Ns Sy sha256 Ns | Ns Sy noparity Ns | Ns | |
1060 | .Sy sha512 Ns | Ns Sy skein Ns | Ns Sy edonr | |
1061 | .Xc | |
1062 | Controls the checksum used to verify data integrity. | |
1063 | The default value is | |
1064 | .Sy on , | |
1065 | which automatically selects an appropriate algorithm | |
1066 | .Po currently, | |
1067 | .Sy fletcher4 , | |
1068 | but this may change in future releases | |
1069 | .Pc . | |
1070 | The value | |
1071 | .Sy off | |
1072 | disables integrity checking on user data. | |
1073 | The value | |
1074 | .Sy noparity | |
1075 | not only disables integrity but also disables maintaining parity for user data. | |
3c67d83a | 1076 | This setting is used internally by a dump device residing on a RAID-Z pool and |
44f09cdc BB |
1077 | should not be used by any other dataset. |
1078 | Disabling checksums is | |
1079 | .Sy NOT | |
1080 | a recommended practice. | |
1081 | .Pp | |
1082 | The | |
1083 | .Sy sha512 , | |
1084 | .Sy skein , | |
1085 | and | |
1086 | .Sy edonr | |
1087 | checksum algorithms require enabling the appropriate features on the pool. | |
1088 | Please see | |
1089 | .Xr zpool-features 5 | |
1090 | for more information on these algorithms. | |
1091 | .Pp | |
058ac9ba | 1092 | Changing this property affects only newly-written data. |
44f09cdc BB |
1093 | .It Xo |
1094 | .Sy compression Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy gzip Ns | Ns | |
1095 | .Sy gzip- Ns Em N Ns | Ns Sy lz4 Ns | Ns Sy lzjb Ns | Ns Sy zle | |
1096 | .Xc | |
99197f03 | 1097 | Controls the compression algorithm used for this dataset. |
44f09cdc BB |
1098 | .Pp |
1099 | Setting compression to | |
1100 | .Sy on | |
1101 | indicates that the current default compression algorithm should be used. | |
1102 | The default balances compression and decompression speed, with compression ratio | |
1103 | and is expected to work well on a wide variety of workloads. | |
1104 | Unlike all other settings for this property, | |
1105 | .Sy on | |
1106 | does not select a fixed compression type. | |
1107 | As new compression algorithms are added to ZFS and enabled on a pool, the | |
1108 | default compression algorithm may change. | |
1109 | The current default compression algorithm is either | |
1110 | .Sy lzjb | |
1111 | or, if the | |
1112 | .Sy lz4_compress | |
1113 | feature is enabled, | |
1114 | .Sy lz4 . | |
1115 | .Pp | |
1116 | The | |
1117 | .Sy lz4 | |
1118 | compression algorithm is a high-performance replacement for the | |
1119 | .Sy lzjb | |
1120 | algorithm. | |
1121 | It features significantly faster compression and decompression, as well as a | |
1122 | moderately higher compression ratio than | |
1123 | .Sy lzjb , | |
1124 | but can only be used on pools with the | |
1125 | .Sy lz4_compress | |
1126 | feature set to | |
1127 | .Sy enabled . | |
1128 | See | |
1129 | .Xr zpool-features 5 | |
1130 | for details on ZFS feature flags and the | |
1131 | .Sy lz4_compress | |
1132 | feature. | |
1133 | .Pp | |
1134 | The | |
1135 | .Sy lzjb | |
1136 | compression algorithm is optimized for performance while providing decent data | |
1137 | compression. | |
1138 | .Pp | |
1139 | The | |
1140 | .Sy gzip | |
1141 | compression algorithm uses the same compression as the | |
1142 | .Xr gzip 1 | |
1143 | command. | |
1144 | You can specify the | |
1145 | .Sy gzip | |
1146 | level by using the value | |
1147 | .Sy gzip- Ns Em N , | |
1148 | where | |
1149 | .Em N | |
1150 | is an integer from 1 | |
1151 | .Pq fastest | |
1152 | to 9 | |
1153 | .Pq best compression ratio . | |
1154 | Currently, | |
1155 | .Sy gzip | |
1156 | is equivalent to | |
1157 | .Sy gzip-6 | |
1158 | .Po which is also the default for | |
1159 | .Xr gzip 1 | |
1160 | .Pc . | |
1161 | .Pp | |
1162 | The | |
1163 | .Sy zle | |
1164 | compression algorithm compresses runs of zeros. | |
1165 | .Pp | |
99197f03 | 1166 | This property can also be referred to by its shortened column name |
44f09cdc BB |
1167 | .Sy compress . |
1168 | Changing this property affects only newly-written data. | |
1169 | .It Xo | |
1170 | .Sy context Ns = Ns Sy none Ns | Ns | |
1171 | .Em SELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level | |
1172 | .Xc | |
1173 | This flag sets the SELinux context for all files in the file system under | |
1174 | a mount point for that file system. See | |
1175 | .Xr selinux 8 | |
1176 | for more information. | |
1177 | .It Xo | |
1178 | .Sy fscontext Ns = Ns Sy none Ns | Ns | |
1179 | .Em SELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level | |
1180 | .Xc | |
1181 | This flag sets the SELinux context for the file system file system being | |
1182 | mounted. See | |
1183 | .Xr selinux 8 | |
1184 | for more information. | |
1185 | .It Xo | |
1186 | .Sy defcontext Ns = Ns Sy none Ns | Ns | |
1187 | .Em SELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level | |
1188 | .Xc | |
1189 | This flag sets the SELinux default context for unlabeled files. See | |
1190 | .Xr selinux 8 | |
1191 | for more information. | |
1192 | .It Xo | |
1193 | .Sy rootcontext Ns = Ns Sy none Ns | Ns | |
1194 | .Em SELinux_User:SElinux_Role:Selinux_Type:Sensitivity_Level | |
1195 | .Xc | |
1196 | This flag sets the SELinux context for the root inode of the file system. See | |
1197 | .Xr selinux 8 | |
1198 | for more information. | |
1199 | .It Sy copies Ns = Ns Sy 1 Ns | Ns Sy 2 Ns | Ns Sy 3 | |
1200 | Controls the number of copies of data stored for this dataset. | |
1201 | These copies are in addition to any redundancy provided by the pool, for | |
1202 | example, mirroring or RAID-Z. | |
1203 | The copies are stored on different disks, if possible. | |
1204 | The space used by multiple copies is charged to the associated file and dataset, | |
1205 | changing the | |
1206 | .Sy used | |
1207 | property and counting against quotas and reservations. | |
1208 | .Pp | |
8fd888ba | 1209 | Changing this property only affects newly-written data. |
44f09cdc BB |
1210 | Therefore, set this property at file system creation time by using the |
1211 | .Fl o Sy copies Ns = Ns Ar N | |
1212 | option. | |
1213 | .Pp | |
1214 | Remember that ZFS will not import a pool with a missing top-level vdev. Do | |
1215 | .Sy NOT | |
1216 | create, for example a two-disk striped pool and set | |
1217 | .Sy copies=2 | |
1218 | on some datasets thinking you have setup redundancy for them. When a disk | |
1219 | fails you will not be able to import the pool and will have lost all of your | |
1220 | data. | |
1221 | .It Sy devices Ns = Ns Sy on Ns | Ns Sy off | |
1222 | Controls whether device nodes can be opened on this file system. | |
1223 | The default value is | |
1224 | .Sy on . | |
1225 | The values | |
1226 | .Sy on | |
1227 | and | |
1228 | .Sy off | |
1229 | are equivalent to the | |
1230 | .Sy dev | |
1231 | and | |
1232 | .Sy nodev | |
1233 | mount options. | |
1234 | .It Xo | |
1235 | .Sy dnodesize Ns = Ns Sy legacy Ns | Ns Sy auto Ns | Ns Sy 1k Ns | Ns | |
1236 | .Sy 2k Ns | Ns Sy 4k Ns | Ns Sy 8k Ns | Ns Sy 16k | |
1237 | .Xc | |
1238 | Specifies a compatibility mode or literal value for the size of dnodes in the | |
1239 | file system. The default value is | |
1240 | .Sy legacy . | |
1241 | Setting this property to a value other than | |
1242 | .Sy legacy | |
1243 | requires the large_dnode pool feature to be enabled. | |
1244 | .Pp | |
1245 | Consider setting | |
1246 | .Sy dnodesize | |
1247 | to | |
1248 | .Sy auto | |
1249 | if the dataset uses the | |
1250 | .Sy xattr=sa | |
1251 | property setting and the workload makes heavy use of extended attributes. This | |
1252 | may be applicable to SELinux-enabled systems, Lustre servers, and Samba | |
1253 | servers, for example. Literal values are supported for cases where the optimal | |
1254 | size is known in advance and for performance testing. | |
1255 | .Pp | |
1256 | Leave | |
1257 | .Sy dnodesize | |
1258 | set to | |
1259 | .Sy legacy | |
1260 | if you need to receive a send stream of this dataset on a pool that doesn't | |
1261 | enable the large_dnode feature, or if you need to import this pool on a system | |
1262 | that doesn't support the large_dnode feature. | |
1263 | .Pp | |
50c957f7 | 1264 | This property can also be referred to by its shortened column name, |
44f09cdc | 1265 | .Sy dnsize . |
b5256303 TC |
1266 | .It Xo |
1267 | .Sy encryption Ns = Ns Sy off Ns | Ns Sy on Ns | Ns Sy aes-128-ccm Ns | Ns | |
1268 | .Sy aes-192-ccm Ns | Ns Sy aes-256-ccm Ns | Ns Sy aes-128-gcm Ns | Ns | |
1269 | .Sy aes-192-gcm Ns | Ns Sy aes-256-gcm | |
1270 | .Xc | |
1271 | Controls the encryption cipher suite (block cipher, key length, and mode) used | |
1272 | for this dataset. Requires the | |
1273 | .Sy encryption | |
1274 | feature to be enabled on the pool. | |
1275 | Requires a | |
1276 | .Sy keyformat | |
1277 | to be set at dataset creation time. | |
1278 | .Pp | |
1279 | Selecting | |
1280 | .Sy encryption Ns = Ns Sy on | |
1281 | when creating a dataset indicates that the default encryption suite will be | |
1282 | selected, which is currently | |
1283 | .Sy aes-256-ccm . | |
1284 | In order to provide consistent data protection, encryption must be specified at | |
1285 | dataset creation time and it cannot be changed afterwards. | |
1286 | .Pp | |
1287 | For more details and caveats about encryption see the | |
1288 | .Sy Encryption | |
1289 | section. | |
1290 | .It Sy keyformat Ns = Ns Sy raw Ns | Ns Sy hex Ns | Ns Sy passphrase | |
1291 | Controls what format the user's encryption key will be provided as. This | |
1292 | property is only set when the dataset is encrypted. | |
1293 | .Pp | |
1294 | Raw keys and hex keys must be 32 bytes long (regardless of the chosen | |
1295 | encryption suite) and must be randomly generated. A raw key can be generated | |
1296 | with the following command: | |
1297 | .Bd -literal | |
1298 | # dd if=/dev/urandom of=/path/to/output/key bs=32 count=1 | |
1299 | .Ed | |
1300 | .Pp | |
1301 | Passphrases must be between 8 and 512 bytes long and will be processed through | |
1302 | PBKDF2 before being used (see the | |
1303 | .Sy pbkdf2iters | |
1304 | property). Even though the | |
1305 | encryption suite cannot be changed after dataset creation, the keyformat can be | |
1306 | with | |
1307 | .Nm zfs Cm change-key . | |
1308 | .It Xo | |
1309 | .Sy keylocation Ns = Ns Sy prompt Ns | Ns Sy file:// Ns Em </absolute/file/path> | |
1310 | .Xc | |
1311 | Controls where the user's encryption key will be loaded from by default for | |
1312 | commands such as | |
1313 | .Nm zfs Cm load-key | |
1314 | and | |
1315 | .Nm zfs Cm mount Cm -l . This property is | |
1316 | only set for encrypted datasets which are encryption roots. If unspecified, the | |
1317 | default is | |
1318 | .Sy prompt. | |
1319 | .Pp | |
1320 | Even though the encryption suite cannot be changed after dataset creation, the | |
1321 | keylocation can be with either | |
1322 | .Nm zfs Cm set | |
1323 | or | |
1324 | .Nm zfs Cm change-key . | |
1325 | If | |
1326 | .Sy prompt | |
1327 | is selected ZFS will ask for the key at the command prompt when it is required | |
1328 | to access the encrypted data (see | |
1329 | .Nm zfs Cm load-key | |
1330 | for details). This setting will also allow the key to be passed in via STDIN, | |
1331 | but users should be careful not to place keys which should be kept secret on | |
1332 | the command line. If a file URI is selected, the key will be loaded from the | |
1333 | specified absolute file path. | |
1334 | .It Sy pbkdf2iters Ns = Ns Ar iterations | |
1335 | Controls the number of PBKDF2 iterations that a | |
1336 | .Sy passphrase | |
1337 | encryption key should be run through when processing it into an encryption key. | |
1338 | This property is only defined when encryption is enabled and a keyformat of | |
1339 | .Sy passphrase | |
1340 | is selected. The goal of PBKDF2 is to significantly increase the | |
1341 | computational difficulty needed to brute force a user's passphrase. This is | |
1342 | accomplished by forcing the attacker to run each passphrase through a | |
1343 | computationally expensive hashing function many times before they arrive at the | |
1344 | resulting key. A user who actually knows the passphrase will only have to pay | |
1345 | this cost once. As CPUs become better at processing, this number should be | |
1346 | raised to ensure that a brute force attack is still not possible. The current | |
1347 | default is | |
1348 | .Sy 350000 | |
1349 | and the minimum is | |
1350 | .Sy 100000 . | |
1351 | This property may be changed with | |
1352 | .Nm zfs Cm change-key . | |
44f09cdc BB |
1353 | .It Sy exec Ns = Ns Sy on Ns | Ns Sy off |
1354 | Controls whether processes can be executed from within this file system. | |
1355 | The default value is | |
1356 | .Sy on . | |
1357 | The values | |
1358 | .Sy on | |
1359 | and | |
1360 | .Sy off | |
1361 | are equivalent to the | |
1362 | .Sy exec | |
1363 | and | |
1364 | .Sy noexec | |
1365 | mount options. | |
1366 | .It Sy filesystem_limit Ns = Ns Em count Ns | Ns Sy none | |
788eb90c | 1367 | Limits the number of filesystems and volumes that can exist under this point in |
44f09cdc BB |
1368 | the dataset tree. |
1369 | The limit is not enforced if the user is allowed to change the limit. | |
1370 | Setting a | |
1371 | .Sy filesystem_limit | |
1372 | to | |
1373 | .Sy on | |
1374 | a descendent of a filesystem that already has a | |
1375 | .Sy filesystem_limit | |
1376 | does not override the ancestor's | |
1377 | .Sy filesystem_limit , | |
1378 | but rather imposes an additional limit. | |
1379 | This feature must be enabled to be used | |
1380 | .Po see | |
1381 | .Xr zpool-features 5 | |
1382 | .Pc . | |
1383 | .It Sy mountpoint Ns = Ns Pa path Ns | Ns Sy none Ns | Ns Sy legacy | |
1384 | Controls the mount point used for this file system. | |
1385 | See the | |
1386 | .Sx Mount Points | |
1387 | section for more information on how this property is used. | |
1388 | .Pp | |
1389 | When the | |
1390 | .Sy mountpoint | |
1391 | property is changed for a file system, the file system and any children that | |
1392 | inherit the mount point are unmounted. | |
1393 | If the new value is | |
1394 | .Sy legacy , | |
1395 | then they remain unmounted. | |
1396 | Otherwise, they are automatically remounted in the new location if the property | |
1397 | was previously | |
1398 | .Sy legacy | |
1399 | or | |
1400 | .Sy none , | |
1401 | or if they were mounted before the property was changed. | |
1402 | In addition, any shared file systems are unshared and shared in the new | |
1403 | location. | |
1404 | .It Sy nbmand Ns = Ns Sy on Ns | Ns Sy off | |
1405 | Controls whether the file system should be mounted with | |
1406 | .Sy nbmand | |
1407 | .Pq Non Blocking mandatory locks . | |
1408 | This is used for SMB clients. | |
1409 | Changes to this property only take effect when the file system is umounted and | |
1410 | remounted. | |
1411 | See | |
1412 | .Xr mount 8 | |
1413 | for more information on | |
1414 | .Sy nbmand | |
1415 | mounts. This property is not used on Linux. | |
1416 | .It Sy overlay Ns = Ns Sy off Ns | Ns Sy on | |
1417 | Allow mounting on a busy directory or a directory which already contains | |
1418 | files or directories. This is the default mount behavior for Linux file systems. | |
1419 | For consistency with OpenZFS on other platforms overlay mounts are | |
1420 | .Sy off | |
1421 | by default. Set to | |
1422 | .Sy on | |
1423 | to enable overlay mounts. | |
1424 | .It Sy primarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata | |
1425 | Controls what is cached in the primary cache | |
1426 | .Pq ARC . | |
1427 | If this property is set to | |
1428 | .Sy all , | |
1429 | then both user data and metadata is cached. | |
1430 | If this property is set to | |
1431 | .Sy none , | |
1432 | then neither user data nor metadata is cached. | |
1433 | If this property is set to | |
1434 | .Sy metadata , | |
1435 | then only metadata is cached. | |
1436 | The default value is | |
1437 | .Sy all . | |
1438 | .It Sy quota Ns = Ns Em size Ns | Ns Sy none | |
1439 | Limits the amount of space a dataset and its descendents can consume. | |
1440 | This property enforces a hard limit on the amount of space used. | |
1441 | This includes all space consumed by descendents, including file systems and | |
1442 | snapshots. | |
1443 | Setting a quota on a descendent of a dataset that already has a quota does not | |
1444 | override the ancestor's quota, but rather imposes an additional limit. | |
1445 | .Pp | |
1446 | Quotas cannot be set on volumes, as the | |
1447 | .Sy volsize | |
1448 | property acts as an implicit quota. | |
1449 | .It Sy snapshot_limit Ns = Ns Em count Ns | Ns Sy none | |
788eb90c | 1450 | Limits the number of snapshots that can be created on a dataset and its |
44f09cdc BB |
1451 | descendents. |
1452 | Setting a | |
1453 | .Sy snapshot_limit | |
1454 | on a descendent of a dataset that already has a | |
1455 | .Sy snapshot_limit | |
1456 | does not override the ancestor's | |
1457 | .Sy snapshot_limit , | |
1458 | but rather imposes an additional limit. | |
1459 | The limit is not enforced if the user is allowed to change the limit. | |
1460 | For example, this means that recursive snapshots taken from the global zone are | |
1461 | counted against each delegated dataset within a zone. | |
1462 | This feature must be enabled to be used | |
1463 | .Po see | |
1464 | .Xr zpool-features 5 | |
1465 | .Pc . | |
1466 | .It Sy userquota@ Ns Em user Ns = Ns Em size Ns | Ns Sy none | |
1467 | Limits the amount of space consumed by the specified user. | |
1468 | User space consumption is identified by the | |
1469 | .Sy userspace@ Ns Em user | |
1470 | property. | |
1471 | .Pp | |
1472 | Enforcement of user quotas may be delayed by several seconds. | |
1473 | This delay means that a user might exceed their quota before the system notices | |
1474 | that they are over quota and begins to refuse additional writes with the | |
1475 | .Er EDQUOT | |
1476 | error message. | |
1477 | See the | |
1478 | .Nm zfs Cm userspace | |
1479 | subcommand for more information. | |
1480 | .Pp | |
1481 | Unprivileged users can only access their own groups' space usage. | |
1482 | The root user, or a user who has been granted the | |
1483 | .Sy userquota | |
1484 | privilege with | |
1485 | .Nm zfs Cm allow , | |
1486 | can get and set everyone's quota. | |
1487 | .Pp | |
1488 | This property is not available on volumes, on file systems before version 4, or | |
1489 | on pools before version 15. | |
1490 | The | |
1491 | .Sy userquota@ Ns Em ... | |
1492 | properties are not displayed by | |
1493 | .Nm zfs Cm get Sy all . | |
1494 | The user's name must be appended after the | |
1495 | .Sy @ | |
1496 | symbol, using one of the following forms: | |
1497 | .Bl -bullet | |
1498 | .It | |
1499 | .Em POSIX name | |
1500 | .Po for example, | |
1501 | .Sy joe | |
1502 | .Pc | |
1503 | .It | |
1504 | .Em POSIX numeric ID | |
1505 | .Po for example, | |
1506 | .Sy 789 | |
1507 | .Pc | |
1508 | .It | |
1509 | .Em SID name | |
1510 | .Po for example, | |
1511 | .Sy joe.smith@mydomain | |
1512 | .Pc | |
1513 | .It | |
1514 | .Em SID numeric ID | |
1515 | .Po for example, | |
1516 | .Sy S-1-123-456-789 | |
1517 | .Pc | |
1518 | .El | |
1519 | .Pp | |
6a107f41 | 1520 | Files created on Linux always have POSIX owners. |
44f09cdc BB |
1521 | .It Sy userobjquota@ Ns Em user Ns = Ns Em size Ns | Ns Sy none |
1522 | The | |
1523 | .Sy userobjquota | |
1524 | is similar to | |
1525 | .Sy userquota | |
1526 | but it limits the number of objects a user can create. Please refer to | |
1527 | .Sy userobjused | |
1528 | for more information about how objects are counted. | |
1529 | .It Sy groupquota@ Ns Em group Ns = Ns Em size Ns | Ns Sy none | |
1530 | Limits the amount of space consumed by the specified group. | |
1531 | Group space consumption is identified by the | |
1532 | .Sy groupused@ Ns Em group | |
1533 | property. | |
1534 | .Pp | |
1535 | Unprivileged users can access only their own groups' space usage. | |
1536 | The root user, or a user who has been granted the | |
1537 | .Sy groupquota | |
1538 | privilege with | |
1539 | .Nm zfs Cm allow , | |
1540 | can get and set all groups' quotas. | |
1541 | .It Sy groupobjquota@ Ns Em group Ns = Ns Em size Ns | Ns Sy none | |
1542 | The | |
1543 | .Sy groupobjquota | |
1544 | is similar to | |
1545 | .Sy groupquota | |
1546 | but it limits number of objects a group can consume. Please refer to | |
1547 | .Sy userobjused | |
1548 | for more information about how objects are counted. | |
1549 | .It Sy readonly Ns = Ns Sy on Ns | Ns Sy off | |
1550 | Controls whether this dataset can be modified. | |
1551 | The default value is | |
1552 | .Sy off . | |
1553 | The values | |
1554 | .Sy on | |
1555 | and | |
1556 | .Sy off | |
1557 | are equivalent to the | |
1558 | .Sy ro | |
1559 | and | |
1560 | .Sy rw | |
1561 | mount options. | |
1562 | .Pp | |
1563 | This property can also be referred to by its shortened column name, | |
1564 | .Sy rdonly . | |
1565 | .It Sy recordsize Ns = Ns Em size | |
1566 | Specifies a suggested block size for files in the file system. | |
1567 | This property is designed solely for use with database workloads that access | |
1568 | files in fixed-size records. | |
1569 | ZFS automatically tunes block sizes according to internal algorithms optimized | |
1570 | for typical access patterns. | |
1571 | .Pp | |
1572 | For databases that create very large files but access them in small random | |
1573 | chunks, these algorithms may be suboptimal. | |
1574 | Specifying a | |
1575 | .Sy recordsize | |
1576 | greater than or equal to the record size of the database can result in | |
1577 | significant performance gains. | |
1578 | Use of this property for general purpose file systems is strongly discouraged, | |
1579 | and may adversely affect performance. | |
1580 | .Pp | |
1581 | The size specified must be a power of two greater than or equal to 512 and less | |
1582 | than or equal to 128 Kbytes. | |
1583 | If the | |
1584 | .Sy large_blocks | |
1585 | feature is enabled on the pool, the size may be up to 1 Mbyte. | |
1586 | See | |
1587 | .Xr zpool-features 5 | |
1588 | for details on ZFS feature flags. | |
1589 | .Pp | |
1590 | Changing the file system's | |
1591 | .Sy recordsize | |
1592 | affects only files created afterward; existing files are unaffected. | |
1593 | .Pp | |
1594 | This property can also be referred to by its shortened column name, | |
1595 | .Sy recsize . | |
1596 | .It Sy redundant_metadata Ns = Ns Sy all Ns | Ns Sy most | |
1597 | Controls what types of metadata are stored redundantly. | |
1598 | ZFS stores an extra copy of metadata, so that if a single block is corrupted, | |
1599 | the amount of user data lost is limited. | |
1600 | This extra copy is in addition to any redundancy provided at the pool level | |
1601 | .Pq e.g. by mirroring or RAID-Z , | |
1602 | and is in addition to an extra copy specified by the | |
1603 | .Sy copies | |
1604 | property | |
1605 | .Pq up to a total of 3 copies . | |
1606 | For example if the pool is mirrored, | |
1607 | .Sy copies Ns = Ns 2 , | |
1608 | and | |
1609 | .Sy redundant_metadata Ns = Ns Sy most , | |
1610 | then ZFS stores 6 copies of most metadata, and 4 copies of data and some | |
faf0f58c | 1611 | metadata. |
44f09cdc BB |
1612 | .Pp |
1613 | When set to | |
1614 | .Sy all , | |
1615 | ZFS stores an extra copy of all metadata. | |
1616 | If a single on-disk block is corrupt, at worst a single block of user data | |
1617 | .Po which is | |
1618 | .Sy recordsize | |
1619 | bytes long | |
1620 | .Pc | |
1621 | can be lost. | |
1622 | .Pp | |
1623 | When set to | |
1624 | .Sy most , | |
1625 | ZFS stores an extra copy of most types of metadata. | |
1626 | This can improve performance of random writes, because less metadata must be | |
1627 | written. | |
1628 | In practice, at worst about 100 blocks | |
1629 | .Po of | |
1630 | .Sy recordsize | |
1631 | bytes each | |
1632 | .Pc | |
1633 | of user data can be lost if a single on-disk block is corrupt. | |
1634 | The exact behavior of which metadata blocks are stored redundantly may change in | |
1635 | future releases. | |
1636 | .Pp | |
1637 | The default value is | |
1638 | .Sy all . | |
1639 | .It Sy refquota Ns = Ns Em size Ns | Ns Sy none | |
1640 | Limits the amount of space a dataset can consume. | |
1641 | This property enforces a hard limit on the amount of space used. | |
1642 | This hard limit does not include space used by descendents, including file | |
1643 | systems and snapshots. | |
1644 | .It Sy refreservation Ns = Ns Em size Ns | Ns Sy none | |
1645 | The minimum amount of space guaranteed to a dataset, not including its | |
1646 | descendents. | |
1647 | When the amount of space used is below this value, the dataset is treated as if | |
1648 | it were taking up the amount of space specified by | |
1649 | .Sy refreservation . | |
1650 | The | |
1651 | .Sy refreservation | |
1652 | reservation is accounted for in the parent datasets' space used, and counts | |
1653 | against the parent datasets' quotas and reservations. | |
1654 | .Pp | |
1655 | If | |
1656 | .Sy refreservation | |
1657 | is set, a snapshot is only allowed if there is enough free pool space outside of | |
1658 | this reservation to accommodate the current number of | |
1659 | .Qq referenced | |
1660 | bytes in the dataset. | |
1661 | .Pp | |
1662 | This property can also be referred to by its shortened column name, | |
1663 | .Sy refreserv . | |
1664 | .It Sy relatime Ns = Ns Sy on Ns | Ns Sy off | |
1665 | Controls the manner in which the access time is updated when | |
1666 | .Sy atime=on | |
1667 | is set. Turning this property on causes the access time to be updated relative | |
1668 | to the modify or change time. Access time is only updated if the previous | |
1669 | access time was earlier than the current modify or change time or if the | |
1670 | existing access time hasn't been updated within the past 24 hours. The default | |
1671 | value is | |
1672 | .Sy off . | |
1673 | The values | |
1674 | .Sy on | |
1675 | and | |
1676 | .Sy off | |
1677 | are equivalent to the | |
1678 | .Sy relatime | |
1679 | and | |
1680 | .Sy norelatime | |
1681 | mount options. | |
1682 | .It Sy reservation Ns = Ns Em size Ns | Ns Sy none | |
1683 | The minimum amount of space guaranteed to a dataset and its descendants. | |
1684 | When the amount of space used is below this value, the dataset is treated as if | |
1685 | it were taking up the amount of space specified by its reservation. | |
1686 | Reservations are accounted for in the parent datasets' space used, and count | |
1687 | against the parent datasets' quotas and reservations. | |
1688 | .Pp | |
1689 | This property can also be referred to by its shortened column name, | |
1690 | .Sy reserv . | |
1691 | .It Sy secondarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata | |
1692 | Controls what is cached in the secondary cache | |
1693 | .Pq L2ARC . | |
1694 | If this property is set to | |
1695 | .Sy all , | |
1696 | then both user data and metadata is cached. | |
1697 | If this property is set to | |
1698 | .Sy none , | |
1699 | then neither user data nor metadata is cached. | |
1700 | If this property is set to | |
1701 | .Sy metadata , | |
1702 | then only metadata is cached. | |
1703 | The default value is | |
1704 | .Sy all . | |
1705 | .It Sy setuid Ns = Ns Sy on Ns | Ns Sy off | |
1706 | Controls whether the setuid bit is respected for the file system. | |
1707 | The default value is | |
1708 | .Sy on . | |
1709 | The values | |
1710 | .Sy on | |
1711 | and | |
1712 | .Sy off | |
1713 | are equivalent to the | |
1714 | .Sy suid | |
1715 | and | |
1716 | .Sy nosuid | |
1717 | mount options. | |
1718 | .It Sy sharesmb Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Em opts | |
1719 | Controls whether the file system is shared by using | |
1720 | .Sy Samba USERSHARES | |
1721 | and what options are to be used. Otherwise, the file system is automatically | |
1722 | shared and unshared with the | |
1723 | .Nm zfs Cm share | |
1724 | and | |
1725 | .Nm zfs Cm unshare | |
1726 | commands. If the property is set to on, the | |
1727 | .Xr net 8 | |
1728 | command is invoked to create a | |
1729 | .Sy USERSHARE . | |
1730 | .Pp | |
1731 | Because SMB shares requires a resource name, a unique resource name is | |
1732 | constructed from the dataset name. The constructed name is a copy of the | |
1733 | dataset name except that the characters in the dataset name, which would be | |
1734 | invalid in the resource name, are replaced with underscore (_) characters. | |
1735 | Linux does not currently support additional options which might be available | |
1736 | on Solaris. | |
1737 | .Pp | |
1738 | If the | |
1739 | .Sy sharesmb | |
1740 | property is set to | |
1741 | .Sy off , | |
1742 | the file systems are unshared. | |
1743 | .Pp | |
1744 | The share is created with the ACL (Access Control List) "Everyone:F" ("F" | |
1745 | stands for "full permissions", ie. read and write permissions) and no guest | |
1746 | access (which means Samba must be able to authenticate a real user, system | |
1747 | passwd/shadow, LDAP or smbpasswd based) by default. This means that any | |
1748 | additional access control (disallow specific user specific access etc) must | |
1749 | be done on the underlying file system. | |
1750 | .It Sy sharenfs Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Em opts | |
1751 | Controls whether the file system is shared via NFS, and what options are to be | |
1752 | used. | |
1753 | A file system with a | |
1754 | .Sy sharenfs | |
1755 | property of | |
1756 | .Sy off | |
1757 | is managed with the | |
1758 | .Xr exportfs 8 | |
1759 | command and entries in the | |
1760 | .Em /etc/exports | |
1761 | file. | |
1762 | Otherwise, the file system is automatically shared and unshared with the | |
1763 | .Nm zfs Cm share | |
1764 | and | |
1765 | .Nm zfs Cm unshare | |
1766 | commands. | |
1767 | If the property is set to | |
1768 | .Sy on , | |
1769 | the dataset is shared using the default options: | |
1770 | .Pp | |
1771 | .Em sec=sys,rw,crossmnt,no_subtree_check,no_root_squash | |
1772 | .Pp | |
1773 | See | |
1774 | .Xr exports 5 | |
1775 | for the meaning of the default options. Otherwise, the | |
1776 | .Xr exportfs 8 | |
1777 | command is invoked with options equivalent to the contents of this property. | |
1778 | .Pp | |
1779 | When the | |
1780 | .Sy sharenfs | |
1781 | property is changed for a dataset, the dataset and any children inheriting the | |
1782 | property are re-shared with the new options, only if the property was previously | |
1783 | .Sy off , | |
1784 | or if they were shared before the property was changed. | |
1785 | If the new property is | |
1786 | .Sy off , | |
1787 | the file systems are unshared. | |
1788 | .It Sy logbias Ns = Ns Sy latency Ns | Ns Sy throughput | |
1789 | Provide a hint to ZFS about handling of synchronous requests in this dataset. | |
1790 | If | |
1791 | .Sy logbias | |
1792 | is set to | |
1793 | .Sy latency | |
1794 | .Pq the default , | |
1795 | ZFS will use pool log devices | |
1796 | .Pq if configured | |
1797 | to handle the requests at low latency. | |
1798 | If | |
1799 | .Sy logbias | |
1800 | is set to | |
1801 | .Sy throughput , | |
1802 | ZFS will not use configured pool log devices. | |
1803 | ZFS will instead optimize synchronous operations for global pool throughput and | |
1804 | efficient use of resources. | |
1805 | .It Sy snapdev Ns = Ns Sy hidden Ns | Ns Sy visible | |
1806 | Controls whether the volume snapshot devices under | |
1807 | .Em /dev/zvol/<pool> | |
1808 | are hidden or visible. The default value is | |
1809 | .Sy hidden . | |
1810 | .It Sy snapdir Ns = Ns Sy hidden Ns | Ns Sy visible | |
1811 | Controls whether the | |
1812 | .Pa .zfs | |
1813 | directory is hidden or visible in the root of the file system as discussed in | |
1814 | the | |
1815 | .Sx Snapshots | |
1816 | section. | |
1817 | The default value is | |
1818 | .Sy hidden . | |
1819 | .It Sy sync Ns = Ns Sy standard Ns | Ns Sy always Ns | Ns Sy disabled | |
1820 | Controls the behavior of synchronous requests | |
1821 | .Pq e.g. fsync, O_DSYNC . | |
1822 | .Sy standard | |
1823 | is the | |
1824 | .Tn POSIX | |
1825 | specified behavior of ensuring all synchronous requests are written to stable | |
1826 | storage and all devices are flushed to ensure data is not cached by device | |
1827 | controllers | |
1828 | .Pq this is the default . | |
1829 | .Sy always | |
330d06f9 | 1830 | causes every file system transaction to be written and flushed before its |
44f09cdc BB |
1831 | system call returns. |
1832 | This has a large performance penalty. | |
1833 | .Sy disabled | |
1834 | disables synchronous requests. | |
1835 | File system transactions are only committed to stable storage periodically. | |
1836 | This option will give the highest performance. | |
330d06f9 | 1837 | However, it is very dangerous as ZFS would be ignoring the synchronous |
44f09cdc BB |
1838 | transaction demands of applications such as databases or NFS. |
1839 | Administrators should only use this option when the risks are understood. | |
1840 | .It Sy version Ns = Ns Em N Ns | Ns Sy current | |
1841 | The on-disk version of this file system, which is independent of the pool | |
1842 | version. | |
1843 | This property can only be set to later supported versions. | |
1844 | See the | |
1845 | .Nm zfs Cm upgrade | |
1846 | command. | |
1847 | .It Sy volsize Ns = Ns Em size | |
1848 | For volumes, specifies the logical size of the volume. | |
1849 | By default, creating a volume establishes a reservation of equal size. | |
1850 | For storage pools with a version number of 9 or higher, a | |
1851 | .Sy refreservation | |
1852 | is set instead. | |
1853 | Any changes to | |
1854 | .Sy volsize | |
1855 | are reflected in an equivalent change to the reservation | |
1856 | .Po or | |
1857 | .Sy refreservation | |
1858 | .Pc . | |
1859 | The | |
1860 | .Sy volsize | |
1861 | can only be set to a multiple of | |
1862 | .Sy volblocksize , | |
1863 | and cannot be zero. | |
1864 | .Pp | |
1865 | The reservation is kept equal to the volume's logical size to prevent unexpected | |
1866 | behavior for consumers. | |
1867 | Without the reservation, the volume could run out of space, resulting in | |
1868 | undefined behavior or data corruption, depending on how the volume is used. | |
1869 | These effects can also occur when the volume size is changed while it is in use | |
1870 | .Pq particularly when shrinking the size . | |
1871 | Extreme care should be used when adjusting the volume size. | |
1872 | .Pp | |
1873 | Though not recommended, a | |
1874 | .Qq sparse volume | |
1875 | .Po also known as | |
1876 | .Qq thin provisioning | |
1877 | .Pc | |
1878 | can be created by specifying the | |
1879 | .Fl s | |
1880 | option to the | |
1881 | .Nm zfs Cm create Fl V | |
1882 | command, or by changing the reservation after the volume has been created. | |
1883 | A | |
1884 | .Qq sparse volume | |
1885 | is a volume where the reservation is less then the volume size. | |
1886 | Consequently, writes to a sparse volume can fail with | |
1887 | .Er ENOSPC | |
1888 | when the pool is low on space. | |
1889 | For a sparse volume, changes to | |
1890 | .Sy volsize | |
1891 | are not reflected in the reservation. | |
cf8738d8 | 1892 | .It Sy volmode Ns = Ns Cm default | full | geom | dev | none |
1893 | This property specifies how volumes should be exposed to the OS. | |
1894 | Setting it to | |
1895 | .Sy full | |
1896 | exposes volumes as fully fledged block devices, providing maximal | |
1897 | functionality. The value | |
1898 | .Sy geom | |
1899 | is just an alias for | |
1900 | .Sy full | |
1901 | and is kept for compatibility. | |
1902 | Setting it to | |
1903 | .Sy dev | |
1904 | hides its partitions. | |
1905 | Volumes with property set to | |
1906 | .Sy none | |
1907 | are not exposed outside ZFS, but can be snapshoted, cloned, replicated, etc, | |
1908 | that can be suitable for backup purposes. | |
1909 | Value | |
1910 | .Sy default | |
1911 | means that volumes exposition is controlled by system-wide tunable | |
1912 | .Va zvol_volmode , | |
1913 | where | |
1914 | .Sy full , | |
1915 | .Sy dev | |
1916 | and | |
1917 | .Sy none | |
1918 | are encoded as 1, 2 and 3 respectively. | |
1919 | The default values is | |
1920 | .Sy full . | |
44f09cdc BB |
1921 | .It Sy vscan Ns = Ns Sy on Ns | Ns Sy off |
1922 | Controls whether regular files should be scanned for viruses when a file is | |
1923 | opened and closed. | |
1924 | In addition to enabling this property, the virus scan service must also be | |
1925 | enabled for virus scanning to occur. | |
1926 | The default value is | |
1927 | .Sy off . | |
6a107f41 | 1928 | This property is not used on Linux. |
44f09cdc BB |
1929 | .It Sy xattr Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy sa |
1930 | Controls whether extended attributes are enabled for this file system. Two | |
7c2448a3 BB |
1931 | styles of extended attributes are supported either directory based or system |
1932 | attribute based. | |
44f09cdc BB |
1933 | .Pp |
1934 | The default value of | |
1935 | .Sy on | |
1936 | enables directory based extended attributes. This style of extended attribute | |
1937 | imposes no practical limit on either the size or number of attributes which | |
1938 | can be set on a file. Although under Linux the | |
1939 | .Xr getxattr 2 | |
1940 | and | |
1941 | .Xr setxattr 2 | |
1942 | system calls limit the maximum size to 64K. This is the most compatible | |
1943 | style of extended attribute and is supported by all OpenZFS implementations. | |
1944 | .Pp | |
1945 | System attribute based xattrs can be enabled by setting the value to | |
1946 | .Sy sa . | |
1947 | The key advantage of this type of xattr is improved performance. Storing | |
1948 | extended attributes as system attributes significantly decreases the amount of | |
1949 | disk IO required. Up to 64K of data may be stored per-file in the space | |
1950 | reserved for system attributes. If there is not enough space available for | |
1951 | an extended attribute then it will be automatically written as a directory | |
1952 | based xattr. System attribute based extended attributes are not accessible | |
1953 | on platforms which do not support the | |
1954 | .Sy xattr=sa | |
1955 | feature. | |
1956 | .Pp | |
7c2448a3 | 1957 | The use of system attribute based xattrs is strongly encouraged for users of |
44f09cdc BB |
1958 | SELinux or posix ACLs. Both of these features heavily rely of extended |
1959 | attributes and benefit significantly from the reduced access time. | |
1960 | .Pp | |
1961 | The values | |
1962 | .Sy on | |
1963 | and | |
1964 | .Sy off | |
1965 | are equivalent to the | |
1966 | .Sy xattr | |
1967 | and | |
1968 | .Sy noxattr | |
1969 | mount options. | |
1970 | .It Sy zoned Ns = Ns Sy on Ns | Ns Sy off | |
1971 | Controls whether the dataset is managed from a non-global zone. Zones are a | |
1972 | Solaris feature and are not relevant on Linux. The default value is | |
1973 | .Sy off . | |
1974 | .El | |
1975 | .Pp | |
1976 | The following three properties cannot be changed after the file system is | |
1977 | created, and therefore, should be set when the file system is created. | |
1978 | If the properties are not set with the | |
1979 | .Nm zfs Cm create | |
1980 | or | |
1981 | .Nm zpool Cm create | |
1982 | commands, these properties are inherited from the parent dataset. | |
1983 | If the parent dataset lacks these properties due to having been created prior to | |
1984 | these features being supported, the new file system will have the default values | |
1985 | for these properties. | |
1986 | .Bl -tag -width "" | |
1987 | .It Xo | |
1988 | .Sy casesensitivity Ns = Ns Sy sensitive Ns | Ns | |
1989 | .Sy insensitive Ns | Ns Sy mixed | |
1990 | .Xc | |
1991 | Indicates whether the file name matching algorithm used by the file system | |
1992 | should be case-sensitive, case-insensitive, or allow a combination of both | |
1993 | styles of matching. | |
1994 | The default value for the | |
1995 | .Sy casesensitivity | |
1996 | property is | |
1997 | .Sy sensitive . | |
1998 | Traditionally, | |
1999 | .Ux | |
2000 | and | |
2001 | .Tn POSIX | |
2002 | file systems have case-sensitive file names. | |
2003 | .Pp | |
2004 | The | |
2005 | .Sy mixed | |
2006 | value for the | |
2007 | .Sy casesensitivity | |
2008 | property indicates that the file system can support requests for both | |
2009 | case-sensitive and case-insensitive matching behavior. | |
2010 | Currently, case-insensitive matching behavior on a file system that supports | |
2011 | mixed behavior is limited to the SMB server product. | |
2012 | For more information about the | |
2013 | .Sy mixed | |
2014 | value behavior, see the "ZFS Administration Guide". | |
2015 | .It Xo | |
2016 | .Sy normalization Ns = Ns Sy none Ns | Ns Sy formC Ns | Ns | |
2017 | .Sy formD Ns | Ns Sy formKC Ns | Ns Sy formKD | |
2018 | .Xc | |
2019 | Indicates whether the file system should perform a | |
2020 | .Sy unicode | |
2021 | normalization of file names whenever two file names are compared, and which | |
2022 | normalization algorithm should be used. | |
2023 | File names are always stored unmodified, names are normalized as part of any | |
2024 | comparison process. | |
2025 | If this property is set to a legal value other than | |
2026 | .Sy none , | |
2027 | and the | |
2028 | .Sy utf8only | |
2029 | property was left unspecified, the | |
2030 | .Sy utf8only | |
2031 | property is automatically set to | |
2032 | .Sy on . | |
2033 | The default value of the | |
2034 | .Sy normalization | |
2035 | property is | |
2036 | .Sy none . | |
8fd888ba | 2037 | This property cannot be changed after the file system is created. |
44f09cdc BB |
2038 | .It Sy utf8only Ns = Ns Sy on Ns | Ns Sy off |
2039 | Indicates whether the file system should reject file names that include | |
2040 | characters that are not present in the | |
2041 | .Sy UTF-8 | |
2042 | character code set. | |
2043 | If this property is explicitly set to | |
2044 | .Sy off , | |
2045 | the normalization property must either not be explicitly set or be set to | |
2046 | .Sy none . | |
2047 | The default value for the | |
2048 | .Sy utf8only | |
2049 | property is | |
2050 | .Sy off . | |
8fd888ba | 2051 | This property cannot be changed after the file system is created. |
44f09cdc BB |
2052 | .El |
2053 | .Pp | |
2054 | The | |
2055 | .Sy casesensitivity , | |
2056 | .Sy normalization , | |
2057 | and | |
2058 | .Sy utf8only | |
2059 | properties are also new permissions that can be assigned to non-privileged users | |
2060 | by using the ZFS delegated administration feature. | |
2061 | .Ss "Temporary Mount Point Properties" | |
2062 | When a file system is mounted, either through | |
2063 | .Xr mount 8 | |
2064 | for legacy mounts or the | |
2065 | .Nm zfs Cm mount | |
2066 | command for normal file systems, its mount options are set according to its | |
2067 | properties. | |
2068 | The correlation between properties and mount options is as follows: | |
2069 | .Bd -literal | |
058ac9ba | 2070 | PROPERTY MOUNT OPTION |
44f09cdc BB |
2071 | atime atime/noatime |
2072 | canmount auto/noauto | |
2073 | devices dev/nodev | |
2074 | exec exec/noexec | |
2075 | readonly ro/rw | |
2076 | relatime relatime/norelatime | |
2077 | setuid suid/nosuid | |
2078 | xattr xattr/noxattr | |
2079 | .Ed | |
2080 | .Pp | |
2081 | In addition, these options can be set on a per-mount basis using the | |
2082 | .Fl o | |
2083 | option, without affecting the property that is stored on disk. | |
2084 | The values specified on the command line override the values stored in the | |
2085 | dataset. | |
2086 | The | |
2087 | .Sy nosuid | |
2088 | option is an alias for | |
d7323e79 | 2089 | .Sy nodevices Ns \&, Ns Sy nosetuid . |
44f09cdc BB |
2090 | These properties are reported as |
2091 | .Qq temporary | |
2092 | by the | |
2093 | .Nm zfs Cm get | |
2094 | command. | |
2095 | If the properties are changed while the dataset is mounted, the new setting | |
2096 | overrides any temporary settings. | |
2097 | .Ss "User Properties" | |
2098 | In addition to the standard native properties, ZFS supports arbitrary user | |
2099 | properties. | |
2100 | User properties have no effect on ZFS behavior, but applications or | |
2101 | administrators can use them to annotate datasets | |
2102 | .Pq file systems, volumes, and snapshots . | |
2103 | .Pp | |
2104 | User property names must contain a colon | |
2105 | .Pq Qq Sy \&: | |
2106 | character to distinguish them from native properties. | |
2107 | They may contain lowercase letters, numbers, and the following punctuation | |
2108 | characters: colon | |
2109 | .Pq Qq Sy \&: , | |
2110 | dash | |
2111 | .Pq Qq Sy - , | |
2112 | period | |
2113 | .Pq Qq Sy \&. , | |
2114 | and underscore | |
2115 | .Pq Qq Sy _ . | |
2116 | The expected convention is that the property name is divided into two portions | |
2117 | such as | |
d7323e79 | 2118 | .Em module Ns \&: Ns Em property , |
44f09cdc BB |
2119 | but this namespace is not enforced by ZFS. |
2120 | User property names can be at most 256 characters, and cannot begin with a dash | |
2121 | .Pq Qq Sy - . | |
2122 | .Pp | |
2123 | When making programmatic use of user properties, it is strongly suggested to use | |
2124 | a reversed | |
2125 | .Sy DNS | |
2126 | domain name for the | |
2127 | .Em module | |
2128 | component of property names to reduce the chance that two | |
2129 | independently-developed packages use the same property name for different | |
2130 | purposes. | |
2131 | .Pp | |
2132 | The values of user properties are arbitrary strings, are always inherited, and | |
2133 | are never validated. | |
2134 | All of the commands that operate on properties | |
2135 | .Po Nm zfs Cm list , | |
2136 | .Nm zfs Cm get , | |
2137 | .Nm zfs Cm set , | |
2138 | and so forth | |
2139 | .Pc | |
2140 | can be used to manipulate both native properties and user properties. | |
2141 | Use the | |
2142 | .Nm zfs Cm inherit | |
2143 | command to clear a user property. | |
2144 | If the property is not defined in any parent dataset, it is removed entirely. | |
2145 | Property values are limited to 8192 bytes. | |
2146 | .Ss ZFS Volumes as Swap | |
2147 | ZFS volumes may be used as swap devices. After creating the volume with the | |
2148 | .Nm zfs Cm create Fl V | |
2149 | command set up and enable the swap area using the | |
2150 | .Xr mkswap 8 | |
2151 | and | |
2152 | .Xr swapon 8 | |
2153 | commands. Do not swap to a file on a ZFS file system. A ZFS swap file | |
2154 | configuration is not supported. | |
b5256303 TC |
2155 | .Ss Encryption |
2156 | Enabling the | |
2157 | .Sy encryption | |
2158 | feature allows for the creation of encrypted filesystems and volumes. | |
2159 | .Nm | |
2160 | will encrypt all user data including file and zvol data, file attributes, | |
2161 | ACLs, permission bits, directory listings, FUID mappings, and userused / | |
2162 | groupused data. | |
2163 | .Nm | |
2164 | will not encrypt metadata related to the pool structure, including dataset | |
2165 | names, dataset hierarchy, file size, file holes, and dedup tables. Key rotation | |
2166 | is managed internally by the kernel module and changing the user's key does not | |
2167 | require re-encrypting the entire dataset. Datasets can be scrubbed, resilvered, | |
2168 | renamed, and deleted without the encryption keys being loaded (see the | |
2169 | .Nm zfs Cm load-key | |
2170 | subcommand for more info on key loading). | |
2171 | .Pp | |
2172 | Creating an encrypted dataset requires specifying the | |
2173 | .Sy encryption | |
2174 | and | |
2175 | .Sy keyformat | |
2176 | properties at creation time, along with an optional | |
2177 | .Sy | |
2178 | keylocation | |
2179 | and | |
2180 | .Sy pbkdf2iters . | |
2181 | After entering an encryption key, the | |
2182 | created dataset will become an encryption root. Any descendant datasets will | |
2183 | inherit their encryption key from the encryption root, meaning that loading, | |
2184 | unloading, or changing the key for the encryption root will implicitly do the | |
2185 | same for all inheriting datasets. If this inheritence is not desired, simply | |
2186 | supply a new | |
2187 | .Sy encryption | |
2188 | and | |
2189 | .Sy keyformat | |
2190 | when creating the child dataset or use | |
2191 | .Nm zfs Cm change-key | |
2192 | to break the relationship. The one exception is that clones will always use | |
2193 | their origin's encryption key. Encryption root inheritence can be tracked via | |
2194 | the read-only | |
2195 | .Sy encryptionroot | |
2196 | property. | |
2197 | .Pp | |
2198 | Encryption changes the behavior of a few | |
2199 | .Nm | |
2200 | operations. Encryption is applied after compression so compression ratios are | |
2201 | preserved. Normally checksums in ZFS are 256 bits long, but for encrypted data | |
2202 | the checksum is 128 bits of the user-chosen checksum and 128 bits of MAC from | |
2203 | the encryption suite, which provides additional protection against maliciously | |
2204 | altered data. Deduplication is still possible with encryption enabled but for | |
2205 | security, datasets will only dedup against themselves, their snapshots, and | |
2206 | their clones. | |
2207 | .Pp | |
2208 | There are a few limitations on encrypted datasets. Encrypted data cannot be | |
2209 | embedded via the | |
2210 | .Sy embedded_data | |
2211 | feature. Encrypted datasets may not have | |
2212 | .Sy copies Ns = Ns Em 3 | |
2213 | since the implementation stores some encryption metadata where the third copy | |
2214 | would normally be. Since compression is applied before encryption datasets may | |
2215 | be vulnerable to a CRIME-like attack if applications accessing the data allow | |
2216 | for it. Deduplication with encryption will leak information about which blocks | |
2217 | are equivalent in a dataset and will incur an extra CPU cost per block written. | |
44f09cdc BB |
2218 | .Sh SUBCOMMANDS |
2219 | All subcommands that modify state are logged persistently to the pool in their | |
2220 | original form. | |
2221 | .Bl -tag -width "" | |
2222 | .It Nm Fl ? | |
058ac9ba | 2223 | Displays a help message. |
44f09cdc BB |
2224 | .It Xo |
2225 | .Nm | |
2226 | .Cm create | |
2227 | .Op Fl p | |
2228 | .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... | |
2229 | .Ar filesystem | |
2230 | .Xc | |
2231 | Creates a new ZFS file system. | |
2232 | The file system is automatically mounted according to the | |
2233 | .Sy mountpoint | |
2234 | property inherited from the parent. | |
2235 | .Bl -tag -width "-o" | |
2236 | .It Fl o Ar property Ns = Ns Ar value | |
2237 | Sets the specified property as if the command | |
2238 | .Nm zfs Cm set Ar property Ns = Ns Ar value | |
2239 | was invoked at the same time the dataset was created. | |
2240 | Any editable ZFS property can also be set at creation time. | |
2241 | Multiple | |
2242 | .Fl o | |
2243 | options can be specified. | |
2244 | An error results if the same property is specified in multiple | |
2245 | .Fl o | |
2246 | options. | |
2247 | .It Fl p | |
2248 | Creates all the non-existing parent datasets. | |
2249 | Datasets created in this manner are automatically mounted according to the | |
2250 | .Sy mountpoint | |
2251 | property inherited from their parent. | |
2252 | Any property specified on the command line using the | |
2253 | .Fl o | |
2254 | option is ignored. | |
2255 | If the target filesystem already exists, the operation completes successfully. | |
2256 | .El | |
2257 | .It Xo | |
2258 | .Nm | |
2259 | .Cm create | |
2260 | .Op Fl ps | |
2261 | .Op Fl b Ar blocksize | |
2262 | .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... | |
2263 | .Fl V Ar size Ar volume | |
2264 | .Xc | |
2265 | Creates a volume of the given size. | |
2266 | The volume is exported as a block device in | |
2267 | .Pa /dev/zvol/path , | |
2268 | where | |
2269 | .Em path | |
2270 | is the name of the volume in the ZFS namespace. | |
2271 | The size represents the logical size as exported by the device. | |
2272 | By default, a reservation of equal size is created. | |
2273 | .Pp | |
2274 | .Ar size | |
2275 | is automatically rounded up to the nearest 128 Kbytes to ensure that the volume | |
2276 | has an integral number of blocks regardless of | |
2277 | .Sy blocksize . | |
2278 | .Bl -tag -width "-b" | |
2279 | .It Fl b Ar blocksize | |
2280 | Equivalent to | |
2281 | .Fl o Sy volblocksize Ns = Ns Ar blocksize . | |
2282 | If this option is specified in conjunction with | |
2283 | .Fl o Sy volblocksize , | |
2284 | the resulting behavior is undefined. | |
2285 | .It Fl o Ar property Ns = Ns Ar value | |
2286 | Sets the specified property as if the | |
2287 | .Nm zfs Cm set Ar property Ns = Ns Ar value | |
2288 | command was invoked at the same time the dataset was created. | |
2289 | Any editable ZFS property can also be set at creation time. | |
2290 | Multiple | |
2291 | .Fl o | |
2292 | options can be specified. | |
2293 | An error results if the same property is specified in multiple | |
2294 | .Fl o | |
2295 | options. | |
2296 | .It Fl p | |
2297 | Creates all the non-existing parent datasets. | |
2298 | Datasets created in this manner are automatically mounted according to the | |
2299 | .Sy mountpoint | |
2300 | property inherited from their parent. | |
2301 | Any property specified on the command line using the | |
2302 | .Fl o | |
2303 | option is ignored. | |
2304 | If the target filesystem already exists, the operation completes successfully. | |
2305 | .It Fl s | |
2306 | Creates a sparse volume with no reservation. | |
2307 | See | |
2308 | .Sy volsize | |
2309 | in the | |
2310 | .Sx Native Properties | |
2311 | section for more information about sparse volumes. | |
2312 | .El | |
2313 | .It Xo | |
2314 | .Nm | |
2315 | .Cm destroy | |
2316 | .Op Fl Rfnprv | |
2317 | .Ar filesystem Ns | Ns Ar volume | |
2318 | .Xc | |
2319 | Destroys the given dataset. | |
2320 | By default, the command unshares any file systems that are currently shared, | |
2321 | unmounts any file systems that are currently mounted, and refuses to destroy a | |
2322 | dataset that has active dependents | |
2323 | .Pq children or clones . | |
2324 | .Bl -tag -width "-R" | |
2325 | .It Fl R | |
2326 | Recursively destroy all dependents, including cloned file systems outside the | |
2327 | target hierarchy. | |
2328 | .It Fl f | |
2329 | Force an unmount of any file systems using the | |
2330 | .Nm unmount Fl f | |
2331 | command. | |
2332 | This option has no effect on non-file systems or unmounted file systems. | |
2333 | .It Fl n | |
2334 | Do a dry-run | |
2335 | .Pq Qq No-op | |
2336 | deletion. | |
2337 | No data will be deleted. | |
2338 | This is useful in conjunction with the | |
2339 | .Fl v | |
2340 | or | |
2341 | .Fl p | |
2342 | flags to determine what data would be deleted. | |
2343 | .It Fl p | |
330d06f9 | 2344 | Print machine-parsable verbose information about the deleted data. |
44f09cdc BB |
2345 | .It Fl r |
2346 | Recursively destroy all children. | |
2347 | .It Fl v | |
330d06f9 | 2348 | Print verbose information about the deleted data. |
44f09cdc BB |
2349 | .El |
2350 | .Pp | |
2351 | Extreme care should be taken when applying either the | |
2352 | .Fl r | |
2353 | or the | |
2354 | .Fl R | |
2355 | options, as they can destroy large portions of a pool and cause unexpected | |
2356 | behavior for mounted file systems in use. | |
2357 | .It Xo | |
2358 | .Nm | |
2359 | .Cm destroy | |
2360 | .Op Fl Rdnprv | |
2361 | .Ar filesystem Ns | Ns Ar volume Ns @ Ns Ar snap Ns | |
2362 | .Oo % Ns Ar snap Ns Oo , Ns Ar snap Ns Oo % Ns Ar snap Oc Oc Oc Ns ... | |
2363 | .Xc | |
2364 | The given snapshots are destroyed immediately if and only if the | |
2365 | .Nm zfs Cm destroy | |
2366 | command without the | |
2367 | .Fl d | |
2368 | option would have destroyed it. | |
2369 | Such immediate destruction would occur, for example, if the snapshot had no | |
2370 | clones and the user-initiated reference count were zero. | |
2371 | .Pp | |
2372 | If a snapshot does not qualify for immediate destruction, it is marked for | |
2373 | deferred deletion. | |
2374 | In this state, it exists as a usable, visible snapshot until both of the | |
2375 | preconditions listed above are met, at which point it is destroyed. | |
2376 | .Pp | |
2377 | An inclusive range of snapshots may be specified by separating the first and | |
2378 | last snapshots with a percent sign. | |
330d06f9 MA |
2379 | The first and/or last snapshots may be left blank, in which case the |
2380 | filesystem's oldest or newest snapshot will be implied. | |
44f09cdc | 2381 | .Pp |
330d06f9 | 2382 | Multiple snapshots |
44f09cdc BB |
2383 | .Pq or ranges of snapshots |
2384 | of the same filesystem or volume may be specified in a comma-separated list of | |
2385 | snapshots. | |
2386 | Only the snapshot's short name | |
2387 | .Po the part after the | |
2388 | .Sy @ | |
2389 | .Pc | |
2390 | should be specified when using a range or comma-separated list to identify | |
2391 | multiple snapshots. | |
2392 | .Bl -tag -width "-R" | |
2393 | .It Fl R | |
13fe0198 | 2394 | Recursively destroy all clones of these snapshots, including the clones, |
44f09cdc BB |
2395 | snapshots, and children. |
2396 | If this flag is specified, the | |
2397 | .Fl d | |
2398 | flag will have no effect. | |
2399 | .It Fl d | |
2400 | Defer snapshot deletion. | |
2401 | .It Fl n | |
2402 | Do a dry-run | |
2403 | .Pq Qq No-op | |
2404 | deletion. | |
2405 | No data will be deleted. | |
2406 | This is useful in conjunction with the | |
2407 | .Fl p | |
2408 | or | |
2409 | .Fl v | |
2410 | flags to determine what data would be deleted. | |
2411 | .It Fl p | |
330d06f9 | 2412 | Print machine-parsable verbose information about the deleted data. |
44f09cdc BB |
2413 | .It Fl r |
2414 | Destroy | |
2415 | .Pq or mark for deferred deletion | |
2416 | all snapshots with this name in descendent file systems. | |
2417 | .It Fl v | |
330d06f9 | 2418 | Print verbose information about the deleted data. |
44f09cdc BB |
2419 | .Pp |
2420 | Extreme care should be taken when applying either the | |
2421 | .Fl r | |
2422 | or the | |
2423 | .Fl R | |
330d06f9 MA |
2424 | options, as they can destroy large portions of a pool and cause unexpected |
2425 | behavior for mounted file systems in use. | |
44f09cdc BB |
2426 | .El |
2427 | .It Xo | |
2428 | .Nm | |
2429 | .Cm destroy | |
2430 | .Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark | |
2431 | .Xc | |
da536844 | 2432 | The given bookmark is destroyed. |
44f09cdc BB |
2433 | .It Xo |
2434 | .Nm | |
2435 | .Cm snapshot | |
2436 | .Op Fl r | |
2437 | .Oo Fl o Ar property Ns = Ns value Oc Ns ... | |
2438 | .Ar filesystem Ns @ Ns Ar snapname Ns | Ns Ar volume Ns @ Ns Ar snapname Ns ... | |
2439 | .Xc | |
2440 | Creates snapshots with the given names. | |
2441 | All previous modifications by successful system calls to the file system are | |
2442 | part of the snapshots. | |
2443 | Snapshots are taken atomically, so that all snapshots correspond to the same | |
2444 | moment in time. | |
2445 | See the | |
2446 | .Sx Snapshots | |
2447 | section for details. | |
2448 | .Bl -tag -width "-o" | |
2449 | .It Fl o Ar property Ns = Ns Ar value | |
2450 | Sets the specified property; see | |
2451 | .Nm zfs Cm create | |
2452 | for details. | |
2453 | .It Fl r | |
2454 | Recursively create snapshots of all descendent datasets | |
2455 | .El | |
2456 | .It Xo | |
2457 | .Nm | |
2458 | .Cm rollback | |
2459 | .Op Fl Rfr | |
2460 | .Ar snapshot | |
2461 | .Xc | |
2462 | Roll back the given dataset to a previous snapshot. | |
2463 | When a dataset is rolled back, all data that has changed since the snapshot is | |
2464 | discarded, and the dataset reverts to the state at the time of the snapshot. | |
2465 | By default, the command refuses to roll back to a snapshot other than the most | |
2466 | recent one. | |
2467 | In order to do so, all intermediate snapshots and bookmarks must be destroyed by | |
2468 | specifying the | |
2469 | .Fl r | |
2470 | option. | |
2471 | .Pp | |
2472 | The | |
2473 | .Fl rR | |
2474 | options do not recursively destroy the child snapshots of a recursive snapshot. | |
2475 | Only direct snapshots of the specified filesystem are destroyed by either of | |
2476 | these options. | |
2477 | To completely roll back a recursive snapshot, you must rollback the individual | |
2478 | child snapshots. | |
2479 | .Bl -tag -width "-R" | |
2480 | .It Fl R | |
2481 | Destroy any more recent snapshots and bookmarks, as well as any clones of those | |
2482 | snapshots. | |
2483 | .It Fl f | |
2484 | Used with the | |
2485 | .Fl R | |
2486 | option to force an unmount of any clone file systems that are to be destroyed. | |
2487 | .It Fl r | |
da536844 | 2488 | Destroy any snapshots and bookmarks more recent than the one specified. |
44f09cdc BB |
2489 | .El |
2490 | .It Xo | |
2491 | .Nm | |
2492 | .Cm clone | |
2493 | .Op Fl p | |
2494 | .Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... | |
2495 | .Ar snapshot Ar filesystem Ns | Ns Ar volume | |
2496 | .Xc | |
2497 | Creates a clone of the given snapshot. | |
2498 | See the | |
2499 | .Sx Clones | |
2500 | section for details. | |
2501 | The target dataset can be located anywhere in the ZFS hierarchy, and is created | |
2502 | as the same type as the original. | |
2503 | .Bl -tag -width "-o" | |
2504 | .It Fl o Ar property Ns = Ns Ar value | |
2505 | Sets the specified property; see | |
2506 | .Nm zfs Cm create | |
2507 | for details. | |
2508 | .It Fl p | |
2509 | Creates all the non-existing parent datasets. | |
2510 | Datasets created in this manner are automatically mounted according to the | |
2511 | .Sy mountpoint | |
2512 | property inherited from their parent. | |
2513 | If the target filesystem or volume already exists, the operation completes | |
2514 | successfully. | |
2515 | .El | |
2516 | .It Xo | |
2517 | .Nm | |
2518 | .Cm promote | |
2519 | .Ar clone-filesystem | |
2520 | .Xc | |
2521 | Promotes a clone file system to no longer be dependent on its | |
2522 | .Qq origin | |
2523 | snapshot. | |
2524 | This makes it possible to destroy the file system that the clone was created | |
2525 | from. | |
2526 | The clone parent-child dependency relationship is reversed, so that the origin | |
2527 | file system becomes a clone of the specified file system. | |
2528 | .Pp | |
2529 | The snapshot that was cloned, and any snapshots previous to this snapshot, are | |
2530 | now owned by the promoted clone. | |
2531 | The space they use moves from the origin file system to the promoted clone, so | |
2532 | enough space must be available to accommodate these snapshots. | |
2533 | No new space is consumed by this operation, but the space accounting is | |
2534 | adjusted. | |
2535 | The promoted clone must not have any conflicting snapshot names of its own. | |
2536 | The | |
2537 | .Cm rename | |
2538 | subcommand can be used to rename any conflicting snapshots. | |
2539 | .It Xo | |
2540 | .Nm | |
2541 | .Cm rename | |
2542 | .Op Fl f | |
2543 | .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot | |
2544 | .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot | |
2545 | .Xc | |
2546 | .It Xo | |
2547 | .Nm | |
2548 | .Cm rename | |
2549 | .Op Fl fp | |
2550 | .Ar filesystem Ns | Ns Ar volume | |
2551 | .Ar filesystem Ns | Ns Ar volume | |
2552 | .Xc | |
2553 | Renames the given dataset. | |
2554 | The new target can be located anywhere in the ZFS hierarchy, with the exception | |
2555 | of snapshots. | |
2556 | Snapshots can only be renamed within the parent file system or volume. | |
2557 | When renaming a snapshot, the parent file system of the snapshot does not need | |
2558 | to be specified as part of the second argument. | |
2559 | Renamed file systems can inherit new mount points, in which case they are | |
2560 | unmounted and remounted at the new mount point. | |
2561 | .Bl -tag -width "-a" | |
2562 | .It Fl f | |
db49968e | 2563 | Force unmount any filesystems that need to be unmounted in the process. |
44f09cdc BB |
2564 | .It Fl p |
2565 | Creates all the nonexistent parent datasets. | |
2566 | Datasets created in this manner are automatically mounted according to the | |
2567 | .Sy mountpoint | |
2568 | property inherited from their parent. | |
2569 | .El | |
2570 | .It Xo | |
2571 | .Nm | |
2572 | .Cm rename | |
2573 | .Fl r | |
2574 | .Ar snapshot Ar snapshot | |
2575 | .Xc | |
2576 | Recursively rename the snapshots of all descendent datasets. | |
2577 | Snapshots are the only dataset that can be renamed recursively. | |
2578 | .It Xo | |
2579 | .Nm | |
2580 | .Cm list | |
2581 | .Op Fl r Ns | Ns Fl d Ar depth | |
2582 | .Op Fl Hp | |
2583 | .Oo Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... Oc | |
2584 | .Oo Fl s Ar property Oc Ns ... | |
2585 | .Oo Fl S Ar property Oc Ns ... | |
2586 | .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc | |
2587 | .Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Oc Ns ... | |
2588 | .Xc | |
2589 | Lists the property information for the given datasets in tabular form. | |
2590 | If specified, you can list property information by the absolute pathname or the | |
2591 | relative pathname. | |
2592 | By default, all file systems and volumes are displayed. | |
2593 | Snapshots are displayed if the | |
2594 | .Sy listsnaps | |
2595 | property is | |
2596 | .Sy on | |
2597 | .Po the default is | |
2598 | .Sy off | |
2599 | .Pc . | |
2600 | The following fields are displayed, | |
d7323e79 | 2601 | .Sy name Ns \&, Ns Sy used Ns \&, Ns Sy available Ns \&, Ns Sy referenced Ns \&, Ns |
44f09cdc BB |
2602 | .Sy mountpoint . |
2603 | .Bl -tag -width "-H" | |
2604 | .It Fl H | |
2605 | Used for scripting mode. | |
2606 | Do not print headers and separate fields by a single tab instead of arbitrary | |
2607 | white space. | |
2608 | .It Fl S Ar property | |
2609 | Same as the | |
2610 | .Fl s | |
2611 | option, but sorts by property in descending order. | |
2612 | .It Fl d Ar depth | |
2613 | Recursively display any children of the dataset, limiting the recursion to | |
2614 | .Ar depth . | |
2615 | A | |
2616 | .Ar depth | |
2617 | of | |
2618 | .Sy 1 | |
2619 | will display only the dataset and its direct children. | |
2620 | .It Fl o Ar property | |
2621 | A comma-separated list of properties to display. | |
2622 | The property must be: | |
2623 | .Bl -bullet | |
2624 | .It | |
2625 | One of the properties described in the | |
2626 | .Sx Native Properties | |
2627 | section | |
2628 | .It | |
058ac9ba | 2629 | A user property |
44f09cdc BB |
2630 | .It |
2631 | The value | |
2632 | .Sy name | |
2633 | to display the dataset name | |
2634 | .It | |
2635 | The value | |
2636 | .Sy space | |
2637 | to display space usage properties on file systems and volumes. | |
2638 | This is a shortcut for specifying | |
d7323e79 GDN |
2639 | .Fl o Sy name Ns \&, Ns Sy avail Ns \&, Ns Sy used Ns \&, Ns Sy usedsnap Ns \&, Ns |
2640 | .Sy usedds Ns \&, Ns Sy usedrefreserv Ns \&, Ns Sy usedchild Fl t | |
2641 | .Sy filesystem Ns \&, Ns Sy volume | |
44f09cdc BB |
2642 | syntax. |
2643 | .El | |
2644 | .It Fl p | |
2645 | Display numbers in parsable | |
2646 | .Pq exact | |
2647 | values. | |
2648 | .It Fl r | |
2649 | Recursively display any children of the dataset on the command line. | |
2650 | .It Fl s Ar property | |
2651 | A property for sorting the output by column in ascending order based on the | |
2652 | value of the property. | |
2653 | The property must be one of the properties described in the | |
2654 | .Sx Properties | |
2655 | section, or the special value | |
2656 | .Sy name | |
2657 | to sort by the dataset name. | |
2658 | Multiple properties can be specified at one time using multiple | |
2659 | .Fl s | |
2660 | property options. | |
2661 | Multiple | |
2662 | .Fl s | |
2663 | options are evaluated from left to right in decreasing order of importance. | |
058ac9ba | 2664 | The following is a list of sorting criteria: |
44f09cdc BB |
2665 | .Bl -bullet |
2666 | .It | |
058ac9ba | 2667 | Numeric types sort in numeric order. |
44f09cdc | 2668 | .It |
058ac9ba | 2669 | String types sort in alphabetical order. |
44f09cdc BB |
2670 | .It |
2671 | Types inappropriate for a row sort that row to the literal bottom, regardless of | |
2672 | the specified ordering. | |
2673 | .El | |
2674 | .Pp | |
2675 | If no sorting options are specified the existing behavior of | |
2676 | .Nm zfs Cm list | |
2677 | is preserved. | |
2678 | .It Fl t Ar type | |
2679 | A comma-separated list of types to display, where | |
2680 | .Ar type | |
2681 | is one of | |
2682 | .Sy filesystem , | |
2683 | .Sy snapshot , | |
2684 | .Sy volume , | |
2685 | .Sy bookmark , | |
2686 | or | |
2687 | .Sy all . | |
2688 | For example, specifying | |
2689 | .Fl t Sy snapshot | |
2690 | displays only snapshots. | |
2691 | .El | |
2692 | .It Xo | |
2693 | .Nm | |
2694 | .Cm set | |
2695 | .Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ... | |
2696 | .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... | |
2697 | .Xc | |
23de906c | 2698 | Sets the property or list of properties to the given value(s) for each dataset. |
44f09cdc BB |
2699 | Only some properties can be edited. |
2700 | See the | |
2701 | .Sx Properties | |
2702 | section for more information on what properties can be set and acceptable | |
2703 | values. | |
2704 | Numeric values can be specified as exact values, or in a human-readable form | |
2705 | with a suffix of | |
2706 | .Sy B , K , M , G , T , P , E , Z | |
2707 | .Po for bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes, | |
2708 | or zettabytes, respectively | |
2709 | .Pc . | |
2710 | User properties can be set on snapshots. | |
2711 | For more information, see the | |
2712 | .Sx User Properties | |
2713 | section. | |
2714 | .It Xo | |
2715 | .Nm | |
2716 | .Cm get | |
2717 | .Op Fl r Ns | Ns Fl d Ar depth | |
2718 | .Op Fl Hp | |
2719 | .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc | |
2720 | .Oo Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... Oc | |
2721 | .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc | |
2722 | .Cm all | Ar property Ns Oo , Ns Ar property Oc Ns ... | |
2723 | .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns | Ns Ar bookmark Ns ... | |
2724 | .Xc | |
2725 | Displays properties for the given datasets. | |
2726 | If no datasets are specified, then the command displays properties for all | |
2727 | datasets on the system. | |
2728 | For each property, the following columns are displayed: | |
2729 | .Bd -literal | |
058ac9ba | 2730 | name Dataset name |
44f09cdc BB |
2731 | property Property name |
2732 | value Property value | |
2733 | source Property source. Can either be local, default, | |
2734 | temporary, inherited, or none (-). | |
2735 | .Ed | |
2736 | .Pp | |
2737 | All columns are displayed by default, though this can be controlled by using the | |
2738 | .Fl o | |
2739 | option. | |
2740 | This command takes a comma-separated list of properties as described in the | |
2741 | .Sx Native Properties | |
2742 | and | |
2743 | .Sx User Properties | |
2744 | sections. | |
2745 | .Pp | |
2746 | The special value | |
2747 | .Sy all | |
2748 | can be used to display all properties that apply to the given dataset's type | |
2749 | .Pq filesystem, volume, snapshot, or bookmark . | |
2750 | .Bl -tag -width "-H" | |
2751 | .It Fl H | |
2752 | Display output in a form more easily parsed by scripts. | |
2753 | Any headers are omitted, and fields are explicitly separated by a single tab | |
2754 | instead of an arbitrary amount of space. | |
2755 | .It Fl d Ar depth | |
2756 | Recursively display any children of the dataset, limiting the recursion to | |
2757 | .Ar depth . | |
2758 | A depth of | |
2759 | .Sy 1 | |
2760 | will display only the dataset and its direct children. | |
2761 | .It Fl o Ar field | |
2762 | A comma-separated list of columns to display. | |
d7323e79 | 2763 | .Sy name Ns \&, Ns Sy property Ns \&, Ns Sy value Ns \&, Ns Sy source |
44f09cdc BB |
2764 | is the default value. |
2765 | .It Fl p | |
2766 | Display numbers in parsable | |
2767 | .Pq exact | |
2768 | values. | |
2769 | .It Fl r | |
058ac9ba | 2770 | Recursively display properties for any children. |
44f09cdc BB |
2771 | .It Fl s Ar source |
2772 | A comma-separated list of sources to display. | |
2773 | Those properties coming from a source other than those in this list are ignored. | |
2774 | Each source must be one of the following: | |
2775 | .Sy local , | |
2776 | .Sy default , | |
2777 | .Sy inherited , | |
2778 | .Sy temporary , | |
2779 | and | |
2780 | .Sy none . | |
2781 | The default value is all sources. | |
2782 | .It Fl t Ar type | |
2783 | A comma-separated list of types to display, where | |
2784 | .Ar type | |
2785 | is one of | |
2786 | .Sy filesystem , | |
2787 | .Sy snapshot , | |
2788 | .Sy volume , | |
2789 | .Sy bookmark , | |
2790 | or | |
2791 | .Sy all . | |
2792 | .El | |
2793 | .It Xo | |
2794 | .Nm | |
2795 | .Cm inherit | |
2796 | .Op Fl rS | |
2797 | .Ar property Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... | |
2798 | .Xc | |
2799 | Clears the specified property, causing it to be inherited from an ancestor, | |
2800 | restored to default if no ancestor has the property set, or with the | |
2801 | .Fl S | |
2802 | option reverted to the received value if one exists. | |
2803 | See the | |
2804 | .Sx Properties | |
2805 | section for a listing of default values, and details on which properties can be | |
2806 | inherited. | |
2807 | .Bl -tag -width "-r" | |
2808 | .It Fl r | |
058ac9ba | 2809 | Recursively inherit the given property for all children. |
44f09cdc | 2810 | .It Fl S |
0bf8501a | 2811 | Revert the property to the received value if one exists; otherwise operate as |
44f09cdc BB |
2812 | if the |
2813 | .Fl S | |
2814 | option was not specified. | |
2815 | .El | |
2816 | .It Xo | |
2817 | .Nm | |
2818 | .Cm upgrade | |
2819 | .Xc | |
058ac9ba | 2820 | Displays a list of file systems that are not the most recent version. |
44f09cdc BB |
2821 | .It Xo |
2822 | .Nm | |
2823 | .Cm upgrade | |
2824 | .Fl v | |
2825 | .Xc | |
2826 | Displays a list of currently supported file system versions. | |
2827 | .It Xo | |
2828 | .Nm | |
2829 | .Cm upgrade | |
2830 | .Op Fl r | |
2831 | .Op Fl V Ar version | |
2832 | .Fl a | Ar filesystem | |
2833 | .Xc | |
2834 | Upgrades file systems to a new on-disk version. | |
2835 | Once this is done, the file systems will no longer be accessible on systems | |
2836 | running older versions of the software. | |
2837 | .Nm zfs Cm send | |
2838 | streams generated from new snapshots of these file systems cannot be accessed on | |
2839 | systems running older versions of the software. | |
2840 | .Pp | |
2841 | In general, the file system version is independent of the pool version. | |
2842 | See | |
2843 | .Xr zpool 8 | |
2844 | for information on the | |
2845 | .Nm zpool Cm upgrade | |
2846 | command. | |
2847 | .Pp | |
2848 | In some cases, the file system version and the pool version are interrelated and | |
2849 | the pool version must be upgraded before the file system version can be | |
2850 | upgraded. | |
2851 | .Bl -tag -width "-V" | |
2852 | .It Fl V Ar version | |
2853 | Upgrade to the specified | |
2854 | .Ar version . | |
2855 | If the | |
2856 | .Fl V | |
2857 | flag is not specified, this command upgrades to the most recent version. | |
2858 | This | |
2859 | option can only be used to increase the version number, and only up to the most | |
2860 | recent version supported by this software. | |
2861 | .It Fl a | |
2862 | Upgrade all file systems on all imported pools. | |
2863 | .It Ar filesystem | |
2864 | Upgrade the specified file system. | |
2865 | .It Fl r | |
2866 | Upgrade the specified file system and all descendent file systems. | |
2867 | .El | |
2868 | .It Xo | |
2869 | .Nm | |
2870 | .Cm userspace | |
2871 | .Op Fl Hinp | |
2872 | .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc | |
2873 | .Oo Fl s Ar field Oc Ns ... | |
2874 | .Oo Fl S Ar field Oc Ns ... | |
2875 | .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc | |
2876 | .Ar filesystem Ns | Ns Ar snapshot | |
2877 | .Xc | |
2878 | Displays space consumed by, and quotas on, each user in the specified filesystem | |
2879 | or snapshot. | |
2880 | This corresponds to the | |
2881 | .Sy userused@ Ns Em user , | |
2882 | .Sy userobjused@ Ns Em user , | |
2883 | .Sy userquota@ Ns Em user, | |
2884 | and | |
2885 | .Sy userobjquota@ Ns Em user | |
2886 | properties. | |
2887 | .Bl -tag -width "-H" | |
2888 | .It Fl H | |
2889 | Do not print headers, use tab-delimited output. | |
2890 | .It Fl S Ar field | |
2891 | Sort by this field in reverse order. | |
2892 | See | |
2893 | .Fl s . | |
2894 | .It Fl i | |
2895 | Translate SID to POSIX ID. | |
2896 | The POSIX ID may be ephemeral if no mapping exists. | |
2897 | Normal POSIX interfaces | |
2898 | .Po for example, | |
2899 | .Xr stat 2 , | |
2900 | .Nm ls Fl l | |
2901 | .Pc | |
2902 | perform this translation, so the | |
2903 | .Fl i | |
2904 | option allows the output from | |
2905 | .Nm zfs Cm userspace | |
2906 | to be compared directly with those utilities. | |
2907 | However, | |
2908 | .Fl i | |
5990da81 | 2909 | may lead to confusion if some files were created by an SMB user before a |
44f09cdc BB |
2910 | SMB-to-POSIX name mapping was established. |
2911 | In such a case, some files will be owned by the SMB entity and some by the POSIX | |
2912 | entity. | |
2913 | However, the | |
2914 | .Fl i | |
2915 | option will report that the POSIX entity has the total usage and quota for both. | |
2916 | .It Fl n | |
2917 | Print numeric ID instead of user/group name. | |
2918 | .It Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... | |
2919 | Display only the specified fields from the following set: | |
2920 | .Sy type , | |
2921 | .Sy name , | |
2922 | .Sy used , | |
2923 | .Sy quota . | |
2924 | The default is to display all fields. | |
2925 | .It Fl p | |
2926 | Use exact | |
2927 | .Pq parsable | |
2928 | numeric output. | |
2929 | .It Fl s Ar field | |
2930 | Sort output by this field. | |
2931 | The | |
2932 | .Fl s | |
2933 | and | |
2934 | .Fl S | |
2935 | flags may be specified multiple times to sort first by one field, then by | |
2936 | another. | |
2937 | The default is | |
2938 | .Fl s Sy type Fl s Sy name . | |
2939 | .It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... | |
2940 | Print only the specified types from the following set: | |
2941 | .Sy all , | |
2942 | .Sy posixuser , | |
2943 | .Sy smbuser , | |
2944 | .Sy posixgroup , | |
2945 | .Sy smbgroup . | |
2946 | The default is | |
d7323e79 | 2947 | .Fl t Sy posixuser Ns \&, Ns Sy smbuser . |
44f09cdc BB |
2948 | The default can be changed to include group types. |
2949 | .El | |
2950 | .It Xo | |
2951 | .Nm | |
2952 | .Cm groupspace | |
2953 | .Op Fl Hinp | |
2954 | .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc | |
2955 | .Oo Fl s Ar field Oc Ns ... | |
2956 | .Oo Fl S Ar field Oc Ns ... | |
2957 | .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc | |
2958 | .Ar filesystem Ns | Ns Ar snapshot | |
2959 | .Xc | |
5990da81 | 2960 | Displays space consumed by, and quotas on, each group in the specified |
44f09cdc BB |
2961 | filesystem or snapshot. |
2962 | This subcommand is identical to | |
2963 | .Nm zfs Cm userspace , | |
2964 | except that the default types to display are | |
d7323e79 | 2965 | .Fl t Sy posixgroup Ns \&, Ns Sy smbgroup . |
44f09cdc BB |
2966 | .It Xo |
2967 | .Nm | |
2968 | .Cm mount | |
2969 | .Xc | |
2970 | Displays all ZFS file systems currently mounted. | |
2971 | .It Xo | |
2972 | .Nm | |
2973 | .Cm mount | |
b5256303 | 2974 | .Op Fl Olv |
44f09cdc BB |
2975 | .Op Fl o Ar options |
2976 | .Fl a | Ar filesystem | |
2977 | .Xc | |
2978 | Mounts ZFS file systems. | |
2979 | .Bl -tag -width "-O" | |
2980 | .It Fl O | |
2981 | Perform an overlay mount. | |
2982 | See | |
2983 | .Xr mount 8 | |
2984 | for more information. | |
2985 | .It Fl a | |
2986 | Mount all available ZFS file systems. | |
2987 | Invoked automatically as part of the boot process. | |
2988 | .It Ar filesystem | |
058ac9ba | 2989 | Mount the specified filesystem. |
44f09cdc BB |
2990 | .It Fl o Ar options |
2991 | An optional, comma-separated list of mount options to use temporarily for the | |
2992 | duration of the mount. | |
2993 | See the | |
2994 | .Sx Temporary Mount Point Properties | |
2995 | section for details. | |
b5256303 TC |
2996 | .It Fl l |
2997 | Load keys for encrypted filesystems as they are being mounted. This is | |
2998 | equivalent to executing | |
2999 | .Nm zfs Cm load-key | |
3000 | on each encryption root before mounting it. Note that if a filesystem has a | |
3001 | .Sy keylocation | |
3002 | of | |
3003 | .Sy prompt | |
3004 | this will cause the terminal to interactively block after asking for the key. | |
44f09cdc BB |
3005 | .It Fl v |
3006 | Report mount progress. | |
3007 | .El | |
3008 | .It Xo | |
3009 | .Nm | |
3010 | .Cm unmount | |
3011 | .Op Fl f | |
3012 | .Fl a | Ar filesystem Ns | Ns Ar mountpoint | |
3013 | .Xc | |
3014 | Unmounts currently mounted ZFS file systems. | |
3015 | .Bl -tag -width "-a" | |
3016 | .It Fl a | |
3017 | Unmount all available ZFS file systems. | |
3018 | Invoked automatically as part of the shutdown process. | |
3019 | .It Ar filesystem Ns | Ns Ar mountpoint | |
3020 | Unmount the specified filesystem. | |
3021 | The command can also be given a path to a ZFS file system mount point on the | |
3022 | system. | |
3023 | .It Fl f | |
058ac9ba | 3024 | Forcefully unmount the file system, even if it is currently in use. |
44f09cdc BB |
3025 | .El |
3026 | .It Xo | |
3027 | .Nm | |
3028 | .Cm share | |
3029 | .Fl a | Ar filesystem | |
3030 | .Xc | |
3031 | Shares available ZFS file systems. | |
3032 | .Bl -tag -width "-a" | |
3033 | .It Fl a | |
3034 | Share all available ZFS file systems. | |
3035 | Invoked automatically as part of the boot process. | |
3036 | .It Ar filesystem | |
3037 | Share the specified filesystem according to the | |
3038 | .Sy sharenfs | |
3039 | and | |
3040 | .Sy sharesmb | |
3041 | properties. | |
3042 | File systems are shared when the | |
3043 | .Sy sharenfs | |
3044 | or | |
3045 | .Sy sharesmb | |
3046 | property is set. | |
3047 | .El | |
3048 | .It Xo | |
3049 | .Nm | |
3050 | .Cm unshare | |
3051 | .Fl a | Ar filesystem Ns | Ns Ar mountpoint | |
3052 | .Xc | |
3053 | Unshares currently shared ZFS file systems. | |
3054 | .Bl -tag -width "-a" | |
3055 | .It Fl a | |
3056 | Unshare all available ZFS file systems. | |
3057 | Invoked automatically as part of the shutdown process. | |
3058 | .It Ar filesystem Ns | Ns Ar mountpoint | |
3059 | Unshare the specified filesystem. | |
3060 | The command can also be given a path to a ZFS file system shared on the system. | |
3061 | .El | |
3062 | .It Xo | |
3063 | .Nm | |
3064 | .Cm bookmark | |
3065 | .Ar snapshot bookmark | |
3066 | .Xc | |
3067 | Creates a bookmark of the given snapshot. | |
3068 | Bookmarks mark the point in time when the snapshot was created, and can be used | |
3069 | as the incremental source for a | |
3070 | .Nm zfs Cm send | |
3071 | command. | |
3072 | .Pp | |
da536844 | 3073 | This feature must be enabled to be used. |
44f09cdc BB |
3074 | See |
3075 | .Xr zpool-features 5 | |
3076 | for details on ZFS feature flags and the | |
3077 | .Sy bookmarks | |
3078 | feature. | |
3079 | .It Xo | |
3080 | .Nm | |
3081 | .Cm send | |
b5256303 | 3082 | .Op Fl DLPRcenpvw |
44f09cdc BB |
3083 | .Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot |
3084 | .Ar snapshot | |
3085 | .Xc | |
3086 | Creates a stream representation of the second | |
3087 | .Ar snapshot , | |
3088 | which is written to standard output. | |
3089 | The output can be redirected to a file or to a different system | |
3090 | .Po for example, using | |
3091 | .Xr ssh 1 | |
3092 | .Pc . | |
3093 | By default, a full stream is generated. | |
3094 | .Bl -tag -width "-D" | |
3095 | .It Fl D, -dedup | |
3096 | Generate a deduplicated stream. | |
3097 | Blocks which would have been sent multiple times in the send stream will only be | |
3098 | sent once. | |
3099 | The receiving system must also support this feature to receive a deduplicated | |
3100 | stream. | |
3101 | This flag can be used regardless of the dataset's | |
3102 | .Sy dedup | |
3103 | property, but performance will be much better if the filesystem uses a | |
3104 | dedup-capable checksum | |
3105 | .Po for example, | |
3106 | .Sy sha256 | |
3107 | .Pc . | |
3108 | .It Fl I Ar snapshot | |
3109 | Generate a stream package that sends all intermediary snapshots from the first | |
3110 | snapshot to the second snapshot. | |
3111 | For example, | |
3112 | .Fl I Em @a Em fs@d | |
3113 | is similar to | |
d7323e79 | 3114 | .Fl i Em @a Em fs@b Ns \&; Fl i Em @b Em fs@c Ns \&; Fl i Em @c Em fs@d . |
44f09cdc BB |
3115 | The incremental source may be specified as with the |
3116 | .Fl i | |
3117 | option. | |
3118 | .It Fl L, -large-block | |
3119 | Generate a stream which may contain blocks larger than 128KB. | |
3120 | This flag has no effect if the | |
3121 | .Sy large_blocks | |
3122 | pool feature is disabled, or if the | |
3123 | .Sy recordsize | |
3124 | property of this filesystem has never been set above 128KB. | |
3125 | The receiving system must have the | |
3126 | .Sy large_blocks | |
3127 | pool feature enabled as well. | |
3128 | See | |
3129 | .Xr zpool-features 5 | |
3130 | for details on ZFS feature flags and the | |
3131 | .Sy large_blocks | |
3132 | feature. | |
3133 | .It Fl P, -parsable | |
9566fb1a | 3134 | Print machine-parsable verbose information about the stream package generated. |
44f09cdc BB |
3135 | .It Fl R, -replicate |
3136 | Generate a replication stream package, which will replicate the specified | |
3137 | file system, and all descendent file systems, up to the named snapshot. | |
3138 | When received, all properties, snapshots, descendent file systems, and clones | |
3139 | are preserved. | |
3140 | .Pp | |
3141 | If the | |
3142 | .Fl i | |
3143 | or | |
3144 | .Fl I | |
3145 | flags are used in conjunction with the | |
3146 | .Fl R | |
3147 | flag, an incremental replication stream is generated. | |
3148 | The current values of properties, and current snapshot and file system names are | |
3149 | set when the stream is received. | |
3150 | If the | |
3151 | .Fl F | |
3152 | flag is specified when this stream is received, snapshots and file systems that | |
3153 | do not exist on the sending side are destroyed. | |
3154 | .It Fl e, -embed | |
3155 | Generate a more compact stream by using | |
3156 | .Sy WRITE_EMBEDDED | |
3157 | records for blocks which are stored more compactly on disk by the | |
3158 | .Sy embedded_data | |
3159 | pool feature. | |
3160 | This flag has no effect if the | |
3161 | .Sy embedded_data | |
3162 | feature is disabled. | |
3163 | The receiving system must have the | |
3164 | .Sy embedded_data | |
3165 | feature enabled. | |
3166 | If the | |
3167 | .Sy lz4_compress | |
3168 | feature is active on the sending system, then the receiving system must have | |
3169 | that feature enabled as well. | |
3170 | See | |
3171 | .Xr zpool-features 5 | |
3172 | for details on ZFS feature flags and the | |
3173 | .Sy embedded_data | |
3174 | feature. | |
3175 | .It Fl c, -compressed | |
2aa34383 | 3176 | Generate a more compact stream by using compressed WRITE records for blocks |
44f09cdc BB |
3177 | which are compressed on disk and in memory |
3178 | .Po see the | |
3179 | .Sy compression | |
3180 | property for details | |
3181 | .Pc . | |
3182 | If the | |
3183 | .Sy lz4_compress | |
3184 | feature is active on the sending system, then the receiving system must have | |
3185 | that feature enabled as well. | |
3186 | If the | |
3187 | .Sy large_blocks | |
3188 | feature is enabled on the sending system but the | |
3189 | .Fl L | |
3190 | option is not supplied in conjunction with | |
3191 | .Fl c , | |
3192 | then the data will be decompressed before sending so it can be split into | |
3193 | smaller block sizes. | |
b5256303 TC |
3194 | .It Fl w, -raw |
3195 | For encrypted datasets, send data exactly as it exists on disk. This allows | |
3196 | backups to be taken even if encryption keys are not currently loaded. The | |
3197 | backup may then be received on an untrusted machine since that machine will | |
3198 | not have the encryption keys to read the protected data or alter it without | |
3199 | being detected. Upon being received, the dataset will have the same encryption | |
3200 | keys as it did on the send side, although the | |
3201 | .Sy keylocation | |
3202 | property will be defaulted to | |
3203 | .Sy prompt | |
3204 | if not otherwise provided. For unencrypted datasets, this flag will be | |
3205 | equivalent to | |
3206 | .Fl Lec . | |
3207 | Note that if you do not use this flag for sending encrypted datasets, data will | |
3208 | be sent unencrypted and may be re-encrypted with a different encryption key on | |
3209 | the receiving system, which will disable the ability to do a raw send to that | |
3210 | system for incrementals. | |
44f09cdc BB |
3211 | .It Fl i Ar snapshot |
3212 | Generate an incremental stream from the first | |
3213 | .Ar snapshot | |
3214 | .Pq the incremental source | |
3215 | to the second | |
3216 | .Ar snapshot | |
3217 | .Pq the incremental target . | |
3218 | The incremental source can be specified as the last component of the snapshot | |
3219 | name | |
3220 | .Po the | |
3221 | .Sy @ | |
3222 | character and following | |
3223 | .Pc | |
3224 | and it is assumed to be from the same file system as the incremental target. | |
3225 | .Pp | |
3226 | If the destination is a clone, the source may be the origin snapshot, which must | |
3227 | be fully specified | |
3228 | .Po for example, | |
3229 | .Em pool/fs@origin , | |
3230 | not just | |
3231 | .Em @origin | |
3232 | .Pc . | |
3233 | .It Fl n, -dryrun | |
3234 | Do a dry-run | |
3235 | .Pq Qq No-op | |
3236 | send. | |
3237 | Do not generate any actual send data. | |
3238 | This is useful in conjunction with the | |
3239 | .Fl v | |
3240 | or | |
3241 | .Fl P | |
3242 | flags to determine what data will be sent. | |
3243 | In this case, the verbose output will be written to standard output | |
3244 | .Po contrast with a non-dry-run, where the stream is written to standard output | |
3245 | and the verbose output goes to standard error | |
3246 | .Pc . | |
3247 | .It Fl p, -props | |
3248 | Include the dataset's properties in the stream. | |
3249 | This flag is implicit when | |
3250 | .Fl R | |
3251 | is specified. | |
3252 | The receiving system must also support this feature. | |
3253 | .It Fl v, -verbose | |
3254 | Print verbose information about the stream package generated. | |
3255 | This information includes a per-second report of how much data has been sent. | |
3256 | .Pp | |
3257 | The format of the stream is committed. | |
3258 | You will be able to receive your streams on future versions of ZFS . | |
3259 | .El | |
3260 | .It Xo | |
3261 | .Nm | |
3262 | .Cm send | |
3263 | .Op Fl Lce | |
3264 | .Op Fl i Ar snapshot Ns | Ns Ar bookmark | |
3265 | .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot | |
3266 | .Xc | |
3267 | Generate a send stream, which may be of a filesystem, and may be incremental | |
3268 | from a bookmark. | |
3269 | If the destination is a filesystem or volume, the pool must be read-only, or the | |
3270 | filesystem must not be mounted. | |
3271 | When the stream generated from a filesystem or volume is received, the default | |
3272 | snapshot name will be | |
3273 | .Qq --head-- . | |
3274 | .Bl -tag -width "-L" | |
3275 | .It Fl L, -large-block | |
3276 | Generate a stream which may contain blocks larger than 128KB. | |
3277 | This flag has no effect if the | |
3278 | .Sy large_blocks | |
3279 | pool feature is disabled, or if the | |
3280 | .Sy recordsize | |
3281 | property of this filesystem has never been set above 128KB. | |
3282 | The receiving system must have the | |
3283 | .Sy large_blocks | |
3284 | pool feature enabled as well. | |
3285 | See | |
3286 | .Xr zpool-features 5 | |
3287 | for details on ZFS feature flags and the | |
3288 | .Sy large_blocks | |
3289 | feature. | |
3290 | .It Fl c, -compressed | |
3291 | Generate a more compact stream by using compressed WRITE records for blocks | |
3292 | which are compressed on disk and in memory | |
3293 | .Po see the | |
3294 | .Sy compression | |
3295 | property for details | |
3296 | .Pc . | |
3297 | If the | |
3298 | .Sy lz4_compress | |
3299 | feature is active on the sending system, then the receiving system must have | |
3300 | that feature enabled as well. | |
3301 | If the | |
3302 | .Sy large_blocks | |
3303 | feature is enabled on the sending system but the | |
3304 | .Fl L | |
3305 | option is not supplied in conjunction with | |
3306 | .Fl c , | |
3307 | then the data will be decompressed before sending so it can be split into | |
3308 | smaller block sizes. | |
b5256303 TC |
3309 | .It Fl w, -raw |
3310 | For encrypted datasets, send data exactly as it exists on disk. This allows | |
3311 | backups to be taken even if encryption keys are not currently loaded. The | |
3312 | backup may then be received on an untrusted machine since that machine will | |
3313 | not have the encryption keys to read the protected data or alter it without | |
3314 | being detected. Upon being received, the dataset will have the same encryption | |
3315 | keys as it did on the send side, although the | |
3316 | .Sy keylocation | |
3317 | property will be defaulted to | |
3318 | .Sy prompt | |
3319 | if not otherwise provided. For unencrypted datasets, this flag will be | |
3320 | equivalent to | |
3321 | .Fl Lec . | |
3322 | Note that if you do not use this flag for sending encrypted datasets, data will | |
3323 | be sent unencrypted and may be re-encrypted with a different encryption key on | |
3324 | the receiving system, which will disable the ability to do a raw send to that | |
3325 | system for incrementals. | |
44f09cdc BB |
3326 | .It Fl e, -embed |
3327 | Generate a more compact stream by using | |
3328 | .Sy WRITE_EMBEDDED | |
3329 | records for blocks which are stored more compactly on disk by the | |
3330 | .Sy embedded_data | |
3331 | pool feature. | |
3332 | This flag has no effect if the | |
3333 | .Sy embedded_data | |
3334 | feature is disabled. | |
3335 | The receiving system must have the | |
3336 | .Sy embedded_data | |
3337 | feature enabled. | |
3338 | If the | |
3339 | .Sy lz4_compress | |
3340 | feature is active on the sending system, then the receiving system must have | |
9b840763 TC |
3341 | that feature enabled as well. Note that streams generated using this flag are |
3342 | unable to be received into an encrypted dataset. | |
44f09cdc BB |
3343 | See |
3344 | .Xr zpool-features 5 | |
3345 | for details on ZFS feature flags and the | |
3346 | .Sy embedded_data | |
3347 | feature. | |
3348 | .It Fl i Ar snapshot Ns | Ns Ar bookmark | |
3349 | Generate an incremental send stream. | |
3350 | The incremental source must be an earlier snapshot in the destination's history. | |
3351 | It will commonly be an earlier snapshot in the destination's file system, in | |
3352 | which case it can be specified as the last component of the name | |
3353 | .Po the | |
3354 | .Sy # | |
3355 | or | |
3356 | .Sy @ | |
3357 | character and following | |
3358 | .Pc . | |
3359 | .Pp | |
3360 | If the incremental target is a clone, the incremental source can be the origin | |
3361 | snapshot, or an earlier snapshot in the origin's filesystem, or the origin's | |
3362 | origin, etc. | |
3363 | .El | |
3364 | .It Xo | |
3365 | .Nm | |
3366 | .Cm send | |
3367 | .Op Fl Penv | |
3368 | .Fl t | |
3369 | .Ar receive_resume_token | |
3370 | .Xc | |
3371 | Creates a send stream which resumes an interrupted receive. | |
3372 | The | |
3373 | .Ar receive_resume_token | |
3374 | is the value of this property on the filesystem or volume that was being | |
3375 | received into. | |
3376 | See the documentation for | |
3377 | .Sy zfs receive -s | |
3378 | for more details. | |
3379 | .It Xo | |
3380 | .Nm | |
3381 | .Cm receive | |
3382 | .Op Fl Fnsuv | |
3383 | .Op Fl o Sy origin Ns = Ns Ar snapshot | |
3384 | .Op Fl o Ar property Ns = Ns Ar value | |
3385 | .Op Fl x Ar property | |
3386 | .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot | |
3387 | .Xc | |
3388 | .It Xo | |
3389 | .Nm | |
3390 | .Cm receive | |
3391 | .Op Fl Fnsuv | |
3392 | .Op Fl d Ns | Ns Fl e | |
3393 | .Op Fl o Sy origin Ns = Ns Ar snapshot | |
3394 | .Op Fl o Ar property Ns = Ns Ar value | |
3395 | .Op Fl x Ar property | |
3396 | .Ar filesystem | |
3397 | .Xc | |
3398 | Creates a snapshot whose contents are as specified in the stream provided on | |
3399 | standard input. | |
3400 | If a full stream is received, then a new file system is created as well. | |
3401 | Streams are created using the | |
3402 | .Nm zfs Cm send | |
3403 | subcommand, which by default creates a full stream. | |
3404 | .Nm zfs Cm recv | |
3405 | can be used as an alias for | |
3406 | .Nm zfs Cm receive. | |
3407 | .Pp | |
3408 | If an incremental stream is received, then the destination file system must | |
3409 | already exist, and its most recent snapshot must match the incremental stream's | |
3410 | source. | |
3411 | For | |
3412 | .Sy zvols , | |
3413 | the destination device link is destroyed and recreated, which means the | |
3414 | .Sy zvol | |
3415 | cannot be accessed during the | |
3416 | .Cm receive | |
3417 | operation. | |
3418 | .Pp | |
3419 | When a snapshot replication package stream that is generated by using the | |
3420 | .Nm zfs Cm send Fl R | |
3421 | command is received, any snapshots that do not exist on the sending location are | |
3422 | destroyed by using the | |
3423 | .Nm zfs Cm destroy Fl d | |
3424 | command. | |
3425 | .Pp | |
3426 | If | |
3427 | .Sy Fl o Em property=value | |
3428 | or | |
3429 | .Sy Fl x Em property | |
3430 | is specified, it applies to the effective value of the property throughout | |
3431 | the entire subtree of replicated datasets. Effective property values will be | |
3432 | set ( | |
3433 | .Fl o | |
3434 | ) or inherited ( | |
3435 | .Fl x | |
3436 | ) on the topmost in the replicated subtree. In descendant datasets, if the | |
3437 | property is set by the send stream, it will be overridden by forcing the | |
3438 | property to be inherited from the top‐most file system. Received properties | |
3439 | are retained in spite of being overridden and may be restored with | |
3440 | .Nm zfs Cm inherit Fl S . | |
3441 | Specifying | |
3442 | .Sy Fl o Em origin=snapshot | |
3443 | is a special case because, even if | |
3444 | .Sy origin | |
3445 | is a read-only property and cannot be set, it's allowed to receive the send | |
3446 | stream as a clone of the given snapshot. | |
3447 | .Pp | |
3448 | The name of the snapshot | |
3449 | .Pq and file system, if a full stream is received | |
3450 | that this subcommand creates depends on the argument type and the use of the | |
3451 | .Fl d | |
3452 | or | |
3453 | .Fl e | |
3454 | options. | |
3455 | .Pp | |
3456 | If the argument is a snapshot name, the specified | |
3457 | .Ar snapshot | |
3458 | is created. | |
3459 | If the argument is a file system or volume name, a snapshot with the same name | |
3460 | as the sent snapshot is created within the specified | |
3461 | .Ar filesystem | |
3462 | or | |
3463 | .Ar volume . | |
3464 | If neither of the | |
3465 | .Fl d | |
3466 | or | |
3467 | .Fl e | |
3468 | options are specified, the provided target snapshot name is used exactly as | |
3469 | provided. | |
3470 | .Pp | |
3471 | The | |
3472 | .Fl d | |
3473 | and | |
3474 | .Fl e | |
3475 | options cause the file system name of the target snapshot to be determined by | |
3476 | appending a portion of the sent snapshot's name to the specified target | |
3477 | .Ar filesystem . | |
3478 | If the | |
3479 | .Fl d | |
3480 | option is specified, all but the first element of the sent snapshot's file | |
3481 | system path | |
3482 | .Pq usually the pool name | |
3483 | is used and any required intermediate file systems within the specified one are | |
3484 | created. | |
3485 | If the | |
3486 | .Fl e | |
3487 | option is specified, then only the last element of the sent snapshot's file | |
3488 | system name | |
3489 | .Pq i.e. the name of the source file system itself | |
3490 | is used as the target file system name. | |
3491 | .Bl -tag -width "-F" | |
3492 | .It Fl F | |
3493 | Force a rollback of the file system to the most recent snapshot before | |
3494 | performing the receive operation. | |
3495 | If receiving an incremental replication stream | |
3496 | .Po for example, one generated by | |
3497 | .Nm zfs Cm send Fl R Op Fl i Ns | Ns Fl I | |
3498 | .Pc , | |
3499 | destroy snapshots and file systems that do not exist on the sending side. | |
3500 | .It Fl d | |
3501 | Discard the first element of the sent snapshot's file system name, using the | |
3502 | remaining elements to determine the name of the target file system for the new | |
3503 | snapshot as described in the paragraph above. | |
3504 | .It Fl e | |
3505 | Discard all but the last element of the sent snapshot's file system name, using | |
3506 | that element to determine the name of the target file system for the new | |
3507 | snapshot as described in the paragraph above. | |
3508 | .It Fl n | |
3509 | Do not actually receive the stream. | |
3510 | This can be useful in conjunction with the | |
3511 | .Fl v | |
3512 | option to verify the name the receive operation would use. | |
3513 | .It Fl o Sy origin Ns = Ns Ar snapshot | |
e6d3a843 PD |
3514 | Forces the stream to be received as a clone of the given snapshot. |
3515 | If the stream is a full send stream, this will create the filesystem | |
44f09cdc BB |
3516 | described by the stream as a clone of the specified snapshot. |
3517 | Which snapshot was specified will not affect the success or failure of the | |
3518 | receive, as long as the snapshot does exist. | |
3519 | If the stream is an incremental send stream, all the normal verification will be | |
3520 | performed. | |
3521 | .It Fl o Em property=value | |
3522 | Sets the specified property as if the command | |
3523 | .Nm zfs Cm set Em property=value | |
3524 | was invoked immediately before the receive. When receiving a stream from | |
3525 | .Nm zfs Cm send Fl R , | |
3526 | causes the property to be inherited by all descendant datasets, as through | |
3527 | .Nm zfs Cm inherit Em property | |
3528 | was run on any descendant datasets that have this property set on the | |
3529 | sending system. | |
3530 | .Pp | |
3531 | Any editable property can be set at receive time. Set-once properties bound | |
3532 | to the received data, such as | |
3533 | .Sy normalization | |
3534 | and | |
3535 | .Sy casesensitivity , | |
3536 | cannot be set at receive time even when the datasets are newly created by | |
3537 | .Nm zfs Cm receive . | |
3538 | Additionally both settable properties | |
3539 | .Sy version | |
3540 | and | |
3541 | .Sy volsize | |
3542 | cannot be set at receive time. | |
3543 | .Pp | |
3544 | The | |
3545 | .Fl o | |
3546 | option may be specified multiple times, for different properties. An error | |
3547 | results if the same property is specified in multiple | |
3548 | .Fl o | |
3549 | or | |
3550 | .Fl x | |
3551 | options. | |
3552 | .It Fl s | |
3553 | If the receive is interrupted, save the partially received state, rather | |
3554 | than deleting it. | |
3555 | Interruption may be due to premature termination of the stream | |
3556 | .Po e.g. due to network failure or failure of the remote system | |
3557 | if the stream is being read over a network connection | |
3558 | .Pc , | |
3559 | a checksum error in the stream, termination of the | |
3560 | .Nm zfs Cm receive | |
3561 | process, or unclean shutdown of the system. | |
3562 | .Pp | |
3563 | The receive can be resumed with a stream generated by | |
3564 | .Nm zfs Cm send Fl t Ar token , | |
3565 | where the | |
3566 | .Ar token | |
3567 | is the value of the | |
3568 | .Sy receive_resume_token | |
3569 | property of the filesystem or volume which is received into. | |
3570 | .Pp | |
3571 | To use this flag, the storage pool must have the | |
3572 | .Sy extensible_dataset | |
3573 | feature enabled. | |
3574 | See | |
3575 | .Xr zpool-features 5 | |
3576 | for details on ZFS feature flags. | |
3577 | .It Fl u | |
3578 | File system that is associated with the received stream is not mounted. | |
3579 | .It Fl v | |
3580 | Print verbose information about the stream and the time required to perform the | |
3581 | receive operation. | |
3582 | .It Fl x Em property | |
3583 | Ensures that the effective value of the specified property after the | |
3584 | receive is unaffected by the value of that property in the send stream (if any), | |
3585 | as if the property had been excluded from the send stream. | |
3586 | .Pp | |
3587 | If the specified property is not present in the send stream, this option does | |
3588 | nothing. | |
3589 | .Pp | |
3590 | If a received property needs to be overridden, the effective value will be | |
3591 | set or inherited, depending on whether the property is inheritable or not. | |
3592 | .Pp | |
3593 | In the case of an incremental update, | |
3594 | .Fl x | |
3595 | leaves any existing local setting or explicit inheritance unchanged. | |
3596 | .Pp | |
3597 | All | |
3598 | .Fl o | |
3599 | restrictions on set-once and special properties apply equally to | |
3600 | .Fl x . | |
3601 | .El | |
3602 | .It Xo | |
3603 | .Nm | |
3604 | .Cm receive | |
3605 | .Fl A | |
3606 | .Ar filesystem Ns | Ns Ar volume | |
3607 | .Xc | |
3608 | Abort an interrupted | |
3609 | .Nm zfs Cm receive Fl s , | |
3610 | deleting its saved partially received state. | |
3611 | .It Xo | |
3612 | .Nm | |
3613 | .Cm allow | |
3614 | .Ar filesystem Ns | Ns Ar volume | |
3615 | .Xc | |
3616 | Displays permissions that have been delegated on the specified filesystem or | |
3617 | volume. | |
3618 | See the other forms of | |
3619 | .Nm zfs Cm allow | |
3620 | for more information. | |
3621 | .Pp | |
3622 | Delegations are supported under Linux with the exception of | |
3623 | .Sy mount , | |
3624 | .Sy unmount , | |
3625 | .Sy mountpoint , | |
3626 | .Sy canmount , | |
3627 | .Sy rename , | |
3628 | and | |
3629 | .Sy share . | |
3630 | These permissions cannot be delegated because the Linux | |
3631 | .Xr mount 8 | |
3632 | command restricts modifications of the global namespace to the root user. | |
3633 | .It Xo | |
3634 | .Nm | |
3635 | .Cm allow | |
3636 | .Op Fl dglu | |
3637 | .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ... | |
3638 | .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns | |
3639 | .Ar setname Oc Ns ... | |
3640 | .Ar filesystem Ns | Ns Ar volume | |
058ac9ba | 3641 | .br |
44f09cdc BB |
3642 | .Nm |
3643 | .Cm allow | |
3644 | .Op Fl dl | |
3645 | .Fl e Ns | Ns Sy everyone | |
3646 | .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns | |
3647 | .Ar setname Oc Ns ... | |
3648 | .Ar filesystem Ns | Ns Ar volume | |
3649 | .Xc | |
3650 | Delegates ZFS administration permission for the file systems to non-privileged | |
3651 | users. | |
3652 | .Bl -tag -width "-d" | |
3653 | .It Fl d | |
3654 | Allow only for the descendent file systems. | |
3655 | .It Fl e Ns | Ns Sy everyone | |
3656 | Specifies that the permissions be delegated to everyone. | |
3657 | .It Fl g Ar group Ns Oo , Ns Ar group Oc Ns ... | |
3658 | Explicitly specify that permissions are delegated to the group. | |
3659 | .It Fl l | |
3660 | Allow | |
3661 | .Qq locally | |
3662 | only for the specified file system. | |
3663 | .It Fl u Ar user Ns Oo , Ns Ar user Oc Ns ... | |
3664 | Explicitly specify that permissions are delegated to the user. | |
3665 | .It Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ... | |
3666 | Specifies to whom the permissions are delegated. | |
3667 | Multiple entities can be specified as a comma-separated list. | |
3668 | If neither of the | |
3669 | .Fl gu | |
3670 | options are specified, then the argument is interpreted preferentially as the | |
3671 | keyword | |
3672 | .Sy everyone , | |
3673 | then as a user name, and lastly as a group name. | |
3674 | To specify a user or group named | |
3675 | .Qq everyone , | |
3676 | use the | |
3677 | .Fl g | |
3678 | or | |
3679 | .Fl u | |
3680 | options. | |
3681 | To specify a group with the same name as a user, use the | |
3682 | .Fl g | |
3683 | options. | |
3684 | .It Xo | |
3685 | .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns | |
3686 | .Ar setname Oc Ns ... | |
3687 | .Xc | |
3688 | The permissions to delegate. | |
3689 | Multiple permissions may be specified as a comma-separated list. | |
3690 | Permission names are the same as ZFS subcommand and property names. | |
3691 | See the property list below. | |
3692 | Property set names, which begin with | |
3693 | .Sy @ , | |
3694 | may be specified. | |
3695 | See the | |
3696 | .Fl s | |
3697 | form below for details. | |
3698 | .El | |
3699 | .Pp | |
3700 | If neither of the | |
3701 | .Fl dl | |
3702 | options are specified, or both are, then the permissions are allowed for the | |
3703 | file system or volume, and all of its descendents. | |
3704 | .Pp | |
3705 | Permissions are generally the ability to use a ZFS subcommand or change a ZFS | |
3706 | property. | |
3707 | The following permissions are available: | |
3708 | .Bd -literal | |
058ac9ba | 3709 | NAME TYPE NOTES |
44f09cdc BB |
3710 | allow subcommand Must also have the permission that is |
3711 | being allowed | |
3712 | clone subcommand Must also have the 'create' ability and | |
3713 | 'mount' ability in the origin file system | |
058ac9ba BB |
3714 | create subcommand Must also have the 'mount' ability |
3715 | destroy subcommand Must also have the 'mount' ability | |
0677cb6f | 3716 | diff subcommand Allows lookup of paths within a dataset |
44f09cdc BB |
3717 | given an object number, and the ability |
3718 | to create snapshots necessary to | |
3719 | 'zfs diff'. | |
b5256303 TC |
3720 | load-key subcommand Allows loading and unloading of encryption key |
3721 | (see 'zfs load-key' and 'zfs unload-key'). | |
3722 | change-key subcommand Allows changing an encryption key via | |
3723 | 'zfs change-key'. | |
058ac9ba | 3724 | mount subcommand Allows mount/umount of ZFS datasets |
44f09cdc BB |
3725 | promote subcommand Must also have the 'mount' and 'promote' |
3726 | ability in the origin file system | |
3727 | receive subcommand Must also have the 'mount' and 'create' | |
3728 | ability | |
058ac9ba BB |
3729 | rename subcommand Must also have the 'mount' and 'create' |
3730 | ability in the new parent | |
3731 | rollback subcommand Must also have the 'mount' ability | |
6b4e21c6 | 3732 | send subcommand |
44f09cdc BB |
3733 | share subcommand Allows sharing file systems over NFS |
3734 | or SMB protocols | |
058ac9ba | 3735 | snapshot subcommand Must also have the 'mount' ability |
44f09cdc BB |
3736 | |
3737 | groupquota other Allows accessing any groupquota@... | |
3738 | property | |
058ac9ba BB |
3739 | groupused other Allows reading any groupused@... property |
3740 | userprop other Allows changing any user property | |
44f09cdc BB |
3741 | userquota other Allows accessing any userquota@... |
3742 | property | |
058ac9ba BB |
3743 | userused other Allows reading any userused@... property |
3744 | ||
6b4e21c6 | 3745 | aclinherit property |
44f09cdc | 3746 | acltype property |
6b4e21c6 NB |
3747 | atime property |
3748 | canmount property | |
3749 | casesensitivity property | |
3750 | checksum property | |
3751 | compression property | |
3752 | copies property | |
6b4e21c6 NB |
3753 | devices property |
3754 | exec property | |
788eb90c | 3755 | filesystem_limit property |
6b4e21c6 NB |
3756 | mountpoint property |
3757 | nbmand property | |
3758 | normalization property | |
3759 | primarycache property | |
3760 | quota property | |
3761 | readonly property | |
3762 | recordsize property | |
3763 | refquota property | |
3764 | refreservation property | |
3765 | reservation property | |
3766 | secondarycache property | |
3767 | setuid property | |
3768 | sharenfs property | |
3769 | sharesmb property | |
3770 | snapdir property | |
788eb90c | 3771 | snapshot_limit property |
6b4e21c6 NB |
3772 | utf8only property |
3773 | version property | |
3774 | volblocksize property | |
3775 | volsize property | |
3776 | vscan property | |
3777 | xattr property | |
3778 | zoned property | |
44f09cdc BB |
3779 | .Ed |
3780 | .It Xo | |
3781 | .Nm | |
3782 | .Cm allow | |
3783 | .Fl c | |
3784 | .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns | |
3785 | .Ar setname Oc Ns ... | |
3786 | .Ar filesystem Ns | Ns Ar volume | |
3787 | .Xc | |
3788 | Sets | |
3789 | .Qq create time | |
3790 | permissions. | |
3791 | These permissions are granted | |
3792 | .Pq locally | |
3793 | to the creator of any newly-created descendent file system. | |
3794 | .It Xo | |
3795 | .Nm | |
3796 | .Cm allow | |
3797 | .Fl s No @ Ns Ar setname | |
3798 | .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns | |
3799 | .Ar setname Oc Ns ... | |
3800 | .Ar filesystem Ns | Ns Ar volume | |
3801 | .Xc | |
3802 | Defines or adds permissions to a permission set. | |
3803 | The set can be used by other | |
3804 | .Nm zfs Cm allow | |
3805 | commands for the specified file system and its descendents. | |
3806 | Sets are evaluated dynamically, so changes to a set are immediately reflected. | |
3807 | Permission sets follow the same naming restrictions as ZFS file systems, but the | |
3808 | name must begin with | |
3809 | .Sy @ , | |
3810 | and can be no more than 64 characters long. | |
3811 | .It Xo | |
3812 | .Nm | |
3813 | .Cm unallow | |
3814 | .Op Fl dglru | |
3815 | .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ... | |
3816 | .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns | |
3817 | .Ar setname Oc Ns ... Oc | |
3818 | .Ar filesystem Ns | Ns Ar volume | |
058ac9ba | 3819 | .br |
44f09cdc BB |
3820 | .Nm |
3821 | .Cm unallow | |
3822 | .Op Fl dlr | |
3823 | .Fl e Ns | Ns Sy everyone | |
3824 | .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns | |
3825 | .Ar setname Oc Ns ... Oc | |
3826 | .Ar filesystem Ns | Ns Ar volume | |
058ac9ba | 3827 | .br |
44f09cdc BB |
3828 | .Nm |
3829 | .Cm unallow | |
3830 | .Op Fl r | |
3831 | .Fl c | |
3832 | .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns | |
3833 | .Ar setname Oc Ns ... Oc | |
3834 | .Ar filesystem Ns | Ns Ar volume | |
3835 | .Xc | |
3836 | Removes permissions that were granted with the | |
3837 | .Nm zfs Cm allow | |
3838 | command. | |
3839 | No permissions are explicitly denied, so other permissions granted are still in | |
3840 | effect. | |
3841 | For example, if the permission is granted by an ancestor. | |
3842 | If no permissions are specified, then all permissions for the specified | |
3843 | .Ar user , | |
3844 | .Ar group , | |
3845 | or | |
3846 | .Sy everyone | |
3847 | are removed. | |
3848 | Specifying | |
3849 | .Sy everyone | |
3850 | .Po or using the | |
3851 | .Fl e | |
3852 | option | |
3853 | .Pc | |
3854 | only removes the permissions that were granted to everyone, not all permissions | |
3855 | for every user and group. | |
3856 | See the | |
3857 | .Nm zfs Cm allow | |
3858 | command for a description of the | |
3859 | .Fl ldugec | |
3860 | options. | |
3861 | .Bl -tag -width "-r" | |
3862 | .It Fl r | |
058ac9ba | 3863 | Recursively remove the permissions from this file system and all descendents. |
44f09cdc BB |
3864 | .El |
3865 | .It Xo | |
3866 | .Nm | |
3867 | .Cm unallow | |
3868 | .Op Fl r | |
3869 | .Fl s No @ Ns Ar setname | |
3870 | .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns | |
3871 | .Ar setname Oc Ns ... Oc | |
3872 | .Ar filesystem Ns | Ns Ar volume | |
3873 | .Xc | |
3874 | Removes permissions from a permission set. | |
3875 | If no permissions are specified, then all permissions are removed, thus removing | |
3876 | the set entirely. | |
3877 | .It Xo | |
3878 | .Nm | |
3879 | .Cm hold | |
3880 | .Op Fl r | |
3881 | .Ar tag Ar snapshot Ns ... | |
3882 | .Xc | |
3883 | Adds a single reference, named with the | |
3884 | .Ar tag | |
3885 | argument, to the specified snapshot or snapshots. | |
3886 | Each snapshot has its own tag namespace, and tags must be unique within that | |
3887 | space. | |
3888 | .Pp | |
3889 | If a hold exists on a snapshot, attempts to destroy that snapshot by using the | |
3890 | .Nm zfs Cm destroy | |
3891 | command return | |
3892 | .Er EBUSY . | |
3893 | .Bl -tag -width "-r" | |
3894 | .It Fl r | |
3895 | Specifies that a hold with the given tag is applied recursively to the snapshots | |
3896 | of all descendent file systems. | |
3897 | .El | |
3898 | .It Xo | |
3899 | .Nm | |
3900 | .Cm holds | |
3901 | .Op Fl r | |
3902 | .Ar snapshot Ns ... | |
3903 | .Xc | |
058ac9ba | 3904 | Lists all existing user references for the given snapshot or snapshots. |
44f09cdc BB |
3905 | .Bl -tag -width "-r" |
3906 | .It Fl r | |
3907 | Lists the holds that are set on the named descendent snapshots, in addition to | |
3908 | listing the holds on the named snapshot. | |
3909 | .El | |
3910 | .It Xo | |
3911 | .Nm | |
3912 | .Cm release | |
3913 | .Op Fl r | |
3914 | .Ar tag Ar snapshot Ns ... | |
3915 | .Xc | |
3916 | Removes a single reference, named with the | |
3917 | .Ar tag | |
3918 | argument, from the specified snapshot or snapshots. | |
3919 | The tag must already exist for each snapshot. | |
3920 | If a hold exists on a snapshot, attempts to destroy that snapshot by using the | |
3921 | .Nm zfs Cm destroy | |
3922 | command return | |
3923 | .Er EBUSY . | |
3924 | .Bl -tag -width "-r" | |
3925 | .It Fl r | |
3926 | Recursively releases a hold with the given tag on the snapshots of all | |
3927 | descendent file systems. | |
3928 | .El | |
3929 | .It Xo | |
3930 | .Nm | |
3931 | .Cm diff | |
3932 | .Op Fl FHt | |
3933 | .Ar snapshot Ar snapshot Ns | Ns Ar filesystem | |
3934 | .Xc | |
0677cb6f RL |
3935 | Display the difference between a snapshot of a given filesystem and another |
3936 | snapshot of that filesystem from a later time or the current contents of the | |
44f09cdc BB |
3937 | filesystem. |
3938 | The first column is a character indicating the type of change, the other columns | |
3939 | indicate pathname, new pathname | |
3940 | .Pq in case of rename , | |
3941 | change in link count, and optionally file type and/or change time. | |
0677cb6f | 3942 | The types of change are: |
44f09cdc | 3943 | .Bd -literal |
0677cb6f RL |
3944 | - The path has been removed |
3945 | + The path has been created | |
3946 | M The path has been modified | |
3947 | R The path has been renamed | |
44f09cdc BB |
3948 | .Ed |
3949 | .Bl -tag -width "-F" | |
3950 | .It Fl F | |
3951 | Display an indication of the type of file, in a manner similar to the | |
3952 | .Fl | |
3953 | option of | |
3954 | .Xr ls 1 . | |
3955 | .Bd -literal | |
0677cb6f RL |
3956 | B Block device |
3957 | C Character device | |
3958 | / Directory | |
3959 | > Door | |
3960 | | Named pipe | |
3961 | @ Symbolic link | |
3962 | P Event port | |
3963 | = Socket | |
3964 | F Regular file | |
44f09cdc BB |
3965 | .Ed |
3966 | .It Fl H | |
3967 | Give more parsable tab-separated output, without header lines and without | |
3968 | arrows. | |
3969 | .It Fl t | |
0677cb6f | 3970 | Display the path's inode change time as the first column of output. |
44f09cdc | 3971 | .El |
b5256303 TC |
3972 | .It Xo |
3973 | .Nm | |
3974 | .Cm load-key | |
3975 | .Op Fl nr | |
3976 | .Op Fl L Ar keylocation | |
3977 | .Fl a | Ar filesystem | |
3978 | .Xc | |
3979 | Load the key for | |
3980 | .Ar filesystem , | |
3981 | allowing it and all children that inherit the | |
3982 | .Sy keylocation | |
3983 | property to be accessed. The key will be expected in the format specified by the | |
3984 | .Sy keyformat | |
3985 | and location specified by the | |
3986 | .Sy keylocation | |
3987 | property. Note that if the | |
3988 | .Sy keylocation | |
3989 | is set to | |
3990 | .Sy prompt | |
3991 | the terminal will interactively wait for the key to be entered. Loading a key | |
3992 | will not automatically mount the dataset. If that functionality is desired, | |
3993 | .Nm zfs Cm mount Sy -l | |
3994 | will ask for the key and mount the dataset. Once the key is loaded the | |
3995 | .Sy keystatus | |
3996 | property will become | |
3997 | .Sy available . | |
3998 | .Bl -tag -width "-r" | |
3999 | .It Fl r | |
4000 | Recursively loads the keys for the specified filesystem and all descendent | |
4001 | encryption roots. | |
4002 | .It Fl a | |
4003 | Loads the keys for all encryption roots in all imported pools. | |
4004 | .It Fl n | |
4005 | Do a dry-run | |
4006 | .Pq Qq No-op | |
4007 | load-key. This will cause zfs to simply check that the | |
4008 | provided key is correct. This command may be run even if the key is already | |
4009 | loaded. | |
4010 | .It Fl L Ar keylocation | |
4011 | Use | |
4012 | .Ar keylocation | |
4013 | instead of the | |
4014 | .Sy keylocation | |
4015 | property. This will not change the value of the property on the dataset. Note | |
4016 | that if used with either | |
4017 | .Fl r | |
4018 | or | |
4019 | .Fl a , | |
4020 | .Ar keylocation | |
4021 | may only be given as | |
4022 | .Sy prompt . | |
4023 | .El | |
4024 | .It Xo | |
4025 | .Nm | |
4026 | .Cm unload-key | |
4027 | .Op Fl r | |
4028 | .Fl a | Ar filesystem | |
4029 | .Xc | |
4030 | Unloads a key from ZFS, removing the ability to access the dataset and all of | |
4031 | its children that inherit the | |
4032 | .Sy keylocation | |
4033 | property. This requires that the dataset is not currently open or mounted. Once | |
4034 | the key is unloaded the | |
4035 | .Sy keystatus | |
4036 | property will become | |
4037 | .Sy unavailable . | |
4038 | .Bl -tag -width "-r" | |
4039 | .It Fl r | |
4040 | Recursively unloads the keys for the specified filesystem and all descendent | |
4041 | encryption roots. | |
4042 | .It Fl a | |
4043 | Unloads the keys for all encryption roots in all imported pools. | |
4044 | .El | |
4045 | .It Xo | |
4046 | .Nm | |
4047 | .Cm change-key | |
4048 | .Op Fl l | |
4049 | .Op Fl o Ar keylocation Ns = Ns Ar value | |
4050 | .Op Fl o Ar keyformat Ns = Ns Ar value | |
4051 | .Op Fl o Ar pbkdf2iters Ns = Ns Ar value | |
4052 | .Ar filesystem | |
4053 | .Xc | |
4054 | .It Xo | |
4055 | .Nm | |
4056 | .Cm change-key | |
4057 | .Fl i | |
4058 | .Op Fl l | |
4059 | .Ar filesystem | |
4060 | .Xc | |
4061 | Allows a user to change the encryption key used to access a dataset. This | |
4062 | command requires that the existing key for the dataset is already loaded into | |
4063 | ZFS. This command may also be used to change the | |
4064 | .Sy keylocation , | |
4065 | .Sy keyformat , | |
4066 | and | |
4067 | .Sy pbkdf2iters | |
4068 | properties as needed. If the dataset was not previously an encryption root it | |
4069 | will become one. Alternatively, the | |
4070 | .Fl i | |
4071 | flag may be provided to cause an encryption root to inherit the parent's key | |
4072 | instead. | |
4073 | .Bl -tag -width "-r" | |
4074 | .It Fl l | |
4075 | Ensures the key is loaded before attempting to change the key. This is | |
4076 | effectively equivalent to | |
4077 | .Qq Nm zfs Cm load-key Ar filesystem ; Nm zfs Cm change-key Ar filesystem | |
4078 | .It Fl o Ar property Ns = Ns Ar value | |
4079 | Allows the user to set encryption key properties ( | |
4080 | .Sy keyformat , | |
4081 | .Sy keylocation , | |
4082 | and | |
4083 | .Sy pbkdf2iters | |
4084 | ) while changing the key. This is the only way to alter | |
4085 | .Sy keyformat | |
4086 | and | |
4087 | .Sy pbkdf2iters | |
4088 | after the dataset has been created. | |
4089 | .It Fl i | |
4090 | Indicates that zfs should make | |
4091 | .Ar filesystem | |
4092 | inherit the key of its parent. Note that this command can only be run on an | |
4093 | encryption root that has an encrypted parent. | |
4094 | .El | |
44f09cdc BB |
4095 | .El |
4096 | .Sh EXIT STATUS | |
4097 | The | |
4098 | .Nm | |
4099 | utility exits 0 on success, 1 if an error occurs, and 2 if invalid command line | |
4100 | options were specified. | |
4101 | .Sh EXAMPLES | |
4102 | .Bl -tag -width "" | |
4103 | .It Sy Example 1 No Creating a ZFS File System Hierarchy | |
4104 | The following commands create a file system named | |
4105 | .Em pool/home | |
4106 | and a file system named | |
4107 | .Em pool/home/bob . | |
4108 | The mount point | |
4109 | .Pa /export/home | |
4110 | is set for the parent file system, and is automatically inherited by the child | |
4111 | file system. | |
4112 | .Bd -literal | |
4113 | # zfs create pool/home | |
4114 | # zfs set mountpoint=/export/home pool/home | |
4115 | # zfs create pool/home/bob | |
4116 | .Ed | |
4117 | .It Sy Example 2 No Creating a ZFS Snapshot | |
4118 | The following command creates a snapshot named | |
4119 | .Sy yesterday . | |
4120 | This snapshot is mounted on demand in the | |
4121 | .Pa .zfs/snapshot | |
4122 | directory at the root of the | |
4123 | .Em pool/home/bob | |
4124 | file system. | |
4125 | .Bd -literal | |
4126 | # zfs snapshot pool/home/bob@yesterday | |
4127 | .Ed | |
4128 | .It Sy Example 3 No Creating and Destroying Multiple Snapshots | |
4129 | The following command creates snapshots named | |
4130 | .Sy yesterday | |
4131 | of | |
4132 | .Em pool/home | |
4133 | and all of its descendent file systems. | |
4134 | Each snapshot is mounted on demand in the | |
4135 | .Pa .zfs/snapshot | |
4136 | directory at the root of its file system. | |
4137 | The second command destroys the newly created snapshots. | |
4138 | .Bd -literal | |
4139 | # zfs snapshot -r pool/home@yesterday | |
4140 | # zfs destroy -r pool/home@yesterday | |
4141 | .Ed | |
4142 | .It Sy Example 4 No Disabling and Enabling File System Compression | |
4143 | The following command disables the | |
4144 | .Sy compression | |
4145 | property for all file systems under | |
4146 | .Em pool/home . | |
4147 | The next command explicitly enables | |
4148 | .Sy compression | |
4149 | for | |
4150 | .Em pool/home/anne . | |
4151 | .Bd -literal | |
4152 | # zfs set compression=off pool/home | |
4153 | # zfs set compression=on pool/home/anne | |
4154 | .Ed | |
4155 | .It Sy Example 5 No Listing ZFS Datasets | |
4156 | The following command lists all active file systems and volumes in the system. | |
4157 | Snapshots are displayed if the | |
4158 | .Sy listsnaps | |
4159 | property is | |
4160 | .Sy on . | |
4161 | The default is | |
4162 | .Sy off . | |
4163 | See | |
4164 | .Xr zpool 8 | |
4165 | for more information on pool properties. | |
4166 | .Bd -literal | |
4167 | # zfs list | |
4168 | NAME USED AVAIL REFER MOUNTPOINT | |
4169 | pool 450K 457G 18K /pool | |
4170 | pool/home 315K 457G 21K /export/home | |
4171 | pool/home/anne 18K 457G 18K /export/home/anne | |
4172 | pool/home/bob 276K 457G 276K /export/home/bob | |
4173 | .Ed | |
4174 | .It Sy Example 6 No Setting a Quota on a ZFS File System | |
4175 | The following command sets a quota of 50 Gbytes for | |
4176 | .Em pool/home/bob . | |
4177 | .Bd -literal | |
4178 | # zfs set quota=50G pool/home/bob | |
4179 | .Ed | |
4180 | .It Sy Example 7 No Listing ZFS Properties | |
4181 | The following command lists all properties for | |
4182 | .Em pool/home/bob . | |
4183 | .Bd -literal | |
4184 | # zfs get all pool/home/bob | |
058ac9ba BB |
4185 | NAME PROPERTY VALUE SOURCE |
4186 | pool/home/bob type filesystem - | |
4187 | pool/home/bob creation Tue Jul 21 15:53 2009 - | |
4188 | pool/home/bob used 21K - | |
4189 | pool/home/bob available 20.0G - | |
4190 | pool/home/bob referenced 21K - | |
4191 | pool/home/bob compressratio 1.00x - | |
4192 | pool/home/bob mounted yes - | |
4193 | pool/home/bob quota 20G local | |
4194 | pool/home/bob reservation none default | |
4195 | pool/home/bob recordsize 128K default | |
4196 | pool/home/bob mountpoint /pool/home/bob default | |
4197 | pool/home/bob sharenfs off default | |
4198 | pool/home/bob checksum on default | |
4199 | pool/home/bob compression on local | |
4200 | pool/home/bob atime on default | |
4201 | pool/home/bob devices on default | |
4202 | pool/home/bob exec on default | |
4203 | pool/home/bob setuid on default | |
4204 | pool/home/bob readonly off default | |
4205 | pool/home/bob zoned off default | |
4206 | pool/home/bob snapdir hidden default | |
023699cd | 4207 | pool/home/bob acltype off default |
058ac9ba BB |
4208 | pool/home/bob aclinherit restricted default |
4209 | pool/home/bob canmount on default | |
058ac9ba BB |
4210 | pool/home/bob xattr on default |
4211 | pool/home/bob copies 1 default | |
4212 | pool/home/bob version 4 - | |
4213 | pool/home/bob utf8only off - | |
4214 | pool/home/bob normalization none - | |
4215 | pool/home/bob casesensitivity sensitive - | |
4216 | pool/home/bob vscan off default | |
4217 | pool/home/bob nbmand off default | |
4218 | pool/home/bob sharesmb off default | |
4219 | pool/home/bob refquota none default | |
4220 | pool/home/bob refreservation none default | |
4221 | pool/home/bob primarycache all default | |
4222 | pool/home/bob secondarycache all default | |
4223 | pool/home/bob usedbysnapshots 0 - | |
4224 | pool/home/bob usedbydataset 21K - | |
4225 | pool/home/bob usedbychildren 0 - | |
4226 | pool/home/bob usedbyrefreservation 0 - | |
44f09cdc BB |
4227 | .Ed |
4228 | .Pp | |
058ac9ba | 4229 | The following command gets a single property value. |
44f09cdc BB |
4230 | .Bd -literal |
4231 | # zfs get -H -o value compression pool/home/bob | |
058ac9ba | 4232 | on |
44f09cdc BB |
4233 | .Ed |
4234 | The following command lists all properties with local settings for | |
4235 | .Em pool/home/bob . | |
4236 | .Bd -literal | |
4237 | # zfs get -r -s local -o name,property,value all pool/home/bob | |
058ac9ba BB |
4238 | NAME PROPERTY VALUE |
4239 | pool/home/bob quota 20G | |
4240 | pool/home/bob compression on | |
44f09cdc BB |
4241 | .Ed |
4242 | .It Sy Example 8 No Rolling Back a ZFS File System | |
4243 | The following command reverts the contents of | |
4244 | .Em pool/home/anne | |
4245 | to the snapshot named | |
4246 | .Sy yesterday , | |
4247 | deleting all intermediate snapshots. | |
4248 | .Bd -literal | |
4249 | # zfs rollback -r pool/home/anne@yesterday | |
4250 | .Ed | |
4251 | .It Sy Example 9 No Creating a ZFS Clone | |
4252 | The following command creates a writable file system whose initial contents are | |
4253 | the same as | |
4254 | .Em pool/home/bob@yesterday . | |
4255 | .Bd -literal | |
4256 | # zfs clone pool/home/bob@yesterday pool/clone | |
4257 | .Ed | |
4258 | .It Sy Example 10 No Promoting a ZFS Clone | |
4259 | The following commands illustrate how to test out changes to a file system, and | |
4260 | then replace the original file system with the changed one, using clones, clone | |
4261 | promotion, and renaming: | |
4262 | .Bd -literal | |
4263 | # zfs create pool/project/production | |
058ac9ba | 4264 | populate /pool/project/production with data |
44f09cdc BB |
4265 | # zfs snapshot pool/project/production@today |
4266 | # zfs clone pool/project/production@today pool/project/beta | |
4267 | make changes to /pool/project/beta and test them | |
4268 | # zfs promote pool/project/beta | |
4269 | # zfs rename pool/project/production pool/project/legacy | |
4270 | # zfs rename pool/project/beta pool/project/production | |
4271 | once the legacy version is no longer needed, it can be destroyed | |
4272 | # zfs destroy pool/project/legacy | |
4273 | .Ed | |
4274 | .It Sy Example 11 No Inheriting ZFS Properties | |
4275 | The following command causes | |
4276 | .Em pool/home/bob | |
4277 | and | |
4278 | .Em pool/home/anne | |
4279 | to inherit the | |
4280 | .Sy checksum | |
4281 | property from their parent. | |
4282 | .Bd -literal | |
4283 | # zfs inherit checksum pool/home/bob pool/home/anne | |
4284 | .Ed | |
4285 | .It Sy Example 12 No Remotely Replicating ZFS Data | |
4286 | The following commands send a full stream and then an incremental stream to a | |
4287 | remote machine, restoring them into | |
4288 | .Em poolB/received/fs@a | |
4289 | and | |
4290 | .Em poolB/received/fs@b , | |
4291 | respectively. | |
4292 | .Em poolB | |
4293 | must contain the file system | |
4294 | .Em poolB/received , | |
4295 | and must not initially contain | |
4296 | .Em poolB/received/fs . | |
4297 | .Bd -literal | |
4298 | # zfs send pool/fs@a | \e | |
4299 | ssh host zfs receive poolB/received/fs@a | |
4300 | # zfs send -i a pool/fs@b | \e | |
4301 | ssh host zfs receive poolB/received/fs | |
4302 | .Ed | |
4303 | .It Sy Example 13 No Using the zfs receive -d Option | |
4304 | The following command sends a full stream of | |
4305 | .Em poolA/fsA/fsB@snap | |
4306 | to a remote machine, receiving it into | |
4307 | .Em poolB/received/fsA/fsB@snap . | |
4308 | The | |
4309 | .Em fsA/fsB@snap | |
4310 | portion of the received snapshot's name is determined from the name of the sent | |
4311 | snapshot. | |
4312 | .Em poolB | |
4313 | must contain the file system | |
4314 | .Em poolB/received . | |
4315 | If | |
4316 | .Em poolB/received/fsA | |
4317 | does not exist, it is created as an empty file system. | |
4318 | .Bd -literal | |
4319 | # zfs send poolA/fsA/fsB@snap | \e | |
4320 | ssh host zfs receive -d poolB/received | |
4321 | .Ed | |
4322 | .It Sy Example 14 No Setting User Properties | |
4323 | The following example sets the user-defined | |
4324 | .Sy com.example:department | |
4325 | property for a dataset. | |
4326 | .Bd -literal | |
4327 | # zfs set com.example:department=12345 tank/accounting | |
4328 | .Ed | |
4329 | .It Sy Example 15 No Performing a Rolling Snapshot | |
4330 | The following example shows how to maintain a history of snapshots with a | |
4331 | consistent naming scheme. | |
4332 | To keep a week's worth of snapshots, the user destroys the oldest snapshot, | |
4333 | renames the remaining snapshots, and then creates a new snapshot, as follows: | |
4334 | .Bd -literal | |
4335 | # zfs destroy -r pool/users@7daysago | |
4336 | # zfs rename -r pool/users@6daysago @7daysago | |
4337 | # zfs rename -r pool/users@5daysago @6daysago | |
4338 | # zfs rename -r pool/users@yesterday @5daysago | |
4339 | # zfs rename -r pool/users@yesterday @4daysago | |
4340 | # zfs rename -r pool/users@yesterday @3daysago | |
4341 | # zfs rename -r pool/users@yesterday @2daysago | |
4342 | # zfs rename -r pool/users@today @yesterday | |
4343 | # zfs snapshot -r pool/users@today | |
4344 | .Ed | |
4345 | .It Sy Example 16 No Setting sharenfs Property Options on a ZFS File System | |
4346 | The following commands show how to set | |
4347 | .Sy sharenfs | |
4348 | property options to enable | |
4349 | .Sy rw | |
4350 | access for a set of | |
4351 | .Sy IP | |
4352 | addresses and to enable root access for system | |
4353 | .Sy neo | |
4354 | on the | |
4355 | .Em tank/home | |
4356 | file system. | |
4357 | .Bd -literal | |
4358 | # zfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home | |
4359 | .Ed | |
4360 | .Pp | |
4361 | If you are using | |
4362 | .Sy DNS | |
4363 | for host name resolution, specify the fully qualified hostname. | |
4364 | .It Sy Example 17 No Delegating ZFS Administration Permissions on a ZFS Dataset | |
4365 | The following example shows how to set permissions so that user | |
4366 | .Sy cindys | |
4367 | can create, destroy, mount, and take snapshots on | |
4368 | .Em tank/cindys . | |
4369 | The permissions on | |
4370 | .Em tank/cindys | |
4371 | are also displayed. | |
4372 | .Bd -literal | |
4373 | # zfs allow cindys create,destroy,mount,snapshot tank/cindys | |
4374 | # zfs allow tank/cindys | |
4375 | ---- Permissions on tank/cindys -------------------------------------- | |
4376 | Local+Descendent permissions: | |
4377 | user cindys create,destroy,mount,snapshot | |
4378 | .Ed | |
4379 | .Pp | |
4380 | Because the | |
4381 | .Em tank/cindys | |
4382 | mount point permission is set to 755 by default, user | |
4383 | .Sy cindys | |
4384 | will be unable to mount file systems under | |
4385 | .Em tank/cindys . | |
4386 | Add an ACE similar to the following syntax to provide mount point access: | |
4387 | .Bd -literal | |
4388 | # chmod A+user:cindys:add_subdirectory:allow /tank/cindys | |
4389 | .Ed | |
4390 | .It Sy Example 18 No Delegating Create Time Permissions on a ZFS Dataset | |
4391 | The following example shows how to grant anyone in the group | |
4392 | .Sy staff | |
4393 | to create file systems in | |
4394 | .Em tank/users . | |
4395 | This syntax also allows staff members to destroy their own file systems, but not | |
4396 | destroy anyone else's file system. | |
4397 | The permissions on | |
4398 | .Em tank/users | |
4399 | are also displayed. | |
4400 | .Bd -literal | |
4401 | # zfs allow staff create,mount tank/users | |
4402 | # zfs allow -c destroy tank/users | |
4403 | # zfs allow tank/users | |
4404 | ---- Permissions on tank/users --------------------------------------- | |
4405 | Permission sets: | |
4406 | destroy | |
4407 | Local+Descendent permissions: | |
4408 | group staff create,mount | |
4409 | .Ed | |
4410 | .It Sy Example 19 No Defining and Granting a Permission Set on a ZFS Dataset | |
4411 | The following example shows how to define and grant a permission set on the | |
4412 | .Em tank/users | |
4413 | file system. | |
4414 | The permissions on | |
4415 | .Em tank/users | |
4416 | are also displayed. | |
4417 | .Bd -literal | |
4418 | # zfs allow -s @pset create,destroy,snapshot,mount tank/users | |
4419 | # zfs allow staff @pset tank/users | |
4420 | # zfs allow tank/users | |
4421 | ---- Permissions on tank/users --------------------------------------- | |
4422 | Permission sets: | |
058ac9ba | 4423 | @pset create,destroy,mount,snapshot |
44f09cdc BB |
4424 | Local+Descendent permissions: |
4425 | group staff @pset | |
4426 | .Ed | |
4427 | .It Sy Example 20 No Delegating Property Permissions on a ZFS Dataset | |
4428 | The following example shows to grant the ability to set quotas and reservations | |
4429 | on the | |
4430 | .Em users/home | |
4431 | file system. | |
4432 | The permissions on | |
4433 | .Em users/home | |
4434 | are also displayed. | |
4435 | .Bd -literal | |
4436 | # zfs allow cindys quota,reservation users/home | |
4437 | # zfs allow users/home | |
4438 | ---- Permissions on users/home --------------------------------------- | |
4439 | Local+Descendent permissions: | |
058ac9ba | 4440 | user cindys quota,reservation |
44f09cdc BB |
4441 | cindys% zfs set quota=10G users/home/marks |
4442 | cindys% zfs get quota users/home/marks | |
4443 | NAME PROPERTY VALUE SOURCE | |
4444 | users/home/marks quota 10G local | |
4445 | .Ed | |
4446 | .It Sy Example 21 No Removing ZFS Delegated Permissions on a ZFS Dataset | |
4447 | The following example shows how to remove the snapshot permission from the | |
4448 | .Sy staff | |
4449 | group on the | |
4450 | .Em tank/users | |
4451 | file system. | |
4452 | The permissions on | |
4453 | .Em tank/users | |
4454 | are also displayed. | |
4455 | .Bd -literal | |
4456 | # zfs unallow staff snapshot tank/users | |
4457 | # zfs allow tank/users | |
4458 | ---- Permissions on tank/users --------------------------------------- | |
4459 | Permission sets: | |
058ac9ba | 4460 | @pset create,destroy,mount,snapshot |
44f09cdc BB |
4461 | Local+Descendent permissions: |
4462 | group staff @pset | |
4463 | .Ed | |
4464 | .It Sy Example 22 No Showing the differences between a snapshot and a ZFS Dataset | |
0677cb6f | 4465 | The following example shows how to see what has changed between a prior |
44f09cdc BB |
4466 | snapshot of a ZFS dataset and its current state. |
4467 | The | |
4468 | .Fl F | |
4469 | option is used to indicate type information for the files affected. | |
4470 | .Bd -literal | |
0677cb6f RL |
4471 | # zfs diff -F tank/test@before tank/test |
4472 | M / /tank/test/ | |
4473 | M F /tank/test/linked (+1) | |
4474 | R F /tank/test/oldname -> /tank/test/newname | |
4475 | - F /tank/test/deleted | |
4476 | + F /tank/test/created | |
4477 | M F /tank/test/modified | |
44f09cdc BB |
4478 | .Ed |
4479 | .It Sy Example 23 No Creating a bookmark | |
4480 | The following example create a bookmark to a snapshot. This bookmark | |
4481 | can then be used instead of snapshot in send streams. | |
4482 | .Bd -literal | |
a215ee16 | 4483 | # zfs bookmark rpool@snapshot rpool#bookmark |
44f09cdc BB |
4484 | .Ed |
4485 | .It Sy Example 24 No Setting sharesmb Property Options on a ZFS File System | |
4486 | The following example show how to share SMB filesystem through ZFS. Note that | |
4487 | that a user and his/her password must be given. | |
4488 | .Bd -literal | |
4489 | # smbmount //127.0.0.1/share_tmp /mnt/tmp \\ | |
4490 | -o user=workgroup/turbo,password=obrut,uid=1000 | |
4491 | .Ed | |
4492 | .Pp | |
4493 | Minimal | |
4494 | .Em /etc/samba/smb.conf | |
4495 | configuration required: | |
4496 | .Pp | |
4497 | Samba will need to listen to 'localhost' (127.0.0.1) for the ZFS utilities to | |
4498 | communicate with Samba. This is the default behavior for most Linux | |
4499 | distributions. | |
4500 | .Pp | |
4501 | Samba must be able to authenticate a user. This can be done in a number of | |
4502 | ways, depending on if using the system password file, LDAP or the Samba | |
4503 | specific smbpasswd file. How to do this is outside the scope of this manual. | |
4504 | Please refer to the | |
4505 | .Xr smb.conf 5 | |
4506 | man page for more information. | |
4507 | .Pp | |
4508 | See the | |
4509 | .Sy USERSHARE section | |
4510 | of the | |
4511 | .Xr smb.conf 5 | |
4512 | man page for all configuration options in case you need to modify any options | |
4513 | to the share afterwards. Do note that any changes done with the | |
4514 | .Xr net 8 | |
4515 | command will be undone if the share is ever unshared (such as at a reboot etc). | |
4516 | .El | |
4517 | .Sh INTERFACE STABILITY | |
4518 | .Sy Committed . | |
4519 | .Sh SEE ALSO | |
4520 | .Xr gzip 1 , | |
4521 | .Xr ssh 1 , | |
4522 | .Xr mount 8 , | |
4523 | .Xr zpool 8 , | |
4524 | .Xr selinux 8 , | |
4525 | .Xr chmod 2 , | |
4526 | .Xr stat 2 , | |
4527 | .Xr write 2 , | |
4528 | .Xr fsync 2 , | |
4529 | .Xr attr 1 , | |
4530 | .Xr acl 5 , | |
4531 | .Xr exports 5 , | |
4532 | .Xr exportfs 8 , | |
4533 | .Xr net 8 , | |
4534 | .Xr attributes 5 |