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