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