xref: /titanic_50/usr/src/man/man1m/zfs.1m (revision e6d2808da122031b67a8aac4648fb4b5a9206c9e)
189f5d17bSYuri Pankov.\"
289f5d17bSYuri Pankov.\" CDDL HEADER START
389f5d17bSYuri Pankov.\"
489f5d17bSYuri Pankov.\" The contents of this file are subject to the terms of the
589f5d17bSYuri Pankov.\" Common Development and Distribution License (the "License").
689f5d17bSYuri Pankov.\" You may not use this file except in compliance with the License.
789f5d17bSYuri Pankov.\"
889f5d17bSYuri Pankov.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
989f5d17bSYuri Pankov.\" or http://www.opensolaris.org/os/licensing.
1089f5d17bSYuri Pankov.\" See the License for the specific language governing permissions
1189f5d17bSYuri Pankov.\" and limitations under the License.
1289f5d17bSYuri Pankov.\"
1389f5d17bSYuri Pankov.\" When distributing Covered Code, include this CDDL HEADER in each
1489f5d17bSYuri Pankov.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1589f5d17bSYuri Pankov.\" If applicable, add the following below this CDDL HEADER, with the
1689f5d17bSYuri Pankov.\" fields enclosed by brackets "[]" replaced with your own identifying
1789f5d17bSYuri Pankov.\" information: Portions Copyright [yyyy] [name of copyright owner]
1889f5d17bSYuri Pankov.\"
1989f5d17bSYuri Pankov.\" CDDL HEADER END
2089f5d17bSYuri Pankov.\"
2189f5d17bSYuri Pankov.\"
22c10c16deSRichard Lowe.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
236658b4ffSJoshua M. Clulow.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
2468ecb2ecSPaul Dagnelie.\" Copyright (c) 2011, 2015 by Delphix. All rights reserved.
25a6f561b4SSašo Kiselkov.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
26a2afb611SJerry Jelinek.\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
27409f1c06SAdam Stevko.\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
28b3cff10cSYuri Pankov.\" Copyright 2015 Nexenta Systems, Inc.  All Rights Reserved.
29c3d26abcSMatthew Ahrens.\" Copyright (c) 2014 Integros [integros.com]
3089f5d17bSYuri Pankov.\"
31*e6d2808dSMarcel Telka.Dd February 25, 2021
32b3cff10cSYuri Pankov.Dt ZFS 1M
33b3cff10cSYuri Pankov.Os
34b3cff10cSYuri Pankov.Sh NAME
35b3cff10cSYuri Pankov.Nm zfs
36b3cff10cSYuri Pankov.Nd configures ZFS file systems
37b3cff10cSYuri Pankov.Sh SYNOPSIS
38b3cff10cSYuri Pankov.Nm
39b3cff10cSYuri Pankov.Op Fl \?
40b3cff10cSYuri Pankov.Nm
41b3cff10cSYuri Pankov.Cm create
42b3cff10cSYuri Pankov.Op Fl p
43b3cff10cSYuri Pankov.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
44b3cff10cSYuri Pankov.Ar filesystem
45b3cff10cSYuri Pankov.Nm
46b3cff10cSYuri Pankov.Cm create
47b3cff10cSYuri Pankov.Op Fl ps
48b3cff10cSYuri Pankov.Op Fl b Ar blocksize
49b3cff10cSYuri Pankov.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
50b3cff10cSYuri Pankov.Fl V Ar size Ar volume
51b3cff10cSYuri Pankov.Nm
52b3cff10cSYuri Pankov.Cm destroy
53b3cff10cSYuri Pankov.Op Fl Rfnprv
54b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume
55b3cff10cSYuri Pankov.Nm
56b3cff10cSYuri Pankov.Cm destroy
57b3cff10cSYuri Pankov.Op Fl Rdnprv
58b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume Ns @ Ns Ar snap Ns
59b3cff10cSYuri Pankov.Oo % Ns Ar snap Ns Oo , Ns Ar snap Ns Oo % Ns Ar snap Oc Oc Oc Ns ...
60b3cff10cSYuri Pankov.Nm
61b3cff10cSYuri Pankov.Cm destroy
62b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
63b3cff10cSYuri Pankov.Nm
64b3cff10cSYuri Pankov.Cm snapshot
65b3cff10cSYuri Pankov.Op Fl r
66b3cff10cSYuri Pankov.Oo Fl o Ar property Ns = Ns value Oc Ns ...
67b3cff10cSYuri Pankov.Ar filesystem Ns @ Ns Ar snapname Ns | Ns Ar volume Ns @ Ns Ar snapname Ns ...
68b3cff10cSYuri Pankov.Nm
69b3cff10cSYuri Pankov.Cm rollback
70b3cff10cSYuri Pankov.Op Fl Rfr
71b3cff10cSYuri Pankov.Ar snapshot
72b3cff10cSYuri Pankov.Nm
73b3cff10cSYuri Pankov.Cm clone
74b3cff10cSYuri Pankov.Op Fl p
75b3cff10cSYuri Pankov.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
76b3cff10cSYuri Pankov.Ar snapshot Ar filesystem Ns | Ns Ar volume
77b3cff10cSYuri Pankov.Nm
78b3cff10cSYuri Pankov.Cm promote
79b3cff10cSYuri Pankov.Ar clone-filesystem
80b3cff10cSYuri Pankov.Nm
81b3cff10cSYuri Pankov.Cm rename
82b3cff10cSYuri Pankov.Op Fl f
83b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
84b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
85b3cff10cSYuri Pankov.Nm
86b3cff10cSYuri Pankov.Cm rename
87b3cff10cSYuri Pankov.Op Fl fp
88b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume
89b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume
90b3cff10cSYuri Pankov.Nm
91b3cff10cSYuri Pankov.Cm rename
92b3cff10cSYuri Pankov.Fl r
93b3cff10cSYuri Pankov.Ar snapshot Ar snapshot
94b3cff10cSYuri Pankov.Nm
95b3cff10cSYuri Pankov.Cm list
96b3cff10cSYuri Pankov.Op Fl r Ns | Ns Fl d Ar depth
97b3cff10cSYuri Pankov.Op Fl Hp
98b3cff10cSYuri Pankov.Oo Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... Oc
99b3cff10cSYuri Pankov.Oo Fl s Ar property Oc Ns ...
100b3cff10cSYuri Pankov.Oo Fl S Ar property Oc Ns ...
101b3cff10cSYuri Pankov.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
102b3cff10cSYuri Pankov.Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Oc Ns ...
103b3cff10cSYuri Pankov.Nm
104b3cff10cSYuri Pankov.Cm set
105b3cff10cSYuri Pankov.Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ...
106b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
107b3cff10cSYuri Pankov.Nm
108b3cff10cSYuri Pankov.Cm get
109b3cff10cSYuri Pankov.Op Fl r Ns | Ns Fl d Ar depth
110b3cff10cSYuri Pankov.Op Fl Hp
111b3cff10cSYuri Pankov.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
112b3cff10cSYuri Pankov.Oo Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... Oc
113b3cff10cSYuri Pankov.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
114b3cff10cSYuri Pankov.Cm all | Ar property Ns Oo , Ns Ar property Oc Ns ...
115fbc66171SMarcel Telka.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns | Ns Ar bookmark Ns ...
116b3cff10cSYuri Pankov.Nm
117b3cff10cSYuri Pankov.Cm inherit
118b3cff10cSYuri Pankov.Op Fl rS
119b3cff10cSYuri Pankov.Ar property Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
120b3cff10cSYuri Pankov.Nm
121b3cff10cSYuri Pankov.Cm upgrade
122b3cff10cSYuri Pankov.Nm
123b3cff10cSYuri Pankov.Cm upgrade
124b3cff10cSYuri Pankov.Fl v
125b3cff10cSYuri Pankov.Nm
126b3cff10cSYuri Pankov.Cm upgrade
127b3cff10cSYuri Pankov.Op Fl r
128b3cff10cSYuri Pankov.Op Fl V Ar version
129b3cff10cSYuri Pankov.Fl a | Ar filesystem
130b3cff10cSYuri Pankov.Nm
131b3cff10cSYuri Pankov.Cm userspace
132b3cff10cSYuri Pankov.Op Fl Hinp
133b3cff10cSYuri Pankov.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
134b3cff10cSYuri Pankov.Oo Fl s Ar field Oc Ns ...
135b3cff10cSYuri Pankov.Oo Fl S Ar field Oc Ns ...
136b3cff10cSYuri Pankov.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
137b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar snapshot
138b3cff10cSYuri Pankov.Nm
139b3cff10cSYuri Pankov.Cm groupspace
140b3cff10cSYuri Pankov.Op Fl Hinp
141b3cff10cSYuri Pankov.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
142b3cff10cSYuri Pankov.Oo Fl s Ar field Oc Ns ...
143b3cff10cSYuri Pankov.Oo Fl S Ar field Oc Ns ...
144b3cff10cSYuri Pankov.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
145b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar snapshot
146b3cff10cSYuri Pankov.Nm
147b3cff10cSYuri Pankov.Cm mount
148b3cff10cSYuri Pankov.Nm
149b3cff10cSYuri Pankov.Cm mount
150b3cff10cSYuri Pankov.Op Fl Ov
151b3cff10cSYuri Pankov.Op Fl o Ar options
152b3cff10cSYuri Pankov.Fl a | Ar filesystem
153b3cff10cSYuri Pankov.Nm
154b3cff10cSYuri Pankov.Cm unmount
155b3cff10cSYuri Pankov.Op Fl f
156b3cff10cSYuri Pankov.Fl a | Ar filesystem Ns | Ns Ar mountpoint
157b3cff10cSYuri Pankov.Nm
158b3cff10cSYuri Pankov.Cm share
159b3cff10cSYuri Pankov.Fl a | Ar filesystem
160b3cff10cSYuri Pankov.Nm
161b3cff10cSYuri Pankov.Cm unshare
162b3cff10cSYuri Pankov.Fl a | Ar filesystem Ns | Ns Ar mountpoint
163b3cff10cSYuri Pankov.Nm
164b3cff10cSYuri Pankov.Cm bookmark
165b3cff10cSYuri Pankov.Ar snapshot bookmark
166b3cff10cSYuri Pankov.Nm
167b3cff10cSYuri Pankov.Cm send
168b3cff10cSYuri Pankov.Op Fl DLPRenpv
169b3cff10cSYuri Pankov.Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot
170b3cff10cSYuri Pankov.Ar snapshot
171b3cff10cSYuri Pankov.Nm
172b3cff10cSYuri Pankov.Cm send
173b3cff10cSYuri Pankov.Op Fl Le
174b3cff10cSYuri Pankov.Op Fl i Ar snapshot Ns | Ns Ar bookmark
175b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
176b3cff10cSYuri Pankov.Nm
1779c3fd121SMatthew Ahrens.Cm send
1789c3fd121SMatthew Ahrens.Op Fl Penv
1799c3fd121SMatthew Ahrens.Fl t Ar receive_resume_token
1809c3fd121SMatthew Ahrens.Nm
181b3cff10cSYuri Pankov.Cm receive
1829c3fd121SMatthew Ahrens.Op Fl Fnsuv
183a2cdcdd2SPaul Dagnelie.Op Fl o Sy origin Ns = Ns Ar snapshot
184b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
185b3cff10cSYuri Pankov.Nm
186b3cff10cSYuri Pankov.Cm receive
1879c3fd121SMatthew Ahrens.Op Fl Fnsuv
188b3cff10cSYuri Pankov.Op Fl d Ns | Ns Fl e
189a2cdcdd2SPaul Dagnelie.Op Fl o Sy origin Ns = Ns Ar snapshot
190b3cff10cSYuri Pankov.Ar filesystem
191b3cff10cSYuri Pankov.Nm
1929c3fd121SMatthew Ahrens.Cm receive
1939c3fd121SMatthew Ahrens.Fl A
1949c3fd121SMatthew Ahrens.Ar filesystem Ns | Ns Ar volume
1959c3fd121SMatthew Ahrens.Nm
196b3cff10cSYuri Pankov.Cm allow
197b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume
198b3cff10cSYuri Pankov.Nm
199b3cff10cSYuri Pankov.Cm allow
200b3cff10cSYuri Pankov.Op Fl dglu
201b3cff10cSYuri Pankov.Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
202b3cff10cSYuri Pankov.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
203b3cff10cSYuri Pankov.Ar setname Oc Ns ...
204b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume
205b3cff10cSYuri Pankov.Nm
206b3cff10cSYuri Pankov.Cm allow
207b3cff10cSYuri Pankov.Op Fl dl
208b3cff10cSYuri Pankov.Fl e Ns | Ns Sy everyone
209b3cff10cSYuri Pankov.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
210b3cff10cSYuri Pankov.Ar setname Oc Ns ...
211b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume
212b3cff10cSYuri Pankov.Nm
213b3cff10cSYuri Pankov.Cm allow
214b3cff10cSYuri Pankov.Fl c
215b3cff10cSYuri Pankov.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
216b3cff10cSYuri Pankov.Ar setname Oc Ns ...
217b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume
218b3cff10cSYuri Pankov.Nm
219b3cff10cSYuri Pankov.Cm allow
220b3cff10cSYuri Pankov.Fl s No @ Ns Ar setname
221b3cff10cSYuri Pankov.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
222b3cff10cSYuri Pankov.Ar setname Oc Ns ...
223b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume
224b3cff10cSYuri Pankov.Nm
225b3cff10cSYuri Pankov.Cm unallow
226b3cff10cSYuri Pankov.Op Fl dglru
227b3cff10cSYuri Pankov.Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
228b3cff10cSYuri Pankov.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
229b3cff10cSYuri Pankov.Ar setname Oc Ns ... Oc
230b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume
231b3cff10cSYuri Pankov.Nm
232b3cff10cSYuri Pankov.Cm unallow
233b3cff10cSYuri Pankov.Op Fl dlr
234b3cff10cSYuri Pankov.Fl e Ns | Ns Sy everyone
235b3cff10cSYuri Pankov.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
236b3cff10cSYuri Pankov.Ar setname Oc Ns ... Oc
237b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume
238b3cff10cSYuri Pankov.Nm
239b3cff10cSYuri Pankov.Cm unallow
240b3cff10cSYuri Pankov.Op Fl r
241b3cff10cSYuri Pankov.Fl c
242b3cff10cSYuri Pankov.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
243b3cff10cSYuri Pankov.Ar setname Oc Ns ... Oc
244b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume
245b3cff10cSYuri Pankov.Nm
246b3cff10cSYuri Pankov.Cm unallow
247b3cff10cSYuri Pankov.Op Fl r
248b3cff10cSYuri Pankov.Fl s @ Ns Ar setname
249b3cff10cSYuri Pankov.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
250b3cff10cSYuri Pankov.Ar setname Oc Ns ... Oc
251b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume
252b3cff10cSYuri Pankov.Nm
253b3cff10cSYuri Pankov.Cm hold
254b3cff10cSYuri Pankov.Op Fl r
255b3cff10cSYuri Pankov.Ar tag Ar snapshot Ns ...
256b3cff10cSYuri Pankov.Nm
257b3cff10cSYuri Pankov.Cm holds
258b3cff10cSYuri Pankov.Op Fl r
259b3cff10cSYuri Pankov.Ar snapshot Ns ...
260b3cff10cSYuri Pankov.Nm
261b3cff10cSYuri Pankov.Cm release
262b3cff10cSYuri Pankov.Op Fl r
263b3cff10cSYuri Pankov.Ar tag Ar snapshot Ns ...
264b3cff10cSYuri Pankov.Nm
265b3cff10cSYuri Pankov.Cm diff
266b3cff10cSYuri Pankov.Op Fl FHt
267b3cff10cSYuri Pankov.Ar snapshot Ar snapshot Ns | Ns Ar filesystem
268b3cff10cSYuri Pankov.Sh DESCRIPTION
269b3cff10cSYuri PankovThe
270b3cff10cSYuri Pankov.Nm
271b3cff10cSYuri Pankovcommand configures ZFS datasets within a ZFS storage pool, as described in
272b3cff10cSYuri Pankov.Xr zpool 1M .
273b3cff10cSYuri PankovA dataset is identified by a unique path within the ZFS namespace. For example:
274b3cff10cSYuri Pankov.Bd -literal
275c10c16deSRichard Lowepool/{filesystem,volume,snapshot}
276b3cff10cSYuri Pankov.Ed
277b3cff10cSYuri Pankov.Pp
278b3cff10cSYuri Pankovwhere the maximum length of a dataset name is
279b3cff10cSYuri Pankov.Dv MAXNAMELEN
280b3cff10cSYuri Pankov.Pq 256 bytes .
281b3cff10cSYuri Pankov.Pp
282c10c16deSRichard LoweA dataset can be one of the following:
283b3cff10cSYuri Pankov.Bl -tag -width "file system"
284b3cff10cSYuri Pankov.It Sy file system
285b3cff10cSYuri PankovA ZFS dataset of type
286b3cff10cSYuri Pankov.Sy filesystem
287b3cff10cSYuri Pankovcan be mounted within the standard system namespace and behaves like other file
288b3cff10cSYuri Pankovsystems. While ZFS file systems are designed to be POSIX compliant, known issues
289b3cff10cSYuri Pankovexist that prevent compliance in some cases. Applications that depend on
290b3cff10cSYuri Pankovstandards conformance might fail due to non-standard behavior when checking file
291b3cff10cSYuri Pankovsystem free space.
292b3cff10cSYuri Pankov.It Sy volume
293c10c16deSRichard LoweA logical volume exported as a raw or block device. This type of dataset should
294c10c16deSRichard Loweonly be used under special circumstances. File systems are typically used in
295c10c16deSRichard Lowemost environments.
296b3cff10cSYuri Pankov.It Sy snapshot
297c10c16deSRichard LoweA read-only version of a file system or volume at a given point in time. It is
298b3cff10cSYuri Pankovspecified as
299b3cff10cSYuri Pankov.Ar filesystem Ns @ Ns Ar name
300b3cff10cSYuri Pankovor
301b3cff10cSYuri Pankov.Ar volume Ns @ Ns Ar name .
302b3cff10cSYuri Pankov.El
303b3cff10cSYuri Pankov.Ss ZFS File System Hierarchy
304b3cff10cSYuri PankovA ZFS storage pool is a logical collection of devices that provide space for
305b3cff10cSYuri Pankovdatasets. A storage pool is also the root of the ZFS file system hierarchy.
306b3cff10cSYuri Pankov.Pp
307c10c16deSRichard LoweThe root of the pool can be accessed as a file system, such as mounting and
308c10c16deSRichard Loweunmounting, taking snapshots, and setting properties. The physical storage
309b3cff10cSYuri Pankovcharacteristics, however, are managed by the
310b3cff10cSYuri Pankov.Xr zpool 1M
311b3cff10cSYuri Pankovcommand.
312b3cff10cSYuri Pankov.Pp
313b3cff10cSYuri PankovSee
314b3cff10cSYuri Pankov.Xr zpool 1M
315b3cff10cSYuri Pankovfor more information on creating and administering pools.
316b3cff10cSYuri Pankov.Ss Snapshots
317c10c16deSRichard LoweA snapshot is a read-only copy of a file system or volume. Snapshots can be
318c10c16deSRichard Lowecreated extremely quickly, and initially consume no additional space within the
319c10c16deSRichard Lowepool. As data within the active dataset changes, the snapshot consumes more
320c10c16deSRichard Lowedata than would otherwise be shared with the active dataset.
321b3cff10cSYuri Pankov.Pp
322c10c16deSRichard LoweSnapshots can have arbitrary names. Snapshots of volumes can be cloned or
323c10c16deSRichard Lowerolled back, but cannot be accessed independently.
324b3cff10cSYuri Pankov.Pp
325b3cff10cSYuri PankovFile system snapshots can be accessed under the
326b3cff10cSYuri Pankov.Pa .zfs/snapshot
327b3cff10cSYuri Pankovdirectory in the root of the file system. Snapshots are automatically mounted on
328b3cff10cSYuri Pankovdemand and may be unmounted at regular intervals. The visibility of the
329b3cff10cSYuri Pankov.Pa .zfs
330b3cff10cSYuri Pankovdirectory can be controlled by the
331b3cff10cSYuri Pankovsnapdir
332b3cff10cSYuri Pankovproperty.
333b3cff10cSYuri Pankov.Ss Clones
334c10c16deSRichard LoweA clone is a writable volume or file system whose initial contents are the same
335b3cff10cSYuri Pankovas another dataset. As with snapshots, creating a clone is nearly instantaneous,
336b3cff10cSYuri Pankovand initially consumes no additional space.
337b3cff10cSYuri Pankov.Pp
338c10c16deSRichard LoweClones can only be created from a snapshot. When a snapshot is cloned, it
339c10c16deSRichard Lowecreates an implicit dependency between the parent and child. Even though the
340c10c16deSRichard Loweclone is created somewhere else in the dataset hierarchy, the original snapshot
341b3cff10cSYuri Pankovcannot be destroyed as long as a clone exists. The
342b3cff10cSYuri Pankov.Sy origin
343b3cff10cSYuri Pankovproperty exposes this dependency, and the
344b3cff10cSYuri Pankov.Cm destroy
345b3cff10cSYuri Pankovcommand lists any such dependencies, if they exist.
346b3cff10cSYuri Pankov.Pp
347c10c16deSRichard LoweThe clone parent-child dependency relationship can be reversed by using the
348b3cff10cSYuri Pankov.Cm promote
349b3cff10cSYuri Pankovsubcommand. This causes the
350b3cff10cSYuri Pankov.Qq origin
351b3cff10cSYuri Pankovfile system to become a clone of the specified file system, which makes it
352b3cff10cSYuri Pankovpossible to destroy the file system that the clone was created from.
353b3cff10cSYuri Pankov.Ss "Mount Points"
354b3cff10cSYuri PankovCreating a ZFS file system is a simple operation, so the number of file systems
355b3cff10cSYuri Pankovper system is likely to be numerous. To cope with this, ZFS automatically
356b3cff10cSYuri Pankovmanages mounting and unmounting file systems without the need to edit the
357b3cff10cSYuri Pankov.Pa /etc/vfstab
358b3cff10cSYuri Pankovfile. All automatically managed file systems are mounted by ZFS at boot time.
359b3cff10cSYuri Pankov.Pp
360b3cff10cSYuri PankovBy default, file systems are mounted under
361b3cff10cSYuri Pankov.Pa /path ,
362b3cff10cSYuri Pankovwhere
363b3cff10cSYuri Pankov.Ar path
364b3cff10cSYuri Pankovis the name of the file system in the ZFS namespace. Directories are created and
365b3cff10cSYuri Pankovdestroyed as needed.
366b3cff10cSYuri Pankov.Pp
367b3cff10cSYuri PankovA file system can also have a mount point set in the
368b3cff10cSYuri Pankov.Sy mountpoint
369b3cff10cSYuri Pankovproperty. This directory is created as needed, and ZFS automatically mounts the
370b3cff10cSYuri Pankovfile system when the
371b3cff10cSYuri Pankov.Nm zfs Cm mount Fl a
372b3cff10cSYuri Pankovcommand is invoked
373b3cff10cSYuri Pankov.Po without editing
374b3cff10cSYuri Pankov.Pa /etc/vfstab
375b3cff10cSYuri Pankov.Pc .
376b3cff10cSYuri PankovThe
377b3cff10cSYuri Pankov.Sy mountpoint
378b3cff10cSYuri Pankovproperty can be inherited, so if
379b3cff10cSYuri Pankov.Em pool/home
380b3cff10cSYuri Pankovhas a mount point of
381b3cff10cSYuri Pankov.Pa /export/stuff ,
382b3cff10cSYuri Pankovthen
383b3cff10cSYuri Pankov.Em pool/home/user
384b3cff10cSYuri Pankovautomatically inherits a mount point of
385b3cff10cSYuri Pankov.Pa /export/stuff/user .
386b3cff10cSYuri Pankov.Pp
387b3cff10cSYuri PankovA file system
388b3cff10cSYuri Pankov.Sy mountpoint
389b3cff10cSYuri Pankovproperty of
390b3cff10cSYuri Pankov.Sy none
391b3cff10cSYuri Pankovprevents the file system from being mounted.
392b3cff10cSYuri Pankov.Pp
393b3cff10cSYuri PankovIf needed, ZFS file systems can also be managed with traditional tools
394b3cff10cSYuri Pankov.Po
395b3cff10cSYuri Pankov.Nm mount ,
396b3cff10cSYuri Pankov.Nm umount ,
397b3cff10cSYuri Pankov.Pa /etc/vfstab
398b3cff10cSYuri Pankov.Pc .
399b3cff10cSYuri PankovIf a file system's mount point is set to
400b3cff10cSYuri Pankov.Sy legacy ,
401b3cff10cSYuri PankovZFS makes no attempt to manage the file system, and the administrator is
402b3cff10cSYuri Pankovresponsible for mounting and unmounting the file system.
403b3cff10cSYuri Pankov.Ss "Zones"
404b3cff10cSYuri PankovA ZFS file system can be added to a non-global zone by using the
405b3cff10cSYuri Pankov.Nm zonecfg Cm add Sy fs
406b3cff10cSYuri Pankovsubcommand. A ZFS file system that is added to a non-global zone must have its
407b3cff10cSYuri Pankov.Sy mountpoint
408b3cff10cSYuri Pankovproperty set to
409b3cff10cSYuri Pankov.Sy legacy .
410b3cff10cSYuri Pankov.Pp
411c10c16deSRichard LoweThe physical properties of an added file system are controlled by the global
412c10c16deSRichard Loweadministrator. However, the zone administrator can create, modify, or destroy
413b3cff10cSYuri Pankovfiles within the added file system, depending on how the file system is mounted.
414b3cff10cSYuri Pankov.Pp
415b3cff10cSYuri PankovA dataset can also be delegated to a non-global zone by using the
416b3cff10cSYuri Pankov.Nm zonecfg Cm add Sy dataset
417b3cff10cSYuri Pankovsubcommand. You cannot delegate a dataset to one zone and the children of the
418b3cff10cSYuri Pankovsame dataset to another zone. The zone administrator can change properties of
419b3cff10cSYuri Pankovthe dataset or any of its children. However, the
420b3cff10cSYuri Pankov.Sy quota ,
421b3cff10cSYuri Pankov.Sy filesystem_limit
422b3cff10cSYuri Pankovand
423b3cff10cSYuri Pankov.Sy snapshot_limit
424b3cff10cSYuri Pankovproperties of the delegated dataset can be modified only by the global
425b3cff10cSYuri Pankovadministrator.
426b3cff10cSYuri Pankov.Pp
427b3cff10cSYuri PankovA ZFS volume can be added as a device to a non-global zone by using the
428b3cff10cSYuri Pankov.Nm zonecfg Cm add Sy device
429b3cff10cSYuri Pankovsubcommand. However, its physical properties can be modified only by the global
430b3cff10cSYuri Pankovadministrator.
431b3cff10cSYuri Pankov.Pp
432b3cff10cSYuri PankovFor more information about
433b3cff10cSYuri Pankov.Nm zonecfg
434b3cff10cSYuri Pankovsyntax, see
435b3cff10cSYuri Pankov.Xr zonecfg 1M .
436b3cff10cSYuri Pankov.Pp
437b3cff10cSYuri PankovAfter a dataset is delegated to a non-global zone, the
438b3cff10cSYuri Pankov.Sy zoned
439b3cff10cSYuri Pankovproperty is automatically set. A zoned file system cannot be mounted in the
440b3cff10cSYuri Pankovglobal zone, since the zone administrator might have to set the mount point to
441b3cff10cSYuri Pankovan unacceptable value.
442b3cff10cSYuri Pankov.Pp
443b3cff10cSYuri PankovThe global administrator can forcibly clear the
444b3cff10cSYuri Pankov.Sy zoned
445b3cff10cSYuri Pankovproperty, though this should be done with extreme care. The global administrator
446b3cff10cSYuri Pankovshould verify that all the mount points are acceptable before clearing the
447b3cff10cSYuri Pankovproperty.
448b3cff10cSYuri Pankov.Ss Native Properties
449b3cff10cSYuri PankovProperties are divided into two types, native properties and user-defined
450b3cff10cSYuri Pankov.Po or
451b3cff10cSYuri Pankov.Qq user
452b3cff10cSYuri Pankov.Pc
453b3cff10cSYuri Pankovproperties. Native properties either export internal statistics or control ZFS
454b3cff10cSYuri Pankovbehavior. In addition, native properties are either editable or read-only. User
455b3cff10cSYuri Pankovproperties have no effect on ZFS behavior, but you can use them to annotate
456b3cff10cSYuri Pankovdatasets in a way that is meaningful in your environment. For more information
457b3cff10cSYuri Pankovabout user properties, see the
458b3cff10cSYuri Pankov.Sx User Properties
459b3cff10cSYuri Pankovsection, below.
460b3cff10cSYuri Pankov.Pp
461c10c16deSRichard LoweEvery dataset has a set of properties that export statistics about the dataset
462c10c16deSRichard Loweas well as control various behaviors. Properties are inherited from the parent
463c10c16deSRichard Loweunless overridden by the child. Some properties apply only to certain types of
464b3cff10cSYuri Pankovdatasets
465b3cff10cSYuri Pankov.Pq file systems, volumes, or snapshots .
466b3cff10cSYuri Pankov.Pp
467c10c16deSRichard LoweThe values of numeric properties can be specified using human-readable suffixes
468b3cff10cSYuri Pankov.Po for example,
469b3cff10cSYuri Pankov.Sy k ,
470b3cff10cSYuri Pankov.Sy KB ,
471b3cff10cSYuri Pankov.Sy M ,
472b3cff10cSYuri Pankov.Sy Gb ,
473b3cff10cSYuri Pankovand so forth, up to
474b3cff10cSYuri Pankov.Sy Z
475b3cff10cSYuri Pankovfor zettabyte
476b3cff10cSYuri Pankov.Pc .
477b3cff10cSYuri PankovThe following are all valid
478b3cff10cSYuri Pankov.Pq and equal
479b3cff10cSYuri Pankovspecifications:
480b3cff10cSYuri Pankov.Li 1536M, 1.5g, 1.50GB .
481b3cff10cSYuri Pankov.Pp
482c10c16deSRichard LoweThe values of non-numeric properties are case sensitive and must be lowercase,
483b3cff10cSYuri Pankovexcept for
484b3cff10cSYuri Pankov.Sy mountpoint ,
485b3cff10cSYuri Pankov.Sy sharenfs ,
486b3cff10cSYuri Pankovand
487b3cff10cSYuri Pankov.Sy sharesmb .
488b3cff10cSYuri Pankov.Pp
489c10c16deSRichard LoweThe following native properties consist of read-only statistics about the
490c10c16deSRichard Lowedataset. These properties can be neither set, nor inherited. Native properties
491c10c16deSRichard Loweapply to all dataset types unless otherwise noted.
492b3cff10cSYuri Pankov.Bl -tag -width "usedbyrefreservation"
493b3cff10cSYuri Pankov.It Sy available
494b3cff10cSYuri PankovThe amount of space available to the dataset and all its children, assuming that
495b3cff10cSYuri Pankovthere is no other activity in the pool. Because space is shared within a pool,
496b3cff10cSYuri Pankovavailability can be limited by any number of factors, including physical pool
497b3cff10cSYuri Pankovsize, quotas, reservations, or other datasets within the pool.
498b3cff10cSYuri Pankov.Pp
499c10c16deSRichard LoweThis property can also be referred to by its shortened column name,
500b3cff10cSYuri Pankov.Sy avail .
501b3cff10cSYuri Pankov.It Sy compressratio
502b3cff10cSYuri PankovFor non-snapshots, the compression ratio achieved for the
503b3cff10cSYuri Pankov.Sy used
504b3cff10cSYuri Pankovspace of this dataset, expressed as a multiplier. The
505b3cff10cSYuri Pankov.Sy used
506b3cff10cSYuri Pankovproperty includes descendant datasets, and, for clones, does not include the
507b3cff10cSYuri Pankovspace shared with the origin snapshot. For snapshots, the
508b3cff10cSYuri Pankov.Sy compressratio
509b3cff10cSYuri Pankovis the same as the
510b3cff10cSYuri Pankov.Sy refcompressratio
511b3cff10cSYuri Pankovproperty. Compression can be turned on by running:
512b3cff10cSYuri Pankov.Nm zfs Cm set Sy compression Ns = Ns Sy on Ar dataset .
513b3cff10cSYuri PankovThe default value is
514b3cff10cSYuri Pankov.Sy off .
515b3cff10cSYuri Pankov.It Sy creation
516c10c16deSRichard LoweThe time this dataset was created.
517b3cff10cSYuri Pankov.It Sy clones
518b3cff10cSYuri PankovFor snapshots, this property is a comma-separated list of filesystems or volumes
519b3cff10cSYuri Pankovwhich are clones of this snapshot. The clones'
520b3cff10cSYuri Pankov.Sy origin
521b3cff10cSYuri Pankovproperty is this snapshot. If the
522b3cff10cSYuri Pankov.Sy clones
523b3cff10cSYuri Pankovproperty is not empty, then this snapshot can not be destroyed
524b3cff10cSYuri Pankov.Po even with the
525b3cff10cSYuri Pankov.Fl r
526b3cff10cSYuri Pankovor
527b3cff10cSYuri Pankov.Fl f
528b3cff10cSYuri Pankovoptions
529b3cff10cSYuri Pankov.Pc .
530b3cff10cSYuri Pankov.It Sy defer_destroy
531b3cff10cSYuri PankovThis property is
532b3cff10cSYuri Pankov.Sy on
533b3cff10cSYuri Pankovif the snapshot has been marked for deferred destroy by using the
534b3cff10cSYuri Pankov.Nm zfs Cm destroy Fl d
535b3cff10cSYuri Pankovcommand. Otherwise, the property is
536b3cff10cSYuri Pankov.Sy off .
537b3cff10cSYuri Pankov.It Sy filesystem_count
538b3cff10cSYuri PankovThe total number of filesystems and volumes that exist under this location in
539b3cff10cSYuri Pankovthe dataset tree. This value is only available when a
540b3cff10cSYuri Pankov.Sy filesystem_limit
541b3cff10cSYuri Pankovhas been set somewhere in the tree under which the dataset resides.
542b3cff10cSYuri Pankov.It Sy logicalreferenced
543b3cff10cSYuri PankovThe amount of space that is
544b3cff10cSYuri Pankov.Qq logically
545b3cff10cSYuri Pankovaccessible by this dataset. See the
546b3cff10cSYuri Pankov.Sy referenced
547b3cff10cSYuri Pankovproperty. The logical space ignores the effect of the
548b3cff10cSYuri Pankov.Sy compression
549b3cff10cSYuri Pankovand
550b3cff10cSYuri Pankov.Sy copies
551b3cff10cSYuri Pankovproperties, giving a quantity closer to the amount of data that applications
552b3cff10cSYuri Pankovsee. However, it does include space consumed by metadata.
553b3cff10cSYuri Pankov.Pp
55477372cb0SMatthew AhrensThis property can also be referred to by its shortened column name,
555b3cff10cSYuri Pankov.Sy lrefer .
556b3cff10cSYuri Pankov.It Sy logicalused
557b3cff10cSYuri PankovThe amount of space that is
558b3cff10cSYuri Pankov.Qq logically
559b3cff10cSYuri Pankovconsumed by this dataset and all its descendents. See the
560b3cff10cSYuri Pankov.Sy used
561b3cff10cSYuri Pankovproperty. The logical space ignores the effect of the
562b3cff10cSYuri Pankov.Sy compression
563b3cff10cSYuri Pankovand
564b3cff10cSYuri Pankov.Sy copies
565b3cff10cSYuri Pankovproperties, giving a quantity closer to the amount of data that applications
566b3cff10cSYuri Pankovsee. However, it does include space consumed by metadata.
567b3cff10cSYuri Pankov.Pp
56877372cb0SMatthew AhrensThis property can also be referred to by its shortened column name,
569b3cff10cSYuri Pankov.Sy lused .
570b3cff10cSYuri Pankov.It Sy mounted
571c10c16deSRichard LoweFor file systems, indicates whether the file system is currently mounted. This
572b3cff10cSYuri Pankovproperty can be either
573b3cff10cSYuri Pankov.Sy yes
574b3cff10cSYuri Pankovor
575b3cff10cSYuri Pankov.Sy no .
576b3cff10cSYuri Pankov.It Sy origin
577c10c16deSRichard LoweFor cloned file systems or volumes, the snapshot from which the clone was
578b3cff10cSYuri Pankovcreated. See also the
579b3cff10cSYuri Pankov.Sy clones
580b3cff10cSYuri Pankovproperty.
5819c3fd121SMatthew Ahrens.It Sy receive_resume_token
5829c3fd121SMatthew AhrensFor filesystems or volumes which have saved partially-completed state from
5839c3fd121SMatthew Ahrens.Sy zfs receive -s ,
5849c3fd121SMatthew Ahrensthis opaque token can be provided to
5859c3fd121SMatthew Ahrens.Sy zfs send -t
5869c3fd121SMatthew Ahrensto resume and complete the
5879c3fd121SMatthew Ahrens.Sy zfs receive .
588b3cff10cSYuri Pankov.It Sy referenced
589c10c16deSRichard LoweThe amount of data that is accessible by this dataset, which may or may not be
590c10c16deSRichard Loweshared with other datasets in the pool. When a snapshot or clone is created, it
591c10c16deSRichard Loweinitially references the same amount of space as the file system or snapshot it
592c10c16deSRichard Lowewas created from, since its contents are identical.
593b3cff10cSYuri Pankov.Pp
594c10c16deSRichard LoweThis property can also be referred to by its shortened column name,
595b3cff10cSYuri Pankov.Sy refer .
596b3cff10cSYuri Pankov.It Sy refcompressratio
597b3cff10cSYuri PankovThe compression ratio achieved for the
598b3cff10cSYuri Pankov.Sy referenced
599b3cff10cSYuri Pankovspace of this dataset, expressed as a multiplier. See also the
600b3cff10cSYuri Pankov.Sy compressratio
601187d6ac0SMatt Ahrensproperty.
602b3cff10cSYuri Pankov.It Sy snapshot_count
603b3cff10cSYuri PankovThe total number of snapshots that exist under this location in the dataset
604b3cff10cSYuri Pankovtree. This value is only available when a
605b3cff10cSYuri Pankov.Sy snapshot_limit
606b3cff10cSYuri Pankovhas been set somewhere in the tree under which the dataset resides.
607b3cff10cSYuri Pankov.It Sy type
608b3cff10cSYuri PankovThe type of dataset:
609b3cff10cSYuri Pankov.Sy filesystem ,
610b3cff10cSYuri Pankov.Sy volume ,
611b3cff10cSYuri Pankovor
612b3cff10cSYuri Pankov.Sy snapshot .
613b3cff10cSYuri Pankov.It Sy used
614c10c16deSRichard LoweThe amount of space consumed by this dataset and all its descendents. This is
615c10c16deSRichard Lowethe value that is checked against this dataset's quota and reservation. The
616c10c16deSRichard Lowespace used does not include this dataset's reservation, but does take into
617c10c16deSRichard Loweaccount the reservations of any descendent datasets. The amount of space that a
618c10c16deSRichard Lowedataset consumes from its parent, as well as the amount of space that are freed
619c10c16deSRichard Loweif this dataset is recursively destroyed, is the greater of its space used and
620c10c16deSRichard Loweits reservation.
621b3cff10cSYuri Pankov.Pp
622b3cff10cSYuri PankovWhen snapshots
623b3cff10cSYuri Pankov.Po see the
624b3cff10cSYuri Pankov.Sx Snapshots
625b3cff10cSYuri Pankovsection
626b3cff10cSYuri Pankov.Pc
627b3cff10cSYuri Pankovare created, their space is initially shared between the snapshot and
628b3cff10cSYuri Pankovthe file system, and possibly with previous snapshots. As the file system
629b3cff10cSYuri Pankovchanges, space that was previously shared becomes unique to the snapshot, and
630b3cff10cSYuri Pankovcounted in the snapshot's space used. Additionally, deleting snapshots can
631b3cff10cSYuri Pankovincrease the amount of space unique to
632b3cff10cSYuri Pankov.Pq and used by
633b3cff10cSYuri Pankovother snapshots.
634b3cff10cSYuri Pankov.Pp
635c10c16deSRichard LoweThe amount of space used, available, or referenced does not take into account
636c10c16deSRichard Lowepending changes. Pending changes are generally accounted for within a few
637b3cff10cSYuri Pankovseconds. Committing a change to a disk using
638b3cff10cSYuri Pankov.Xr fsync 3C
639b3cff10cSYuri Pankovor
640b3cff10cSYuri Pankov.Dv O_SYNC
641c10c16deSRichard Lowedoes not necessarily guarantee that the space usage information is updated
642c10c16deSRichard Loweimmediately.
643b3cff10cSYuri Pankov.It Sy usedby*
644b3cff10cSYuri PankovThe
645b3cff10cSYuri Pankov.Sy usedby*
646b3cff10cSYuri Pankovproperties decompose the
647b3cff10cSYuri Pankov.Sy used
648b3cff10cSYuri Pankovproperties into the various reasons that space is used. Specifically,
649b3cff10cSYuri Pankov.Sy used No =
650b3cff10cSYuri Pankov.Sy usedbychildren No +
651b3cff10cSYuri Pankov.Sy usedbydataset No +
652b3cff10cSYuri Pankov.Sy usedbyrefreservation No +
653b3cff10cSYuri Pankov.Sy usedbysnapshots .
654b3cff10cSYuri PankovThese properties are only available for datasets created on
655b3cff10cSYuri Pankov.Nm zpool
656b3cff10cSYuri Pankov.Qo version 13 Qc
657b3cff10cSYuri Pankovpools.
658b3cff10cSYuri Pankov.It Sy usedbychildren
659c10c16deSRichard LoweThe amount of space used by children of this dataset, which would be freed if
660c10c16deSRichard Loweall the dataset's children were destroyed.
661b3cff10cSYuri Pankov.It Sy usedbydataset
662c10c16deSRichard LoweThe amount of space used by this dataset itself, which would be freed if the
663b3cff10cSYuri Pankovdataset were destroyed
664b3cff10cSYuri Pankov.Po after first removing any
665b3cff10cSYuri Pankov.Sy refreservation
666b3cff10cSYuri Pankovand destroying any necessary snapshots or descendents
667b3cff10cSYuri Pankov.Pc .
668b3cff10cSYuri Pankov.It Sy usedbyrefreservation
669b3cff10cSYuri PankovThe amount of space used by a
670b3cff10cSYuri Pankov.Sy refreservation
671b3cff10cSYuri Pankovset on this dataset, which would be freed if the
672b3cff10cSYuri Pankov.Sy refreservation
673b3cff10cSYuri Pankovwas removed.
674b3cff10cSYuri Pankov.It Sy usedbysnapshots
675c10c16deSRichard LoweThe amount of space consumed by snapshots of this dataset. In particular, it is
676c10c16deSRichard Lowethe amount of space that would be freed if all of this dataset's snapshots were
677b3cff10cSYuri Pankovdestroyed. Note that this is not simply the sum of the snapshots'
678b3cff10cSYuri Pankov.Sy used
679c10c16deSRichard Loweproperties because space can be shared by multiple snapshots.
680b3cff10cSYuri Pankov.It Sy userused Ns @ Ns Em user
681c10c16deSRichard LoweThe amount of space consumed by the specified user in this dataset. Space is
682b3cff10cSYuri Pankovcharged to the owner of each file, as displayed by
683b3cff10cSYuri Pankov.Nm ls Fl l .
684b3cff10cSYuri PankovThe amount of space charged is displayed by
685b3cff10cSYuri Pankov.Nm du
686b3cff10cSYuri Pankovand
687b3cff10cSYuri Pankov.Nm ls Fl s .
688b3cff10cSYuri PankovSee the
689b3cff10cSYuri Pankov.Nm zfs Cm userspace
690b3cff10cSYuri Pankovsubcommand for more information.
691b3cff10cSYuri Pankov.Pp
692c10c16deSRichard LoweUnprivileged users can access only their own space usage. The root user, or a
693b3cff10cSYuri Pankovuser who has been granted the
694b3cff10cSYuri Pankov.Sy userused
695b3cff10cSYuri Pankovprivilege with
696b3cff10cSYuri Pankov.Nm zfs Cm allow ,
697c10c16deSRichard Lowecan access everyone's usage.
698b3cff10cSYuri Pankov.Pp
699b3cff10cSYuri PankovThe
700b3cff10cSYuri Pankov.Sy userused Ns @ Ns Em ...
701b3cff10cSYuri Pankovproperties are not displayed by
702b3cff10cSYuri Pankov.Nm zfs Cm get Sy all .
703b3cff10cSYuri PankovThe user's name must be appended after the @ symbol, using one of the following
704b3cff10cSYuri Pankovforms:
705b3cff10cSYuri Pankov.Bl -bullet -width ""
706b3cff10cSYuri Pankov.It
707b3cff10cSYuri Pankov.Em POSIX name
708b3cff10cSYuri Pankov.Po for example,
709b3cff10cSYuri Pankov.Sy joe
710b3cff10cSYuri Pankov.Pc
711b3cff10cSYuri Pankov.It
712b3cff10cSYuri Pankov.Em POSIX numeric ID
713b3cff10cSYuri Pankov.Po for example,
714b3cff10cSYuri Pankov.Sy 789
715b3cff10cSYuri Pankov.Pc
716b3cff10cSYuri Pankov.It
717b3cff10cSYuri Pankov.Em SID name
718b3cff10cSYuri Pankov.Po for example,
719b3cff10cSYuri Pankov.Sy joe.smith@mydomain
720b3cff10cSYuri Pankov.Pc
721b3cff10cSYuri Pankov.It
722b3cff10cSYuri Pankov.Em SID numeric ID
723b3cff10cSYuri Pankov.Po for example,
724b3cff10cSYuri Pankov.Sy S-1-123-456-789
725b3cff10cSYuri Pankov.Pc
726b3cff10cSYuri Pankov.El
727b3cff10cSYuri Pankov.It Sy userrefs
728c10c16deSRichard LoweThis property is set to the number of user holds on this snapshot. User holds
729b3cff10cSYuri Pankovare set by using the
730b3cff10cSYuri Pankov.Nm zfs Cm hold
731b3cff10cSYuri Pankovcommand.
732b3cff10cSYuri Pankov.It Sy groupused Ns @ Ns Em group
733c10c16deSRichard LoweThe amount of space consumed by the specified group in this dataset. Space is
734b3cff10cSYuri Pankovcharged to the group of each file, as displayed by
735b3cff10cSYuri Pankov.Nm ls Fl l .
736b3cff10cSYuri PankovSee the
737b3cff10cSYuri Pankov.Sy userused Ns @ Ns Em user
738b3cff10cSYuri Pankovproperty for more information.
739b3cff10cSYuri Pankov.Pp
740b3cff10cSYuri PankovUnprivileged users can only access their own groups' space usage. The root user,
741b3cff10cSYuri Pankovor a user who has been granted the
742b3cff10cSYuri Pankov.Sy groupused
743b3cff10cSYuri Pankovprivilege with
744b3cff10cSYuri Pankov.Nm zfs Cm allow ,
745b3cff10cSYuri Pankovcan access all groups' usage.
746b3cff10cSYuri Pankov.It Sy volblocksize Ns = Ns Em blocksize
747b3cff10cSYuri PankovFor volumes, specifies the block size of the volume. The
748b3cff10cSYuri Pankov.Sy blocksize
749b3cff10cSYuri Pankovcannot be changed once the volume has been written, so it should be set at
750b3cff10cSYuri Pankovvolume creation time. The default
751b3cff10cSYuri Pankov.Sy blocksize
752b3cff10cSYuri Pankovfor volumes is 8 Kbytes. Any power of 2 from 512 bytes to 128 Kbytes is valid.
753b3cff10cSYuri Pankov.Pp
754c10c16deSRichard LoweThis property can also be referred to by its shortened column name,
755b3cff10cSYuri Pankov.Sy volblock .
756b3cff10cSYuri Pankov.It Sy written
757b3cff10cSYuri PankovThe amount of
758b3cff10cSYuri Pankov.Sy referenced
759b3cff10cSYuri Pankovspace written to this dataset since the previous snapshot.
760b3cff10cSYuri Pankov.It Sy written Ns @ Ns Em snapshot
761b3cff10cSYuri PankovThe amount of
762b3cff10cSYuri Pankov.Sy referenced
763b3cff10cSYuri Pankovspace written to this dataset since the specified snapshot. This is the space
764b3cff10cSYuri Pankovthat is referenced by this dataset but was not referenced by the specified
765b3cff10cSYuri Pankovsnapshot.
766b3cff10cSYuri Pankov.Pp
767b3cff10cSYuri PankovThe
768b3cff10cSYuri Pankov.Em snapshot
769b3cff10cSYuri Pankovmay be specified as a short snapshot name
770b3cff10cSYuri Pankov.Po just the part after the
771b3cff10cSYuri Pankov.Sy @
772b3cff10cSYuri Pankov.Pc ,
773b3cff10cSYuri Pankovin which case it will be interpreted as a snapshot in the same filesystem as
774b3cff10cSYuri Pankovthis dataset. The
775b3cff10cSYuri Pankov.Em snapshot
776b3cff10cSYuri Pankovmay be a full snapshot name
7771058dba4SYuri Pankov.Po Em filesystem Ns @ Ns Em snapshot Pc ,
778b3cff10cSYuri Pankovwhich for clones may be a snapshot in the origin's filesystem
779b3cff10cSYuri Pankov.Pq or the origin of the origin's filesystem, etc.
780b3cff10cSYuri Pankov.El
781b3cff10cSYuri Pankov.Pp
782b3cff10cSYuri PankovThe following native properties can be used to change the behavior of a ZFS
783b3cff10cSYuri Pankovdataset.
784b3cff10cSYuri Pankov.Bl -tag -width ""
785b3cff10cSYuri Pankov.It Xo
786b3cff10cSYuri Pankov.Sy aclinherit Ns = Ns Sy discard Ns | Ns Sy noallow Ns | Ns
787b3cff10cSYuri Pankov.Sy restricted Ns | Ns Sy passthrough Ns | Ns Sy passthrough-x
788b3cff10cSYuri Pankov.Xc
789b3cff10cSYuri PankovControls how
790b3cff10cSYuri Pankov.Sy ACE Ns s
791b3cff10cSYuri Pankovare inherited when files and directories are created.
792b3cff10cSYuri Pankov.Bl -tag -width "passthrough-x"
793b3cff10cSYuri Pankov.It Sy discard
794b3cff10cSYuri Pankovdoes not inherit any
795b3cff10cSYuri Pankov.Sy ACE Ns s .
796b3cff10cSYuri Pankov.It Sy noallow
797b3cff10cSYuri Pankovonly inherits inheritable
798b3cff10cSYuri Pankov.Sy ACE Ns s
799b3cff10cSYuri Pankovthat specify
800b3cff10cSYuri Pankov.Qq deny
801b3cff10cSYuri Pankovpermissions.
802b3cff10cSYuri Pankov.It Sy restricted
803b3cff10cSYuri Pankovdefault, removes the
804b3cff10cSYuri Pankov.Sy write_acl
805b3cff10cSYuri Pankovand
806b3cff10cSYuri Pankov.Sy write_owner
807b3cff10cSYuri Pankovpermissions when the
808b3cff10cSYuri Pankov.Sy ACE
809b3cff10cSYuri Pankovis inherited.
810b3cff10cSYuri Pankov.It Sy passthrough
811b3cff10cSYuri Pankovinherits all inheritable
812b3cff10cSYuri Pankov.Sy ACE Ns s
813b3cff10cSYuri Pankovwithout any modifications.
814b3cff10cSYuri Pankov.It Sy passthrough-x
815b3cff10cSYuri Pankovsame meaning as
816b3cff10cSYuri Pankov.Sy passthrough ,
817b3cff10cSYuri Pankovexcept that the
818b3cff10cSYuri Pankov.Sy owner@ ,
819b3cff10cSYuri Pankov.Sy group@ ,
820b3cff10cSYuri Pankovand
821b3cff10cSYuri Pankov.Sy everyone@
822b3cff10cSYuri Pankov.Sy ACE Ns s
823b3cff10cSYuri Pankovinherit the execute permission only if the file creation mode also requests the
824b3cff10cSYuri Pankovexecute bit.
825b3cff10cSYuri Pankov.El
826b3cff10cSYuri Pankov.Pp
827b3cff10cSYuri PankovWhen the property value is set to
828b3cff10cSYuri Pankov.Sy passthrough ,
829b3cff10cSYuri Pankovfiles are created with a mode determined by the inheritable
830b3cff10cSYuri Pankov.Sy ACE Ns s .
831b3cff10cSYuri PankovIf no inheritable
832b3cff10cSYuri Pankov.Sy ACE Ns s
833c10c16deSRichard Loweexist that affect the mode, then the mode is set in accordance to the requested
834c10c16deSRichard Lowemode from the application.
835b3cff10cSYuri Pankov.It Xo
836b3cff10cSYuri Pankov.Sy aclmode Ns = Ns Sy discard Ns | Ns Sy groupmask Ns | Ns
837b3cff10cSYuri Pankov.Sy passthrough Ns | Ns Sy restricted
838b3cff10cSYuri Pankov.Xc
839b3cff10cSYuri PankovControls how an
840b3cff10cSYuri Pankov.Sy ACL
841b3cff10cSYuri Pankovis modified during
842b3cff10cSYuri Pankov.Xr chmod 2 .
843b3cff10cSYuri Pankov.Bl -tag -width "passthrough"
844b3cff10cSYuri Pankov.It Sy discard
845b3cff10cSYuri Pankovdefault, deletes all
846b3cff10cSYuri Pankov.Sy ACE Ns s
847b3cff10cSYuri Pankovthat do not represent the mode of the file.
848b3cff10cSYuri Pankov.It Sy groupmask
849b3cff10cSYuri Pankovreduces permissions granted in all
850b3cff10cSYuri Pankov.Sy ALLOW
851b3cff10cSYuri Pankoventries found in the
852b3cff10cSYuri Pankov.Sy ACL
853b3cff10cSYuri Pankovsuch that they are no greater than the group permissions specified by
854b3cff10cSYuri Pankov.Xr chmod 2 .
855b3cff10cSYuri Pankov.It Sy passthrough
856b3cff10cSYuri Pankovindicates that no changes are made to the
857b3cff10cSYuri Pankov.Sy ACL
858b3cff10cSYuri Pankovother than creating or updating the necessary
859b3cff10cSYuri Pankov.Sy ACE Ns s
860b3cff10cSYuri Pankovto represent the new mode of the file or directory.
861b3cff10cSYuri Pankov.It Sy restricted
862b3cff10cSYuri Pankovcauses the
863b3cff10cSYuri Pankov.Xr chmod 2
864b3cff10cSYuri Pankovoperation to return an error when used on any file or directory which has a
865b3cff10cSYuri Pankovnon-trivial
866b3cff10cSYuri Pankov.Sy ACE Ns s
867b3cff10cSYuri Pankovwhose entries can not be represented by a mode.
868b3cff10cSYuri Pankov.El
869b3cff10cSYuri Pankov.Pp
870b3cff10cSYuri Pankov.Xr chmod 2
871b3cff10cSYuri Pankovis required to change the set user ID, set group ID, or sticky bits on a file or
872b3cff10cSYuri Pankovdirectory, as they do not have equivalent
873b3cff10cSYuri Pankov.Sy ACE Ns s.
874b3cff10cSYuri PankovIn order to use
875b3cff10cSYuri Pankov.Xr chmod 2
876b3cff10cSYuri Pankovon a file or directory with a non-trivial
877b3cff10cSYuri Pankov.Sy ACL
878b3cff10cSYuri Pankovwhen
879b3cff10cSYuri Pankov.Sy aclmode
880b3cff10cSYuri Pankovis set to
881b3cff10cSYuri Pankov.Sy restricted ,
882b3cff10cSYuri Pankovyou must first remove all
883b3cff10cSYuri Pankov.Sy ACE Ns s
884b3cff10cSYuri Pankovwhich do not represent the current mode.
885b3cff10cSYuri Pankov.It Sy atime Ns = Ns Sy on Ns | Ns Sy off
886c10c16deSRichard LoweControls whether the access time for files is updated when they are read.
887c10c16deSRichard LoweTurning this property off avoids producing write traffic when reading files and
888c10c16deSRichard Lowecan result in significant performance gains, though it might confuse mailers
889b3cff10cSYuri Pankovand other similar utilities. The default value is
890b3cff10cSYuri Pankov.Sy on .
891b3cff10cSYuri Pankov.It Sy canmount Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy noauto
892b3cff10cSYuri PankovIf this property is set to
893b3cff10cSYuri Pankov.Sy off ,
894b3cff10cSYuri Pankovthe file system cannot be mounted, and is ignored by
895b3cff10cSYuri Pankov.Nm zfs Cm mount Fl a .
896b3cff10cSYuri PankovSetting this property to
897b3cff10cSYuri Pankov.Sy off
898b3cff10cSYuri Pankovis similar to setting the
899b3cff10cSYuri Pankov.Sy mountpoint
900b3cff10cSYuri Pankovproperty to
901b3cff10cSYuri Pankov.Sy none ,
902b3cff10cSYuri Pankovexcept that the dataset still has a normal
903b3cff10cSYuri Pankov.Sy mountpoint
904b3cff10cSYuri Pankovproperty, which can be inherited. Setting this property to
905b3cff10cSYuri Pankov.Sy off
906b3cff10cSYuri Pankovallows datasets to be used solely as a mechanism to inherit properties. One
907b3cff10cSYuri Pankovexample of setting
908b3cff10cSYuri Pankov.Sy canmount Ns = Ns Sy off
909b3cff10cSYuri Pankovis to have two datasets with the same
910b3cff10cSYuri Pankov.Sy mountpoint ,
911b3cff10cSYuri Pankovso that the children of both datasets appear in the same directory, but might
912b3cff10cSYuri Pankovhave different inherited characteristics.
913b3cff10cSYuri Pankov.Pp
914b3cff10cSYuri PankovWhen set to
915b3cff10cSYuri Pankov.Sy noauto ,
916b3cff10cSYuri Pankova dataset can only be mounted and unmounted explicitly. The dataset is not
917b3cff10cSYuri Pankovmounted automatically when the dataset is created or imported, nor is it mounted
918b3cff10cSYuri Pankovby the
919b3cff10cSYuri Pankov.Nm zfs Cm mount Fl a
920b3cff10cSYuri Pankovcommand or unmounted by the
921b3cff10cSYuri Pankov.Nm zfs Cm unmount Fl a
922b3cff10cSYuri Pankovcommand.
923b3cff10cSYuri Pankov.Pp
924c10c16deSRichard LoweThis property is not inherited.
925b3cff10cSYuri Pankov.It Xo
926b3cff10cSYuri Pankov.Sy checksum Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy fletcher2 Ns | Ns
92745818ee1SMatthew Ahrens.Sy fletcher4 Ns | Ns Sy sha256 Ns | Ns Sy noparity Ns | Ns
92845818ee1SMatthew Ahrens.Sy sha512 Ns | Ns Sy skein Ns | Ns Sy edonr
929b3cff10cSYuri Pankov.Xc
930c10c16deSRichard LoweControls the checksum used to verify data integrity. The default value is
931b3cff10cSYuri Pankov.Sy on ,
932b3cff10cSYuri Pankovwhich automatically selects an appropriate algorithm
933b3cff10cSYuri Pankov.Po currently,
934b3cff10cSYuri Pankov.Sy fletcher4 ,
935b3cff10cSYuri Pankovbut this may change in future releases
936b3cff10cSYuri Pankov.Pc .
937b3cff10cSYuri PankovThe value
938b3cff10cSYuri Pankov.Sy off
939b3cff10cSYuri Pankovdisables integrity checking on user data. The value
940b3cff10cSYuri Pankov.Sy noparity
941b3cff10cSYuri Pankovnot only disables integrity but also disables maintaining parity for user data.
942b3cff10cSYuri PankovThis setting is used internally by a dump device residing on a RAID-Z pool and
943b3cff10cSYuri Pankovshould not be used by any other dataset. Disabling checksums is
944b3cff10cSYuri Pankov.Sy NOT
945b3cff10cSYuri Pankova recommended practice.
946b3cff10cSYuri Pankov.Pp
94745818ee1SMatthew AhrensThe
94845818ee1SMatthew Ahrens.Sy sha512 ,
94945818ee1SMatthew Ahrens.Sy skein ,
95045818ee1SMatthew Ahrensand
95145818ee1SMatthew Ahrens.Sy edonr
95245818ee1SMatthew Ahrenschecksum algorithms require enabling the appropriate features on the
95345818ee1SMatthew Ahrenspool. Please see
95445818ee1SMatthew Ahrens.Xr zpool-features 5
95545818ee1SMatthew Ahrensfor more information on these algorithms.
95645818ee1SMatthew Ahrens.Pp
957c10c16deSRichard LoweChanging this property affects only newly-written data.
958b3cff10cSYuri Pankov.It Xo
959b3cff10cSYuri Pankov.Sy compression Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Sy gzip Ns | Ns
960b3cff10cSYuri Pankov.Sy gzip- Ns Em N Ns | Ns Sy lz4 Ns | Ns Sy lzjb Ns | Ns Sy zle
961b3cff10cSYuri Pankov.Xc
962db1741f5SJustin T. GibbsControls the compression algorithm used for this dataset.
963b3cff10cSYuri Pankov.Pp
964b3cff10cSYuri PankovSetting compression to
965b3cff10cSYuri Pankov.Sy on
966b3cff10cSYuri Pankovindicates that the current default compression algorithm should be used. The
967b3cff10cSYuri Pankovdefault balances compression and decompression speed, with compression ratio and
968b3cff10cSYuri Pankovis expected to work well on a wide variety of workloads.  Unlike all other
969b3cff10cSYuri Pankovsettings for this property,
970b3cff10cSYuri Pankov.Sy on
971b3cff10cSYuri Pankovdoes not select a fixed compression type. As new compression algorithms are
972b3cff10cSYuri Pankovadded to ZFS and enabled on a pool, the default compression algorithm may
973b3cff10cSYuri Pankovchange. The current default compression algorthm is either
974b3cff10cSYuri Pankov.Sy lzjb
975b3cff10cSYuri Pankovor, if the
976b3cff10cSYuri Pankov.Sy lz4_compress
977b3cff10cSYuri Pankovfeature is enabled,
978b3cff10cSYuri Pankov.Sy lz4 .
979b3cff10cSYuri Pankov.Pp
980b3cff10cSYuri PankovThe
981b3cff10cSYuri Pankov.Sy lz4
982b3cff10cSYuri Pankovcompression algorithm is a high-performance replacement for the
983b3cff10cSYuri Pankov.Sy lzjb
984b3cff10cSYuri Pankovalgorithm. It features significantly faster compression and decompression, as
985b3cff10cSYuri Pankovwell as a moderately higher compression ratio than
986b3cff10cSYuri Pankov.Sy lzjb ,
987b3cff10cSYuri Pankovbut can only be used on pools with the
988b3cff10cSYuri Pankov.Sy lz4_compress
989b3cff10cSYuri Pankovfeature set to
990b3cff10cSYuri Pankov.Sy enabled .
991b3cff10cSYuri PankovSee
992b3cff10cSYuri Pankov.Xr zpool-features 5
993b3cff10cSYuri Pankovfor details on ZFS feature flags and the
994b3cff10cSYuri Pankov.Sy lz4_compress
995b3cff10cSYuri Pankovfeature.
996b3cff10cSYuri Pankov.Pp
997b3cff10cSYuri PankovThe
998b3cff10cSYuri Pankov.Sy lzjb
999b3cff10cSYuri Pankovcompression algorithm is optimized for performance while providing decent data
1000b3cff10cSYuri Pankovcompression.
1001b3cff10cSYuri Pankov.Pp
1002b3cff10cSYuri PankovThe
1003b3cff10cSYuri Pankov.Sy gzip
1004b3cff10cSYuri Pankovcompression algorithm uses the same compression as the
1005b3cff10cSYuri Pankov.Xr gzip 1
1006b3cff10cSYuri Pankovcommand. You can specify the
1007b3cff10cSYuri Pankov.Sy gzip
1008b3cff10cSYuri Pankovlevel by using the value
1009b3cff10cSYuri Pankov.Sy gzip- Ns Em N ,
1010b3cff10cSYuri Pankovwhere
1011b3cff10cSYuri Pankov.Em N
1012b3cff10cSYuri Pankovis an integer from 1
1013b3cff10cSYuri Pankov.Pq fastest
1014b3cff10cSYuri Pankovto 9
1015b3cff10cSYuri Pankov.Pq best compression ratio .
1016b3cff10cSYuri PankovCurrently,
1017b3cff10cSYuri Pankov.Sy gzip
1018b3cff10cSYuri Pankovis equivalent to
1019b3cff10cSYuri Pankov.Sy gzip-6
1020b3cff10cSYuri Pankov.Po which is also the default for
1021b3cff10cSYuri Pankov.Xr gzip 1
1022b3cff10cSYuri Pankov.Pc .
1023b3cff10cSYuri Pankov.Pp
1024b3cff10cSYuri PankovThe
1025b3cff10cSYuri Pankov.Sy zle
1026b3cff10cSYuri Pankovcompression algorithm compresses runs of zeros.
1027b3cff10cSYuri Pankov.Pp
1028c10c16deSRichard LoweThis property can also be referred to by its shortened column name
1029c10c16deSRichard Lowe\fBcompress\fR. Changing this property affects only newly-written data.
1030b3cff10cSYuri Pankov.It Sy copies Ns = Ns Sy 1 Ns | Ns Sy 2 Ns | Ns Sy 3
1031c10c16deSRichard LoweControls the number of copies of data stored for this dataset. These copies are
1032c10c16deSRichard Lowein addition to any redundancy provided by the pool, for example, mirroring or
1033c10c16deSRichard LoweRAID-Z. The copies are stored on different disks, if possible. The space used
1034c10c16deSRichard Loweby multiple copies is charged to the associated file and dataset, changing the
1035b3cff10cSYuri Pankov.Sy used
1036b3cff10cSYuri Pankovproperty and counting against quotas and reservations.
1037b3cff10cSYuri Pankov.Pp
1038c10c16deSRichard LoweChanging this property only affects newly-written data. Therefore, set this
1039b3cff10cSYuri Pankovproperty at file system creation time by using the
1040b3cff10cSYuri Pankov.Fl o Sy copies Ns = Ns Ar N
1041b3cff10cSYuri Pankovoption.
1042b3cff10cSYuri Pankov.It Sy devices Ns = Ns Sy on Ns | Ns Sy off
1043c10c16deSRichard LoweControls whether device nodes can be opened on this file system. The default
1044b3cff10cSYuri Pankovvalue is
1045b3cff10cSYuri Pankov.Sy on .
1046b3cff10cSYuri Pankov.It Sy exec Ns = Ns Sy on Ns | Ns Sy off
1047c10c16deSRichard LoweControls whether processes can be executed from within this file system. The
1048b3cff10cSYuri Pankovdefault value is
1049b3cff10cSYuri Pankov.Sy on .
1050*e6d2808dSMarcel Telka.It Sy follow Ns = Ns Sy on Ns | Ns Sy off
1051*e6d2808dSMarcel TelkaControls whether symlinks are followed within this file system. The
1052*e6d2808dSMarcel Telkadefault value is
1053*e6d2808dSMarcel Telka.Sy on .
1054b3cff10cSYuri Pankov.It Sy filesystem_limit Ns = Ns Em count Ns | Ns Sy none
1055a2afb611SJerry JelinekLimits the number of filesystems and volumes that can exist under this point in
1056a2afb611SJerry Jelinekthe dataset tree. The limit is not enforced if the user is allowed to change
1057b3cff10cSYuri Pankovthe limit. Setting a
1058b3cff10cSYuri Pankov.Sy filesystem_limit
1059b3cff10cSYuri Pankovto
1060b3cff10cSYuri Pankov.Sy on
1061b3cff10cSYuri Pankova descendent of a filesystem that already has a
1062b3cff10cSYuri Pankov.Sy filesystem_limit
1063b3cff10cSYuri Pankovdoes not override the ancestor's
1064b3cff10cSYuri Pankov.Sy filesystem_limit ,
1065a2afb611SJerry Jelinekbut rather imposes an additional limit. This feature must be enabled to be used
1066b3cff10cSYuri Pankov.Po see
1067b3cff10cSYuri Pankov.Xr zpool-features 5
1068b3cff10cSYuri Pankov.Pc .
1069b3cff10cSYuri Pankov.It Sy mountpoint Ns = Ns Pa path Ns | Ns Sy none Ns | Ns Sy legacy
1070b3cff10cSYuri PankovControls the mount point used for this file system. See the
1071b3cff10cSYuri Pankov.Sx Mount Points
1072c10c16deSRichard Lowesection for more information on how this property is used.
1073b3cff10cSYuri Pankov.Pp
1074b3cff10cSYuri PankovWhen the
1075b3cff10cSYuri Pankov.Sy mountpoint
1076b3cff10cSYuri Pankovproperty is changed for a file system, the file system and any children that
1077b3cff10cSYuri Pankovinherit the mount point are unmounted. If the new value is
1078b3cff10cSYuri Pankov.Sy legacy ,
1079b3cff10cSYuri Pankovthen they remain unmounted. Otherwise, they are automatically remounted in the
1080b3cff10cSYuri Pankovnew location if the property was previously
1081b3cff10cSYuri Pankov.Sy legacy
1082b3cff10cSYuri Pankovor
1083b3cff10cSYuri Pankov.Sy none ,
1084b3cff10cSYuri Pankovor if they were mounted before the property was changed. In addition, any shared
1085b3cff10cSYuri Pankovfile systems are unshared and shared in the new location.
1086b3cff10cSYuri Pankov.It Sy nbmand Ns = Ns Sy on Ns | Ns Sy off
1087b3cff10cSYuri PankovControls whether the file system should be mounted with
1088b3cff10cSYuri Pankov.Sy nbmand
1089b3cff10cSYuri Pankov.Pq Non Blocking mandatory locks .
1090b3cff10cSYuri PankovThis is used for SMB clients. Changes to this property only take effect when the
1091b3cff10cSYuri Pankovfile system is umounted and remounted. See
1092b3cff10cSYuri Pankov.Xr mount 1M
1093b3cff10cSYuri Pankovfor more information on
1094b3cff10cSYuri Pankov.Sy nbmand
1095b3cff10cSYuri Pankovmounts.
1096b3cff10cSYuri Pankov.It Sy primarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
1097b3cff10cSYuri PankovControls what is cached in the primary cache
1098b3cff10cSYuri Pankov.Pq ARC .
1099b3cff10cSYuri PankovIf this property is set to
1100b3cff10cSYuri Pankov.Sy all ,
1101b3cff10cSYuri Pankovthen both user data and metadata is cached. If this property is set to
1102b3cff10cSYuri Pankov.Sy none ,
1103b3cff10cSYuri Pankovthen neither user data nor metadata is cached. If this property is set to
1104b3cff10cSYuri Pankov.Sy metadata ,
1105b3cff10cSYuri Pankovthen only metadata is cached. The default value is
1106b3cff10cSYuri Pankov.Sy all .
1107b3cff10cSYuri Pankov.It Sy quota Ns = Ns Em size Ns | Ns Sy none
1108c10c16deSRichard LoweLimits the amount of space a dataset and its descendents can consume. This
1109c10c16deSRichard Loweproperty enforces a hard limit on the amount of space used. This includes all
1110c10c16deSRichard Lowespace consumed by descendents, including file systems and snapshots. Setting a
1111c10c16deSRichard Lowequota on a descendent of a dataset that already has a quota does not override
1112c10c16deSRichard Lowethe ancestor's quota, but rather imposes an additional limit.
1113b3cff10cSYuri Pankov.Pp
1114b3cff10cSYuri PankovQuotas cannot be set on volumes, as the
1115b3cff10cSYuri Pankov.Sy volsize
1116b3cff10cSYuri Pankovproperty acts as an implicit quota.
1117b3cff10cSYuri Pankov.It Sy snapshot_limit Ns = Ns Em count Ns | Ns Sy none
1118a2afb611SJerry JelinekLimits the number of snapshots that can be created on a dataset and its
1119b3cff10cSYuri Pankovdescendents. Setting a
1120b3cff10cSYuri Pankov.Sy snapshot_limit
1121b3cff10cSYuri Pankovon a descendent of a dataset that already has a
1122b3cff10cSYuri Pankov.Sy snapshot_limit
1123b3cff10cSYuri Pankovdoes not override the ancestor's
1124b3cff10cSYuri Pankov.Sy snapshot_limit ,
1125b3cff10cSYuri Pankovbut rather imposes an additional limit. The limit is not enforced if the user is
1126a2afb611SJerry Jelinekallowed to change the limit. For example, this means that recursive snapshots
1127a2afb611SJerry Jelinektaken from the global zone are counted against each delegated dataset within
1128b3cff10cSYuri Pankova zone. This feature must be enabled to be used
1129b3cff10cSYuri Pankov.Po see
1130b3cff10cSYuri Pankov.Xr zpool-features 5
1131b3cff10cSYuri Pankov.Pc .
1132b3cff10cSYuri Pankov.It Sy userquota@ Ns Em user Ns = Ns Em size Ns | Ns Sy none
1133c10c16deSRichard LoweLimits the amount of space consumed by the specified user. User space
1134b3cff10cSYuri Pankovconsumption is identified by the
1135b3cff10cSYuri Pankov.Sy userspace@ Ns Em user
1136b3cff10cSYuri Pankovproperty.
1137b3cff10cSYuri Pankov.Pp
1138c10c16deSRichard LoweEnforcement of user quotas may be delayed by several seconds. This delay means
1139c10c16deSRichard Lowethat a user might exceed their quota before the system notices that they are
1140b3cff10cSYuri Pankovover quota and begins to refuse additional writes with the
1141b3cff10cSYuri Pankov.Er EDQUOT
1142b3cff10cSYuri Pankoverror message. See the
1143b3cff10cSYuri Pankov.Nm zfs Cm userspace
1144b3cff10cSYuri Pankovsubcommand for more information.
1145b3cff10cSYuri Pankov.Pp
1146c10c16deSRichard LoweUnprivileged users can only access their own groups' space usage. The root
1147b3cff10cSYuri Pankovuser, or a user who has been granted the
1148b3cff10cSYuri Pankov.Sy userquota
1149b3cff10cSYuri Pankovprivilege with
1150b3cff10cSYuri Pankov.Nm zfs Cm allow ,
1151b3cff10cSYuri Pankovcan get and set everyone's quota.
1152b3cff10cSYuri Pankov.Pp
1153c10c16deSRichard LoweThis property is not available on volumes, on file systems before version 4, or
1154b3cff10cSYuri Pankovon pools before version 15. The
1155b3cff10cSYuri Pankov.Sy userquota@ Ns Em ...
1156b3cff10cSYuri Pankovproperties are not displayed by
1157b3cff10cSYuri Pankov.Nm zfs Cm get Sy all .
1158b3cff10cSYuri PankovThe user's name must be appended after the
1159b3cff10cSYuri Pankov.Sy @
1160b3cff10cSYuri Pankovsymbol, using one of the following forms:
1161b3cff10cSYuri Pankov.Bl -bullet
1162b3cff10cSYuri Pankov.It
1163b3cff10cSYuri Pankov.Em POSIX name
1164b3cff10cSYuri Pankov.Po for example,
1165b3cff10cSYuri Pankov.Sy joe
1166b3cff10cSYuri Pankov.Pc
1167b3cff10cSYuri Pankov.It
1168b3cff10cSYuri Pankov.Em POSIX numeric ID
1169b3cff10cSYuri Pankov.Po for example,
1170b3cff10cSYuri Pankov.Sy 789
1171b3cff10cSYuri Pankov.Pc
1172b3cff10cSYuri Pankov.It
1173b3cff10cSYuri Pankov.Em SID name
1174b3cff10cSYuri Pankov.Po for example,
1175b3cff10cSYuri Pankov.Sy joe.smith@mydomain
1176b3cff10cSYuri Pankov.Pc
1177b3cff10cSYuri Pankov.It
1178b3cff10cSYuri Pankov.Em SID numeric ID
1179b3cff10cSYuri Pankov.Po for example,
1180b3cff10cSYuri Pankov.Sy S-1-123-456-789
1181b3cff10cSYuri Pankov.Pc
1182b3cff10cSYuri Pankov.El
1183b3cff10cSYuri Pankov.It Sy groupquota@ Ns Em group Ns = Ns Em size Ns | Ns Sy none
1184c10c16deSRichard LoweLimits the amount of space consumed by the specified group. Group space
1185b3cff10cSYuri Pankovconsumption is identified by the
1186b3cff10cSYuri Pankov.Sy groupused@ Ns Em group
1187b3cff10cSYuri Pankovproperty.
1188b3cff10cSYuri Pankov.Pp
1189c10c16deSRichard LoweUnprivileged users can access only their own groups' space usage. The root
1190b3cff10cSYuri Pankovuser, or a user who has been granted the
1191b3cff10cSYuri Pankov.Sy groupquota
1192b3cff10cSYuri Pankovprivilege with
1193b3cff10cSYuri Pankov.Nm zfs Cm allow ,
1194b3cff10cSYuri Pankovcan get and set all groups' quotas.
1195b3cff10cSYuri Pankov.It Sy readonly Ns = Ns Sy on Ns | Ns Sy off
1196b3cff10cSYuri PankovControls whether this dataset can be modified. The default value is
1197b3cff10cSYuri Pankov.Sy off .
1198b3cff10cSYuri Pankov.Pp
1199c10c16deSRichard LoweThis property can also be referred to by its shortened column name,
1200b3cff10cSYuri Pankov.Sy rdonly .
1201b3cff10cSYuri Pankov.It Sy recordsize Ns = Ns Em size
1202c10c16deSRichard LoweSpecifies a suggested block size for files in the file system. This property is
1203c10c16deSRichard Lowedesigned solely for use with database workloads that access files in fixed-size
1204b3cff10cSYuri Pankovrecords. ZFS automatically tunes block sizes according to internal algorithms
1205b3cff10cSYuri Pankovoptimized for typical access patterns.
1206b3cff10cSYuri Pankov.Pp
1207c10c16deSRichard LoweFor databases that create very large files but access them in small random
1208b3cff10cSYuri Pankovchunks, these algorithms may be suboptimal. Specifying a
1209b3cff10cSYuri Pankov.Sy recordsize
1210c10c16deSRichard Lowegreater than or equal to the record size of the database can result in
1211c10c16deSRichard Lowesignificant performance gains. Use of this property for general purpose file
1212c10c16deSRichard Lowesystems is strongly discouraged, and may adversely affect performance.
1213b3cff10cSYuri Pankov.Pp
1214c10c16deSRichard LoweThe size specified must be a power of two greater than or equal to 512 and less
1215b3cff10cSYuri Pankovthan or equal to 128 Kbytes. If the
1216b3cff10cSYuri Pankov.Sy large_blocks
1217b3cff10cSYuri Pankovfeature is enabled on the pool, the size may be up to 1 Mbyte. See
1218b3cff10cSYuri Pankov.Xr zpool-features 5
1219b5152584SMatthew Ahrensfor details on ZFS feature flags.
1220b3cff10cSYuri Pankov.Pp
1221b3cff10cSYuri PankovChanging the file system's
1222b3cff10cSYuri Pankov.Sy recordsize
1223b3cff10cSYuri Pankovaffects only files created afterward; existing files are unaffected.
1224b3cff10cSYuri Pankov.Pp
1225c10c16deSRichard LoweThis property can also be referred to by its shortened column name,
1226b3cff10cSYuri Pankov.Sy recsize .
1227b3cff10cSYuri Pankov.It Sy redundant_metadata Ns = Ns Sy all Ns | Ns Sy most
1228b3cff10cSYuri PankovControls what types of metadata are stored redundantly. ZFS stores an extra copy
1229b3cff10cSYuri Pankovof metadata, so that if a single block is corrupted, the amount of user data
1230b3cff10cSYuri Pankovlost is limited. This extra copy is in addition to any redundancy provided at
1231b3cff10cSYuri Pankovthe pool level
1232b3cff10cSYuri Pankov.Pq e.g. by mirroring or RAID-Z ,
1233b3cff10cSYuri Pankovand is in addition to an extra copy specified by the
1234b3cff10cSYuri Pankov.Sy copies
1235b3cff10cSYuri Pankovproperty
1236b3cff10cSYuri Pankov.Pq up to a total of 3 copies .
1237b3cff10cSYuri PankovFor example if the pool is mirrored,
1238b3cff10cSYuri Pankov.Sy copies Ns = Ns 2 ,
1239b3cff10cSYuri Pankovand
1240b3cff10cSYuri Pankov.Sy redundant_metadata Ns = Ns Sy most ,
1241b3cff10cSYuri Pankovthen ZFS stores 6 copies of most metadata, and 4 copies of data and some
1242edf345e6SMatthew Ahrensmetadata.
1243b3cff10cSYuri Pankov.Pp
1244b3cff10cSYuri PankovWhen set to
1245b3cff10cSYuri Pankov.Sy all ,
1246b3cff10cSYuri PankovZFS stores an extra copy of all metadata. If a single on-disk block is corrupt,
1247b3cff10cSYuri Pankovat worst a single block of user data
1248b3cff10cSYuri Pankov.Po which is
1249b3cff10cSYuri Pankov.Sy recordsize
1250b3cff10cSYuri Pankovbytes long
1251b3cff10cSYuri Pankov.Pc
1252b3cff10cSYuri Pankovcan be lost.
1253b3cff10cSYuri Pankov.Pp
1254b3cff10cSYuri PankovWhen set to
1255b3cff10cSYuri Pankov.Sy most ,
1256b3cff10cSYuri PankovZFS stores an extra copy of most types of metadata. This can improve performance
1257b3cff10cSYuri Pankovof random writes, because less metadata must be written. In practice, at worst
1258b3cff10cSYuri Pankovabout 100 blocks
1259b3cff10cSYuri Pankov.Po of
1260b3cff10cSYuri Pankov.Sy recordsize
1261b3cff10cSYuri Pankovbytes each
1262b3cff10cSYuri Pankov.Pc
1263b3cff10cSYuri Pankovof user data can be lost if a single on-disk block is corrupt. The exact
1264b3cff10cSYuri Pankovbehavior of which metadata blocks are stored redundantly may change in future
1265b3cff10cSYuri Pankovreleases.
1266b3cff10cSYuri Pankov.Pp
1267b3cff10cSYuri PankovThe default value is
1268b3cff10cSYuri Pankov.Sy all .
1269b3cff10cSYuri Pankov.It Sy refquota Ns = Ns Em size Ns | Ns Sy none
1270c10c16deSRichard LoweLimits the amount of space a dataset can consume. This property enforces a hard
1271c10c16deSRichard Lowelimit on the amount of space used. This hard limit does not include space used
1272c10c16deSRichard Loweby descendents, including file systems and snapshots.
1273b3cff10cSYuri Pankov.It Sy refreservation Ns = Ns Em size Ns | Ns Sy none
1274c10c16deSRichard LoweThe minimum amount of space guaranteed to a dataset, not including its
1275c10c16deSRichard Lowedescendents. When the amount of space used is below this value, the dataset is
1276c10c16deSRichard Lowetreated as if it were taking up the amount of space specified by
1277b3cff10cSYuri Pankov.Sy refreservation .
1278b3cff10cSYuri PankovThe
1279b3cff10cSYuri Pankov.Sy refreservation
1280b3cff10cSYuri Pankovreservation is accounted for in the parent datasets' space used, and counts
1281b3cff10cSYuri Pankovagainst the parent datasets' quotas and reservations.
1282b3cff10cSYuri Pankov.Pp
1283b3cff10cSYuri PankovIf
1284b3cff10cSYuri Pankov.Sy refreservation
1285b3cff10cSYuri Pankovis set, a snapshot is only allowed if there is enough free pool space outside of
1286b3cff10cSYuri Pankovthis reservation to accommodate the current number of
1287b3cff10cSYuri Pankov.Qq referenced
1288b3cff10cSYuri Pankovbytes in the dataset.
1289b3cff10cSYuri Pankov.Pp
1290c10c16deSRichard LoweThis property can also be referred to by its shortened column name,
1291b3cff10cSYuri Pankov.Sy refreserv .
1292b3cff10cSYuri Pankov.It Sy reservation Ns = Ns Em size Ns | Ns Sy none
1293c10c16deSRichard LoweThe minimum amount of space guaranteed to a dataset and its descendents. When
1294c10c16deSRichard Lowethe amount of space used is below this value, the dataset is treated as if it
1295c10c16deSRichard Lowewere taking up the amount of space specified by its reservation. Reservations
1296c10c16deSRichard Loweare accounted for in the parent datasets' space used, and count against the
1297c10c16deSRichard Loweparent datasets' quotas and reservations.
1298b3cff10cSYuri Pankov.Pp
1299c10c16deSRichard LoweThis property can also be referred to by its shortened column name,
1300b3cff10cSYuri Pankov.Sy reserv .
1301b3cff10cSYuri Pankov.It Sy secondarycache Ns = Ns Sy all Ns | Ns Sy none Ns | Ns Sy metadata
1302b3cff10cSYuri PankovControls what is cached in the secondary cache
1303b3cff10cSYuri Pankov.Pq L2ARC .
1304b3cff10cSYuri PankovIf this property is set to
1305b3cff10cSYuri Pankov.Sy all ,
1306b3cff10cSYuri Pankovthen both user data and metadata is cached. If this property is set to
1307b3cff10cSYuri Pankov.Sy none ,
1308b3cff10cSYuri Pankovthen neither user data nor metadata is cached. If this property is set to
1309b3cff10cSYuri Pankov.Sy metadata ,
1310b3cff10cSYuri Pankovthen only metadata is cached. The default value is
1311b3cff10cSYuri Pankov.Sy all .
1312b3cff10cSYuri Pankov.It Sy setuid Ns = Ns Sy on Ns | Ns Sy off
1313b3cff10cSYuri PankovControls whether the setuid bit is respected for the file system. The default
1314b3cff10cSYuri Pankovvalue is
1315b3cff10cSYuri Pankov.Sy on .
1316b3cff10cSYuri Pankov.It Sy sharesmb Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Em opts
1317b3cff10cSYuri PankovControls whether the file system is shared via SMB, and what options are to be
1318b3cff10cSYuri Pankovused. A file system with the
1319b3cff10cSYuri Pankov.Sy sharesmb
1320b3cff10cSYuri Pankovproperty set to
1321b3cff10cSYuri Pankov.Sy off
1322b3cff10cSYuri Pankovis managed through traditional tools such as
1323b3cff10cSYuri Pankov.Xr sharemgr 1M .
1324b3cff10cSYuri PankovOtherwise, the file system is automatically shared and unshared with the
1325b3cff10cSYuri Pankov.Nm zfs Cm share
1326b3cff10cSYuri Pankovand
1327b3cff10cSYuri Pankov.Nm zfs Cm unshare
1328b3cff10cSYuri Pankovcommands. If the property is set to
1329b3cff10cSYuri Pankov.Sy on ,
1330b3cff10cSYuri Pankovthe
1331b3cff10cSYuri Pankov.Xr sharemgr 1M
1332b3cff10cSYuri Pankovcommand is invoked with no options. Otherwise, the
1333b3cff10cSYuri Pankov.Xr sharemgr 1M
1334b3cff10cSYuri Pankovcommand is invoked with options equivalent to the contents of this property.
1335b3cff10cSYuri Pankov.Pp
1336b3cff10cSYuri PankovBecause SMB shares requires a resource name, a unique resource name is
1337b3cff10cSYuri Pankovconstructed from the dataset name. The constructed name is a copy of the dataset
1338b3cff10cSYuri Pankovname except that the characters in the dataset name, which would be illegal in
1339b3cff10cSYuri Pankovthe resource name, are replaced with underscore
1340b3cff10cSYuri Pankov.Pq Sy _
1341b3cff10cSYuri Pankovcharacters. A pseudo property
1342b3cff10cSYuri Pankov.Qq name
1343b3cff10cSYuri Pankovis also supported that allows you to replace the data set name with a specified
1344b3cff10cSYuri Pankovname. The specified name is then used to replace the prefix dataset in the case
1345b3cff10cSYuri Pankovof inheritance. For example, if the dataset
1346b3cff10cSYuri Pankov.Em data/home/john
1347b3cff10cSYuri Pankovis set to
1348b3cff10cSYuri Pankov.Sy name Ns = Ns Sy john ,
1349b3cff10cSYuri Pankovthen
1350b3cff10cSYuri Pankov.Em data/home/john
1351b3cff10cSYuri Pankovhas a resource name of
1352b3cff10cSYuri Pankov.Sy john .
1353b3cff10cSYuri PankovIf a child dataset
1354b3cff10cSYuri Pankov.Em data/home/john/backups
1355b3cff10cSYuri Pankovis shared, it has a resource name of
1356b3cff10cSYuri Pankov.Sy john_backups .
1357b3cff10cSYuri Pankov.Pp
1358c10c16deSRichard LoweWhen SMB shares are created, the SMB share name appears as an entry in the
1359b3cff10cSYuri Pankov.Pa .zfs/shares
1360b3cff10cSYuri Pankovdirectory. You can use the
1361b3cff10cSYuri Pankov.Nm ls
1362b3cff10cSYuri Pankovor
1363b3cff10cSYuri Pankov.Nm chmod
1364b3cff10cSYuri Pankovcommand to display the share-level ACLs on the entries in this directory.
1365b3cff10cSYuri Pankov.Pp
1366b3cff10cSYuri PankovWhen the
1367b3cff10cSYuri Pankov.Sy sharesmb
1368b3cff10cSYuri Pankovproperty is changed for a dataset, the dataset and any children inheriting the
1369b3cff10cSYuri Pankovproperty are re-shared with the new options, only if the property was previously
1370b3cff10cSYuri Pankovset to
1371b3cff10cSYuri Pankov.Sy off ,
1372b3cff10cSYuri Pankovor if they were shared before the property was changed. If the new property is
1373b3cff10cSYuri Pankovset to
1374b3cff10cSYuri Pankov.Sy off ,
1375b3cff10cSYuri Pankovthe file systems are unshared.
1376b3cff10cSYuri Pankov.It Sy sharenfs Ns = Ns Sy on Ns | Ns Sy off Ns | Ns Em opts
1377b3cff10cSYuri PankovControls whether the file system is shared via NFS, and what options are to be
1378b3cff10cSYuri Pankovused. A file system with a
1379b3cff10cSYuri Pankov.Sy sharenfs
1380b3cff10cSYuri Pankovproperty of
1381b3cff10cSYuri Pankov.Sy off
1382b3cff10cSYuri Pankovis managed through traditional tools such as
1383b3cff10cSYuri Pankov.Xr share 1M ,
1384b3cff10cSYuri Pankov.Xr unshare 1M ,
1385b3cff10cSYuri Pankovand
1386b3cff10cSYuri Pankov.Xr dfstab 4 .
1387b3cff10cSYuri PankovOtherwise, the file system is automatically shared and unshared with the
1388b3cff10cSYuri Pankov.Nm zfs Cm share
1389b3cff10cSYuri Pankovand
1390b3cff10cSYuri Pankov.Nm zfs Cm unshare
1391b3cff10cSYuri Pankovcommands. If the property is set to
1392b3cff10cSYuri Pankov.Sy on ,
1393b3cff10cSYuri Pankov.Xr share 1M
1394b3cff10cSYuri Pankovcommand is invoked with no options. Otherwise, the
1395b3cff10cSYuri Pankov.Xr share 1M
1396b3cff10cSYuri Pankovcommand is invoked with options equivalent to the contents of this property.
1397b3cff10cSYuri Pankov.Pp
1398b3cff10cSYuri PankovWhen the
1399b3cff10cSYuri Pankov.Sy sharenfs
1400b3cff10cSYuri Pankovproperty is changed for a dataset, the dataset and any children inheriting the
1401b3cff10cSYuri Pankovproperty are re-shared with the new options, only if the property was previously
1402b3cff10cSYuri Pankov.Sy off ,
1403b3cff10cSYuri Pankovor if they were shared before the property was changed. If the new property is
1404b3cff10cSYuri Pankov.Sy off ,
1405b3cff10cSYuri Pankovthe file systems are unshared.
1406b3cff10cSYuri Pankov.It Sy logbias Ns = Ns Sy latency Ns | Ns Sy throughput
1407b3cff10cSYuri PankovProvide a hint to ZFS about handling of synchronous requests in this dataset. If
1408b3cff10cSYuri Pankov.Sy logbias
1409b3cff10cSYuri Pankovis set to
1410b3cff10cSYuri Pankov.Sy latency
1411b3cff10cSYuri Pankov.Pq the default ,
1412b3cff10cSYuri PankovZFS will use pool log devices
1413b3cff10cSYuri Pankov.Pq if configured
1414b3cff10cSYuri Pankovto handle the requests at low latency. If
1415b3cff10cSYuri Pankov.Sy logbias
1416b3cff10cSYuri Pankovis set to
1417b3cff10cSYuri Pankov.Sy throughput ,
1418b3cff10cSYuri PankovZFS will not use configured pool log devices. ZFS will instead optimize
1419b3cff10cSYuri Pankovsynchronous operations for global pool throughput and efficient use of
1420b3cff10cSYuri Pankovresources.
1421b3cff10cSYuri Pankov.It Sy snapdir Ns = Ns Sy hidden Ns | Ns Sy visible
1422b3cff10cSYuri PankovControls whether the
1423b3cff10cSYuri Pankov.Pa .zfs
1424b3cff10cSYuri Pankovdirectory is hidden or visible in the root of the file system as discussed in
1425b3cff10cSYuri Pankovthe
1426b3cff10cSYuri Pankov.Sx Snapshots
1427b3cff10cSYuri Pankovsection. The default value is
1428b3cff10cSYuri Pankov.Sy hidden .
1429b3cff10cSYuri Pankov.It Sy sync Ns = Ns Sy standard Ns | Ns Sy always Ns | Ns Sy disabled
1430b3cff10cSYuri PankovControls the behavior of synchronous requests
1431b3cff10cSYuri Pankov.Pq e.g. fsync, O_DSYNC .
1432b3cff10cSYuri Pankov.Sy standard
1433b3cff10cSYuri Pankovis the
1434b3cff10cSYuri Pankov.Tn POSIX
1435b3cff10cSYuri Pankovspecified behavior of ensuring all synchronous requests are written to stable
1436b3cff10cSYuri Pankovstorage and all devices are flushed to ensure data is not cached by device
1437b3cff10cSYuri Pankovcontrollers
1438b3cff10cSYuri Pankov.Pq this is the default .
1439b3cff10cSYuri Pankov.Sy always
144019b94df9SMatthew Ahrenscauses every file system transaction to be written and flushed before its
1441b3cff10cSYuri Pankovsystem call returns. This has a large performance penalty.
1442b3cff10cSYuri Pankov.Sy disabled
144319b94df9SMatthew Ahrensdisables synchronous requests. File system transactions are only committed to
144419b94df9SMatthew Ahrensstable storage periodically. This option will give the highest performance.
144519b94df9SMatthew AhrensHowever, it is very dangerous as ZFS would be ignoring the synchronous
144619b94df9SMatthew Ahrenstransaction demands of applications such as databases or NFS. Administrators
144719b94df9SMatthew Ahrensshould only use this option when the risks are understood.
1448b3cff10cSYuri Pankov.It Sy version Ns = Ns Em N Ns | Ns Sy current
1449c10c16deSRichard LoweThe on-disk version of this file system, which is independent of the pool
1450c10c16deSRichard Loweversion. This property can only be set to later supported versions. See the
1451b3cff10cSYuri Pankov.Nm zfs Cm upgrade
1452b3cff10cSYuri Pankovcommand.
1453b3cff10cSYuri Pankov.It Sy volsize Ns = Ns Em size
1454c10c16deSRichard LoweFor volumes, specifies the logical size of the volume. By default, creating a
1455b3cff10cSYuri Pankovvolume establishes a reservation of equal size. For storage pools with a version
1456b3cff10cSYuri Pankovnumber of 9 or higher, a
1457b3cff10cSYuri Pankov.Sy refreservation
1458b3cff10cSYuri Pankovis set instead. Any changes to
1459b3cff10cSYuri Pankov.Sy volsize
1460b3cff10cSYuri Pankovare reflected in an equivalent change to the reservation
1461b3cff10cSYuri Pankov.Po or
1462b3cff10cSYuri Pankov.Sy refreservation
1463b3cff10cSYuri Pankov.Pc .
1464b3cff10cSYuri PankovThe
1465b3cff10cSYuri Pankov.Sy volsize
1466b3cff10cSYuri Pankovcan only be set to a multiple of
1467b3cff10cSYuri Pankov.Sy volblocksize ,
1468b3cff10cSYuri Pankovand cannot be zero.
1469b3cff10cSYuri Pankov.Pp
1470b3cff10cSYuri PankovThe reservation is kept equal to the volume's logical size to prevent unexpected
1471b3cff10cSYuri Pankovbehavior for consumers. Without the reservation, the volume could run out of
1472b3cff10cSYuri Pankovspace, resulting in undefined behavior or data corruption, depending on how the
1473b3cff10cSYuri Pankovvolume is used. These effects can also occur when the volume size is changed
1474b3cff10cSYuri Pankovwhile it is in use
1475b3cff10cSYuri Pankov.Pq particularly when shrinking the size .
1476b3cff10cSYuri PankovExtreme care should be used when adjusting the volume size.
1477b3cff10cSYuri Pankov.Pp
1478b3cff10cSYuri PankovThough not recommended, a
1479b3cff10cSYuri Pankov.Qq sparse volume
1480b3cff10cSYuri Pankov.Po also known as
1481b3cff10cSYuri Pankov.Qq thin provisioning
1482b3cff10cSYuri Pankov.Pc
1483b3cff10cSYuri Pankovcan be created by specifying the
1484b3cff10cSYuri Pankov.Fl s
1485b3cff10cSYuri Pankovoption to the
1486b3cff10cSYuri Pankov.Nm zfs Cm create Fl V
1487c10c16deSRichard Lowecommand, or by changing the reservation after the volume has been created. A
1488b3cff10cSYuri Pankov.Qq sparse volume
1489b3cff10cSYuri Pankovis a volume where the reservation is less then the volume size. Consequently,
1490b3cff10cSYuri Pankovwrites to a sparse volume can fail with
1491b3cff10cSYuri Pankov.Er ENOSPC
1492b3cff10cSYuri Pankovwhen the pool is low on space. For a sparse volume, changes to
1493b3cff10cSYuri Pankov.Sy volsize
1494b3cff10cSYuri Pankovare not reflected in the reservation.
1495b3cff10cSYuri Pankov.It Sy vscan Ns = Ns Sy on Ns | Ns Sy off
1496c10c16deSRichard LoweControls whether regular files should be scanned for viruses when a file is
1497c10c16deSRichard Loweopened and closed. In addition to enabling this property, the virus scan
1498c10c16deSRichard Loweservice must also be enabled for virus scanning to occur. The default value is
1499b3cff10cSYuri Pankov.Sy off .
1500b3cff10cSYuri Pankov.It Sy xattr Ns = Ns Sy on Ns | Ns Sy off
1501c10c16deSRichard LoweControls whether extended attributes are enabled for this file system. The
1502b3cff10cSYuri Pankovdefault value is
1503b3cff10cSYuri Pankov.Sy on .
1504b3cff10cSYuri Pankov.It Sy zoned Ns = Ns Sy on Ns | Ns Sy off
1505b3cff10cSYuri PankovControls whether the dataset is managed from a non-global zone. See the
1506b3cff10cSYuri Pankov.Sx Zones
1507b3cff10cSYuri Pankovsection for more information. The default value is
1508b3cff10cSYuri Pankov.Sy off .
1509b3cff10cSYuri Pankov.El
1510b3cff10cSYuri Pankov.Pp
1511c10c16deSRichard LoweThe following three properties cannot be changed after the file system is
1512c10c16deSRichard Lowecreated, and therefore, should be set when the file system is created. If the
1513b3cff10cSYuri Pankovproperties are not set with the
1514b3cff10cSYuri Pankov.Nm zfs Cm create
1515b3cff10cSYuri Pankovor
1516b3cff10cSYuri Pankov.Nm zpool Cm create
1517c10c16deSRichard Lowecommands, these properties are inherited from the parent dataset. If the parent
1518c10c16deSRichard Lowedataset lacks these properties due to having been created prior to these
1519c10c16deSRichard Lowefeatures being supported, the new file system will have the default values for
1520c10c16deSRichard Lowethese properties.
1521b3cff10cSYuri Pankov.Bl -tag -width ""
1522b3cff10cSYuri Pankov.It Xo
1523b3cff10cSYuri Pankov.Sy casesensitivity Ns = Ns Sy sensitive Ns | Ns
1524b3cff10cSYuri Pankov.Sy insensitive Ns | Ns Sy mixed
1525b3cff10cSYuri Pankov.Xc
1526c10c16deSRichard LoweIndicates whether the file name matching algorithm used by the file system
1527c10c16deSRichard Loweshould be case-sensitive, case-insensitive, or allow a combination of both
1528b3cff10cSYuri Pankovstyles of matching. The default value for the
1529b3cff10cSYuri Pankov.Sy casesensitivity
1530b3cff10cSYuri Pankovproperty is
1531b3cff10cSYuri Pankov.Sy sensitive .
1532b3cff10cSYuri PankovTraditionally,
1533b3cff10cSYuri Pankov.Ux
1534b3cff10cSYuri Pankovand
1535b3cff10cSYuri Pankov.Tn POSIX
1536b3cff10cSYuri Pankovfile systems have case-sensitive file names.
1537b3cff10cSYuri Pankov.Pp
1538b3cff10cSYuri PankovThe
1539b3cff10cSYuri Pankov.Sy mixed
1540b3cff10cSYuri Pankovvalue for the
1541b3cff10cSYuri Pankov.Sy casesensitivity
1542b3cff10cSYuri Pankovproperty indicates that the file system can support requests for both
1543b3cff10cSYuri Pankovcase-sensitive and case-insensitive matching behavior. Currently,
1544b3cff10cSYuri Pankovcase-insensitive matching behavior on a file system that supports mixed behavior
1545b3cff10cSYuri Pankovis limited to the SMB server product. For more information about the
1546b3cff10cSYuri Pankov.Sy mixed
1547b3cff10cSYuri Pankovvalue behavior, see the "ZFS Administration Guide".
1548b3cff10cSYuri Pankov.It Xo
1549b3cff10cSYuri Pankov.Sy normalization Ns = Ns Sy none Ns | Ns Sy formC Ns | Ns
1550b3cff10cSYuri Pankov.Sy formD Ns | Ns Sy formKC Ns | Ns Sy formKD
1551b3cff10cSYuri Pankov.Xc
1552b3cff10cSYuri PankovIndicates whether the file system should perform a
1553b3cff10cSYuri Pankov.Sy unicode
1554b3cff10cSYuri Pankovnormalization of file names whenever two file names are compared, and which
1555b3cff10cSYuri Pankovnormalization algorithm should be used. File names are always stored unmodified,
1556b3cff10cSYuri Pankovnames are normalized as part of any comparison process. If this property is set
1557b3cff10cSYuri Pankovto a legal value other than
1558b3cff10cSYuri Pankov.Sy none ,
1559b3cff10cSYuri Pankovand the
1560b3cff10cSYuri Pankov.Sy utf8only
1561b3cff10cSYuri Pankovproperty was left unspecified, the
1562b3cff10cSYuri Pankov.Sy utf8only
1563b3cff10cSYuri Pankovproperty is automatically set to
1564b3cff10cSYuri Pankov.Sy on .
1565b3cff10cSYuri PankovThe default value of the
1566b3cff10cSYuri Pankov.Sy normalization
1567b3cff10cSYuri Pankovproperty is
1568b3cff10cSYuri Pankov.Sy none .
1569b3cff10cSYuri PankovThis property cannot be changed after the file system is created.
1570b3cff10cSYuri Pankov.It Sy utf8only Ns = Ns Sy on Ns | Ns Sy off
1571c10c16deSRichard LoweIndicates whether the file system should reject file names that include
1572b3cff10cSYuri Pankovcharacters that are not present in the
1573b3cff10cSYuri Pankov.Sy UTF-8
1574b3cff10cSYuri Pankovcharacter code set. If this property is explicitly set to
1575b3cff10cSYuri Pankov.Sy off ,
1576b3cff10cSYuri Pankovthe normalization property must either not be explicitly set or be set to
1577b3cff10cSYuri Pankov.Sy none .
1578b3cff10cSYuri PankovThe default value for the
1579b3cff10cSYuri Pankov.Sy utf8only
1580b3cff10cSYuri Pankovproperty is
1581b3cff10cSYuri Pankov.Sy off .
1582b3cff10cSYuri PankovThis property cannot be changed after the file system is created.
1583b3cff10cSYuri Pankov.El
1584b3cff10cSYuri Pankov.Pp
1585b3cff10cSYuri PankovThe
1586b3cff10cSYuri Pankov.Sy casesensitivity ,
1587b3cff10cSYuri Pankov.Sy normalization ,
1588b3cff10cSYuri Pankovand
1589b3cff10cSYuri Pankov.Sy utf8only
1590b3cff10cSYuri Pankovproperties are also new permissions that can be assigned to non-privileged users
1591b3cff10cSYuri Pankovby using the ZFS delegated administration feature.
1592b3cff10cSYuri Pankov.Ss "Temporary Mount Point Properties"
1593b3cff10cSYuri PankovWhen a file system is mounted, either through
1594b3cff10cSYuri Pankov.Xr mount 1M
1595b3cff10cSYuri Pankovfor legacy mounts or the
1596b3cff10cSYuri Pankov.Nm zfs Cm mount
1597b3cff10cSYuri Pankovcommand for normal file systems, its mount options are set according to its
1598b3cff10cSYuri Pankovproperties. The correlation between properties and mount options is as follows:
1599b3cff10cSYuri Pankov.Bd -literal
1600c10c16deSRichard Lowe    PROPERTY                MOUNT OPTION
1601c10c16deSRichard Lowe    devices                 devices/nodevices
1602c10c16deSRichard Lowe    exec                    exec/noexec
1603*e6d2808dSMarcel Telka    follow                  follow/nofollow
1604c10c16deSRichard Lowe    readonly                ro/rw
1605c10c16deSRichard Lowe    setuid                  setuid/nosetuid
1606c10c16deSRichard Lowe    xattr                   xattr/noxattr
1607b3cff10cSYuri Pankov.Ed
1608b3cff10cSYuri Pankov.Pp
1609b3cff10cSYuri PankovIn addition, these options can be set on a per-mount basis using the
1610b3cff10cSYuri Pankov.Fl o
1611c10c16deSRichard Loweoption, without affecting the property that is stored on disk. The values
1612c10c16deSRichard Lowespecified on the command line override the values stored in the dataset. The
1613b3cff10cSYuri Pankov.Sy nosuid
1614b3cff10cSYuri Pankovoption is an alias for
1615b3cff10cSYuri Pankov.Sy nodevices Ns , Ns Sy nosetuid .
1616b3cff10cSYuri PankovThese properties are reported as
1617b3cff10cSYuri Pankov.Qq temporary
1618b3cff10cSYuri Pankovby the
1619b3cff10cSYuri Pankov.Nm zfs Cm get
1620b3cff10cSYuri Pankovcommand. If the properties are changed while the dataset is mounted, the new
1621b3cff10cSYuri Pankovsetting overrides any temporary settings.
1622b3cff10cSYuri Pankov.Ss "User Properties"
1623b3cff10cSYuri PankovIn addition to the standard native properties, ZFS supports arbitrary user
1624b3cff10cSYuri Pankovproperties. User properties have no effect on ZFS behavior, but applications or
1625b3cff10cSYuri Pankovadministrators can use them to annotate datasets
1626b3cff10cSYuri Pankov.Pq file systems, volumes, and snapshots .
1627b3cff10cSYuri Pankov.Pp
1628b3cff10cSYuri PankovUser property names must contain a colon
16291058dba4SYuri Pankov.Pq Qq Sy \&:
1630b3cff10cSYuri Pankovcharacter to distinguish them from native properties. They may contain lowercase
1631b3cff10cSYuri Pankovletters, numbers, and the following punctuation characters: colon
1632b3cff10cSYuri Pankov.Pq Qq Sy \&: ,
1633b3cff10cSYuri Pankovdash
1634b3cff10cSYuri Pankov.Pq Qq Sy - ,
1635b3cff10cSYuri Pankovperiod
1636b3cff10cSYuri Pankov.Pq Qq Sy \&. ,
1637b3cff10cSYuri Pankovand underscore
1638b3cff10cSYuri Pankov.Pq Qq Sy _ .
1639b3cff10cSYuri PankovThe expected convention is that the property name is divided into two portions
1640b3cff10cSYuri Pankovsuch as
1641b3cff10cSYuri Pankov.Em module Ns : Ns Em property ,
1642b3cff10cSYuri Pankovbut this namespace is not enforced by ZFS.
1643b3cff10cSYuri PankovUser property names can be at most 256 characters, and cannot begin with a dash
1644b3cff10cSYuri Pankov.Pq Qq Sy - .
1645b3cff10cSYuri Pankov.Pp
1646b3cff10cSYuri PankovWhen making programmatic use of user properties, it is strongly suggested to use
1647b3cff10cSYuri Pankova reversed
1648b3cff10cSYuri Pankov.Sy DNS
1649b3cff10cSYuri Pankovdomain name for the
1650b3cff10cSYuri Pankov.Em module
1651b3cff10cSYuri Pankovcomponent of property names to reduce the chance that two
1652b3cff10cSYuri Pankovindependently-developed packages use the same property name for different
1653b3cff10cSYuri Pankovpurposes.
1654b3cff10cSYuri Pankov.Pp
1655c10c16deSRichard LoweThe values of user properties are arbitrary strings, are always inherited, and
1656b3cff10cSYuri Pankovare never validated. All of the commands that operate on properties
1657b3cff10cSYuri Pankov.Po Nm zfs Cm list ,
1658b3cff10cSYuri Pankov.Nm zfs Cm get ,
1659b3cff10cSYuri Pankov.Nm zfs Cm set ,
1660b3cff10cSYuri Pankovand so forth
1661b3cff10cSYuri Pankov.Pc
1662b3cff10cSYuri Pankovcan be used to manipulate both native properties and user properties. Use the
1663b3cff10cSYuri Pankov.Nm zfs Cm inherit
1664b3cff10cSYuri Pankovcommand to clear a user property . If the property is not defined in any parent
1665c10c16deSRichard Lowedataset, it is removed entirely. Property values are limited to 1024
1666c10c16deSRichard Lowecharacters.
1667b3cff10cSYuri Pankov.Ss ZFS Volumes as Swap or Dump Devices
1668b3cff10cSYuri PankovDuring an initial installation a swap device and dump device are created on ZFS
1669b3cff10cSYuri Pankovvolumes in the ZFS root pool. By default, the swap area size is based on 1/2 the
1670b3cff10cSYuri Pankovsize of physical memory up to 2 Gbytes. The size of the dump device depends on
1671b3cff10cSYuri Pankovthe kernel's requirements at installation time. Separate ZFS volumes must be
1672b3cff10cSYuri Pankovused for the swap area and dump devices. Do not swap to a file on a ZFS file
1673b3cff10cSYuri Pankovsystem. A ZFS swap file configuration is not supported.
1674b3cff10cSYuri Pankov.Pp
1675c10c16deSRichard LoweIf you need to change your swap area or dump device after the system is
1676b3cff10cSYuri Pankovinstalled or upgraded, use the
1677b3cff10cSYuri Pankov.Xr swap 1M
1678b3cff10cSYuri Pankovand
1679b3cff10cSYuri Pankov.Xr dumpadm 1M
1680b3cff10cSYuri Pankovcommands.
1681b3cff10cSYuri Pankov.Sh SUBCOMMANDS
1682c10c16deSRichard LoweAll subcommands that modify state are logged persistently to the pool in their
1683c10c16deSRichard Loweoriginal form.
1684b3cff10cSYuri Pankov.Bl -tag -width ""
1685b3cff10cSYuri Pankov.It Nm Fl \?
1686c10c16deSRichard LoweDisplays a help message.
1687b3cff10cSYuri Pankov.It Xo
1688b3cff10cSYuri Pankov.Nm
1689b3cff10cSYuri Pankov.Cm create
1690b3cff10cSYuri Pankov.Op Fl p
1691b3cff10cSYuri Pankov.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1692b3cff10cSYuri Pankov.Ar filesystem
1693b3cff10cSYuri Pankov.Xc
1694b3cff10cSYuri PankovCreates a new ZFS file system. The file system is automatically mounted
1695b3cff10cSYuri Pankovaccording to the
1696b3cff10cSYuri Pankov.Sy mountpoint
1697b3cff10cSYuri Pankovproperty inherited from the parent.
1698b3cff10cSYuri Pankov.Bl -tag -width "-o"
1699b3cff10cSYuri Pankov.It Fl o Ar property Ns = Ns Ar value
1700b3cff10cSYuri PankovSets the specified property as if the command
1701b3cff10cSYuri Pankov.Nm zfs Cm set Ar property Ns = Ns Ar value
1702b3cff10cSYuri Pankovwas invoked at the same time the dataset was created. Any editable ZFS property
1703b3cff10cSYuri Pankovcan also be set at creation time. Multiple
1704b3cff10cSYuri Pankov.Fl o
1705b3cff10cSYuri Pankovoptions can be specified. An error results if the same property is specified in
1706b3cff10cSYuri Pankovmultiple
1707b3cff10cSYuri Pankov.Fl o
1708b3cff10cSYuri Pankovoptions.
1709b3cff10cSYuri Pankov.It Fl p
1710c10c16deSRichard LoweCreates all the non-existing parent datasets. Datasets created in this manner
1711b3cff10cSYuri Pankovare automatically mounted according to the
1712b3cff10cSYuri Pankov.Sy mountpoint
1713b3cff10cSYuri Pankovproperty inherited from their parent. Any property specified on the command line
1714b3cff10cSYuri Pankovusing the
1715b3cff10cSYuri Pankov.Fl o
1716b3cff10cSYuri Pankovoption is ignored. If the target filesystem already exists, the operation
1717b3cff10cSYuri Pankovcompletes successfully.
1718b3cff10cSYuri Pankov.El
1719b3cff10cSYuri Pankov.It Xo
1720b3cff10cSYuri Pankov.Nm
1721b3cff10cSYuri Pankov.Cm create
1722b3cff10cSYuri Pankov.Op Fl ps
1723b3cff10cSYuri Pankov.Op Fl b Ar blocksize
1724b3cff10cSYuri Pankov.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1725b3cff10cSYuri Pankov.Fl V Ar size Ar volume
1726b3cff10cSYuri Pankov.Xc
1727c10c16deSRichard LoweCreates a volume of the given size. The volume is exported as a block device in
1728b3cff10cSYuri Pankov.Pa /dev/zvol/{dsk,rdsk}/path ,
1729b3cff10cSYuri Pankovwhere
1730b3cff10cSYuri Pankov.Em path
1731b3cff10cSYuri Pankovis the name of the volume in the ZFS namespace. The size represents the logical
1732b3cff10cSYuri Pankovsize as exported by the device. By default, a reservation of equal size is
1733b3cff10cSYuri Pankovcreated.
1734b3cff10cSYuri Pankov.Pp
1735b3cff10cSYuri Pankov.Ar size
1736b3cff10cSYuri Pankovis automatically rounded up to the nearest 128 Kbytes to ensure that the volume
1737b3cff10cSYuri Pankovhas an integral number of blocks regardless of
1738b3cff10cSYuri Pankov.Sy blocksize .
1739b3cff10cSYuri Pankov.Bl -tag -width "-b"
1740b3cff10cSYuri Pankov.It Fl b Ar blocksize
1741b3cff10cSYuri PankovEquivalent to
1742b3cff10cSYuri Pankov.Fl o Sy volblocksize Ns = Ns Ar blocksize .
1743b3cff10cSYuri PankovIf this option is specified in conjunction with
1744b3cff10cSYuri Pankov.Fl o Sy volblocksize ,
1745b3cff10cSYuri Pankovthe resulting behavior is undefined.
1746b3cff10cSYuri Pankov.It Fl o Ar property Ns = Ns Ar value
1747b3cff10cSYuri PankovSets the specified property as if the
1748b3cff10cSYuri Pankov.Nm zfs Cm set Ar property Ns = Ns Ar value
1749b3cff10cSYuri Pankovcommand was invoked at the same time the dataset was created. Any editable ZFS
1750b3cff10cSYuri Pankovproperty can also be set at creation time. Multiple
1751b3cff10cSYuri Pankov.Fl o
1752b3cff10cSYuri Pankovoptions can be specified. An error results if the same property is specified in
1753b3cff10cSYuri Pankovmultiple
1754b3cff10cSYuri Pankov.Fl o
1755b3cff10cSYuri Pankovoptions.
1756b3cff10cSYuri Pankov.It Fl p
1757c10c16deSRichard LoweCreates all the non-existing parent datasets. Datasets created in this manner
1758b3cff10cSYuri Pankovare automatically mounted according to the
1759b3cff10cSYuri Pankov.Sy mountpoint
1760b3cff10cSYuri Pankovproperty inherited from their parent. Any property specified on the command line
1761b3cff10cSYuri Pankovusing the
1762b3cff10cSYuri Pankov.Fl o
1763b3cff10cSYuri Pankovoption is ignored. If the target filesystem already exists, the operation
1764b3cff10cSYuri Pankovcompletes successfully.
1765b3cff10cSYuri Pankov.It Fl s
1766b3cff10cSYuri PankovCreates a sparse volume with no reservation. See
1767b3cff10cSYuri Pankov.Sy volsize
1768b3cff10cSYuri Pankovin the
1769b3cff10cSYuri Pankov.Sx Native Properties
1770b3cff10cSYuri Pankovsection for more information about sparse volumes.
1771b3cff10cSYuri Pankov.El
1772b3cff10cSYuri Pankov.It Xo
1773b3cff10cSYuri Pankov.Nm
1774b3cff10cSYuri Pankov.Cm destroy
1775b3cff10cSYuri Pankov.Op Fl Rfnprv
1776b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume
1777b3cff10cSYuri Pankov.Xc
1778c10c16deSRichard LoweDestroys the given dataset. By default, the command unshares any file systems
1779c10c16deSRichard Lowethat are currently shared, unmounts any file systems that are currently
1780b3cff10cSYuri Pankovmounted, and refuses to destroy a dataset that has active dependents
1781b3cff10cSYuri Pankov.Pq children or clones .
1782b3cff10cSYuri Pankov.Bl -tag -width "-R"
1783b3cff10cSYuri Pankov.It Fl R
1784c10c16deSRichard LoweRecursively destroy all dependents, including cloned file systems outside the
1785c10c16deSRichard Lowetarget hierarchy.
1786b3cff10cSYuri Pankov.It Fl f
1787b3cff10cSYuri PankovForce an unmount of any file systems using the
1788b3cff10cSYuri Pankov.Nm unmount Fl f
1789b3cff10cSYuri Pankovcommand. This option has no effect on non-file systems or unmounted file
1790b3cff10cSYuri Pankovsystems.
1791b3cff10cSYuri Pankov.It Fl n
1792b3cff10cSYuri PankovDo a dry-run
1793b3cff10cSYuri Pankov.Pq Qq No-op
1794b3cff10cSYuri Pankovdeletion. No data will be deleted. This is useful in conjunction with the
1795b3cff10cSYuri Pankov.Fl v
1796b3cff10cSYuri Pankovor
1797b3cff10cSYuri Pankov.Fl p
1798b3cff10cSYuri Pankovflags to determine what data would be deleted.
1799b3cff10cSYuri Pankov.It Fl p
180019b94df9SMatthew AhrensPrint machine-parsable verbose information about the deleted data.
1801b3cff10cSYuri Pankov.It Fl r
1802b3cff10cSYuri PankovRecursively destroy all children.
1803b3cff10cSYuri Pankov.It Fl v
180419b94df9SMatthew AhrensPrint verbose information about the deleted data.
1805b3cff10cSYuri Pankov.El
1806b3cff10cSYuri Pankov.Pp
1807b3cff10cSYuri PankovExtreme care should be taken when applying either the
1808b3cff10cSYuri Pankov.Fl r
1809b3cff10cSYuri Pankovor the
1810b3cff10cSYuri Pankov.Fl R
1811c10c16deSRichard Loweoptions, as they can destroy large portions of a pool and cause unexpected
1812c10c16deSRichard Lowebehavior for mounted file systems in use.
1813b3cff10cSYuri Pankov.It Xo
1814b3cff10cSYuri Pankov.Nm
1815b3cff10cSYuri Pankov.Cm destroy
1816b3cff10cSYuri Pankov.Op Fl Rdnprv
1817b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume Ns @ Ns Ar snap Ns
1818b3cff10cSYuri Pankov.Oo % Ns Ar snap Ns Oo , Ns Ar snap Ns Oo % Ns Ar snap Oc Oc Oc Ns ...
1819b3cff10cSYuri Pankov.Xc
1820b3cff10cSYuri PankovThe given snapshots are destroyed immediately if and only if the
1821b3cff10cSYuri Pankov.Nm zfs Cm destroy
1822b3cff10cSYuri Pankovcommand without the
1823b3cff10cSYuri Pankov.Fl d
1824b3cff10cSYuri Pankovoption would have destroyed it. Such immediate destruction would occur, for
1825b3cff10cSYuri Pankovexample, if the snapshot had no clones and the user-initiated reference count
1826b3cff10cSYuri Pankovwere zero.
1827b3cff10cSYuri Pankov.Pp
182819b94df9SMatthew AhrensIf a snapshot does not qualify for immediate destruction, it is marked for
1829c10c16deSRichard Lowedeferred deletion. In this state, it exists as a usable, visible snapshot until
1830c10c16deSRichard Loweboth of the preconditions listed above are met, at which point it is destroyed.
1831b3cff10cSYuri Pankov.Pp
1832b3cff10cSYuri PankovAn inclusive range of snapshots may be specified by separating the first and
1833b3cff10cSYuri Pankovlast snapshots with a percent sign. The first and/or last snapshots may be left
1834b3cff10cSYuri Pankovblank, in which case the filesystem's oldest or newest snapshot will be implied.
1835b3cff10cSYuri Pankov.Pp
183619b94df9SMatthew AhrensMultiple snapshots
1837b3cff10cSYuri Pankov.Pq or ranges of snapshots
1838b3cff10cSYuri Pankovof the same filesystem or volume may be specified in a comma-separated list of
1839b3cff10cSYuri Pankovsnapshots. Only the snapshot's short name
1840b3cff10cSYuri Pankov.Po the part after the
1841b3cff10cSYuri Pankov.Sy @
1842b3cff10cSYuri Pankov.Pc
1843b3cff10cSYuri Pankovshould be specified when using a range or comma-separated list to identify
1844b3cff10cSYuri Pankovmultiple snapshots.
1845b3cff10cSYuri Pankov.Bl -tag -width "-R"
1846b3cff10cSYuri Pankov.It Fl R
18473b2aab18SMatthew AhrensRecursively destroy all clones of these snapshots, including the clones,
1848b3cff10cSYuri Pankovsnapshots, and children. If this flag is specified, the
1849b3cff10cSYuri Pankov.Fl d
1850b3cff10cSYuri Pankovflag will have no effect.
1851b3cff10cSYuri Pankov.It Fl d
1852b3cff10cSYuri PankovDefer snapshot deletion.
1853b3cff10cSYuri Pankov.It Fl n
1854b3cff10cSYuri PankovDo a dry-run
1855b3cff10cSYuri Pankov.Pq Qq No-op
1856b3cff10cSYuri Pankovdeletion. No data will be deleted. This is
1857b3cff10cSYuri Pankovuseful in conjunction with the
1858b3cff10cSYuri Pankov.Fl p
1859b3cff10cSYuri Pankovor
1860b3cff10cSYuri Pankov.Fl v
1861b3cff10cSYuri Pankovflags to determine what data would be deleted.
1862b3cff10cSYuri Pankov.It Fl p
186319b94df9SMatthew AhrensPrint machine-parsable verbose information about the deleted data.
1864b3cff10cSYuri Pankov.It Fl r
1865b3cff10cSYuri PankovDestroy
1866b3cff10cSYuri Pankov.Pq or mark for deferred deletion
1867b3cff10cSYuri Pankovall snapshots with this name in descendent file systems.
1868b3cff10cSYuri Pankov.It Fl v
186919b94df9SMatthew AhrensPrint verbose information about the deleted data.
1870b3cff10cSYuri Pankov.Pp
1871b3cff10cSYuri PankovExtreme care should be taken when applying either the
1872b3cff10cSYuri Pankov.Fl r
1873b3cff10cSYuri Pankovor the
1874b3cff10cSYuri Pankov.Fl R
187519b94df9SMatthew Ahrensoptions, as they can destroy large portions of a pool and cause unexpected
187619b94df9SMatthew Ahrensbehavior for mounted file systems in use.
1877b3cff10cSYuri Pankov.El
1878b3cff10cSYuri Pankov.It Xo
1879b3cff10cSYuri Pankov.Nm
1880b3cff10cSYuri Pankov.Cm destroy
1881b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
1882b3cff10cSYuri Pankov.Xc
188378f17100SMatthew AhrensThe given bookmark is destroyed.
1884b3cff10cSYuri Pankov.It Xo
1885b3cff10cSYuri Pankov.Nm
1886b3cff10cSYuri Pankov.Cm snapshot
1887b3cff10cSYuri Pankov.Op Fl r
1888b3cff10cSYuri Pankov.Oo Fl o Ar property Ns = Ns value Oc Ns ...
1889b3cff10cSYuri Pankov.Ar filesystem Ns @ Ns Ar snapname Ns | Ns Ar volume Ns @ Ns Ar snapname Ns ...
1890b3cff10cSYuri Pankov.Xc
1891b3cff10cSYuri PankovCreates snapshots with the given names. All previous modifications by successful
1892b3cff10cSYuri Pankovsystem calls to the file system are part of the snapshots. Snapshots are taken
1893b3cff10cSYuri Pankovatomically, so that all snapshots correspond to the same moment in time. See the
1894b3cff10cSYuri Pankov.Sx Snapshots
1895b3cff10cSYuri Pankovsection for details.
1896b3cff10cSYuri Pankov.Bl -tag -width "-o"
1897b3cff10cSYuri Pankov.It Fl o Ar property Ns = Ns Ar value
1898b3cff10cSYuri PankovSets the specified property; see
1899b3cff10cSYuri Pankov.Nm zfs Cm create
1900b3cff10cSYuri Pankovfor details.
1901b3cff10cSYuri Pankov.It Fl r
19024445fffbSMatthew AhrensRecursively create snapshots of all descendent datasets
1903b3cff10cSYuri Pankov.El
1904b3cff10cSYuri Pankov.It Xo
1905b3cff10cSYuri Pankov.Nm
1906b3cff10cSYuri Pankov.Cm rollback
1907b3cff10cSYuri Pankov.Op Fl Rfr
1908b3cff10cSYuri Pankov.Ar snapshot
1909b3cff10cSYuri Pankov.Xc
1910c10c16deSRichard LoweRoll back the given dataset to a previous snapshot. When a dataset is rolled
1911b3cff10cSYuri Pankovback, all data that has changed since the snapshot is discarded, and the dataset
1912b3cff10cSYuri Pankovreverts to the state at the time of the snapshot. By default, the command
1913b3cff10cSYuri Pankovrefuses to roll back to a snapshot other than the most recent one. In order to
1914b3cff10cSYuri Pankovdo so, all intermediate snapshots and bookmarks must be destroyed by specifying
1915b3cff10cSYuri Pankovthe
1916b3cff10cSYuri Pankov.Fl r
1917b3cff10cSYuri Pankovoption.
1918b3cff10cSYuri Pankov.Pp
1919b3cff10cSYuri PankovThe
1920b3cff10cSYuri Pankov.Fl rR
1921b3cff10cSYuri Pankovoptions do not recursively destroy the child snapshots of a recursive snapshot.
1922b3cff10cSYuri PankovOnly direct snapshots of the specified filesystem are destroyed by either of
1923b3cff10cSYuri Pankovthese options. To completely roll back a recursive snapshot, you must rollback
1924b3cff10cSYuri Pankovthe individual child snapshots.
1925b3cff10cSYuri Pankov.Bl -tag -width "-R"
1926b3cff10cSYuri Pankov.It Fl R
192778f17100SMatthew AhrensDestroy any more recent snapshots and bookmarks, as well as any clones of those
1928c10c16deSRichard Lowesnapshots.
1929b3cff10cSYuri Pankov.It Fl f
1930b3cff10cSYuri PankovUsed with the
1931b3cff10cSYuri Pankov.Fl R
1932b3cff10cSYuri Pankovoption to force an unmount of any clone file systems that are to be destroyed.
1933b3cff10cSYuri Pankov.It Fl r
1934b3cff10cSYuri PankovDestroy any snapshots and bookmarks more recent than the one specified.
1935b3cff10cSYuri Pankov.El
1936b3cff10cSYuri Pankov.It Xo
1937b3cff10cSYuri Pankov.Nm
1938b3cff10cSYuri Pankov.Cm clone
1939b3cff10cSYuri Pankov.Op Fl p
1940b3cff10cSYuri Pankov.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
1941b3cff10cSYuri Pankov.Ar snapshot Ar filesystem Ns | Ns Ar volume
1942b3cff10cSYuri Pankov.Xc
1943b3cff10cSYuri PankovCreates a clone of the given snapshot. See the
1944b3cff10cSYuri Pankov.Sx Clones
1945b3cff10cSYuri Pankovsection for details. The target dataset can be located anywhere in the ZFS
1946b3cff10cSYuri Pankovhierarchy, and is created as the same type as the original.
1947b3cff10cSYuri Pankov.Bl -tag -width "-o"
1948b3cff10cSYuri Pankov.It Fl o Ar property Ns = Ns Ar value
1949b3cff10cSYuri PankovSets the specified property; see
1950b3cff10cSYuri Pankov.Nm zfs Cm create
1951b3cff10cSYuri Pankovfor details.
1952b3cff10cSYuri Pankov.It Fl p
1953c10c16deSRichard LoweCreates all the non-existing parent datasets. Datasets created in this manner
1954b3cff10cSYuri Pankovare automatically mounted according to the
1955b3cff10cSYuri Pankov.Sy mountpoint
1956b3cff10cSYuri Pankovproperty inherited from their parent. If the target filesystem or volume already
1957b3cff10cSYuri Pankovexists, the operation completes successfully.
1958b3cff10cSYuri Pankov.El
1959b3cff10cSYuri Pankov.It Xo
1960b3cff10cSYuri Pankov.Nm
1961b3cff10cSYuri Pankov.Cm promote
1962b3cff10cSYuri Pankov.Ar clone-filesystem
1963b3cff10cSYuri Pankov.Xc
1964b3cff10cSYuri PankovPromotes a clone file system to no longer be dependent on its
1965b3cff10cSYuri Pankov.Qq origin
1966c10c16deSRichard Lowesnapshot. This makes it possible to destroy the file system that the clone was
1967c10c16deSRichard Lowecreated from. The clone parent-child dependency relationship is reversed, so
1968c10c16deSRichard Lowethat the origin file system becomes a clone of the specified file system.
1969b3cff10cSYuri Pankov.Pp
1970c10c16deSRichard LoweThe snapshot that was cloned, and any snapshots previous to this snapshot, are
1971c10c16deSRichard Lowenow owned by the promoted clone. The space they use moves from the origin file
1972c10c16deSRichard Lowesystem to the promoted clone, so enough space must be available to accommodate
1973c10c16deSRichard Lowethese snapshots. No new space is consumed by this operation, but the space
1974c10c16deSRichard Loweaccounting is adjusted. The promoted clone must not have any conflicting
1975b3cff10cSYuri Pankovsnapshot names of its own. The
1976b3cff10cSYuri Pankov.Cm rename
1977b3cff10cSYuri Pankovsubcommand can be used to rename any conflicting snapshots.
1978b3cff10cSYuri Pankov.It Xo
1979b3cff10cSYuri Pankov.Nm
1980b3cff10cSYuri Pankov.Cm rename
1981b3cff10cSYuri Pankov.Op Fl f
1982b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
1983b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
1984c10c16deSRichard Lowe.br
1985b3cff10cSYuri Pankov.Nm
1986b3cff10cSYuri Pankov.Cm rename
1987b3cff10cSYuri Pankov.Op Fl fp
1988b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume
1989b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume
1990b3cff10cSYuri Pankov.Xc
1991b3cff10cSYuri PankovRenames the given dataset. The new target can be located anywhere in the ZFS
1992b3cff10cSYuri Pankovhierarchy, with the exception of snapshots. Snapshots can only be renamed within
1993b3cff10cSYuri Pankovthe parent file system or volume. When renaming a snapshot, the parent file
1994b3cff10cSYuri Pankovsystem of the snapshot does not need to be specified as part of the second
1995b3cff10cSYuri Pankovargument. Renamed file systems can inherit new mount points, in which case they
1996b3cff10cSYuri Pankovare unmounted and remounted at the new mount point.
1997b3cff10cSYuri Pankov.Bl -tag -width "-a"
1998b3cff10cSYuri Pankov.It Fl f
19996a9cb0eaSEric SchrockForce unmount any filesystems that need to be unmounted in the process.
2000b3cff10cSYuri Pankov.It Fl p
2001b3cff10cSYuri PankovCreates all the nonexistent parent datasets. Datasets created in this manner are
2002b3cff10cSYuri Pankovautomatically mounted according to the
2003b3cff10cSYuri Pankov.Sy mountpoint
2004b3cff10cSYuri Pankovproperty inherited from their parent.
2005b3cff10cSYuri Pankov.El
2006b3cff10cSYuri Pankov.It Xo
2007b3cff10cSYuri Pankov.Nm
2008b3cff10cSYuri Pankov.Cm rename
2009b3cff10cSYuri Pankov.Fl r
2010b3cff10cSYuri Pankov.Ar snapshot Ar snapshot
2011b3cff10cSYuri Pankov.Xc
2012c10c16deSRichard LoweRecursively rename the snapshots of all descendent datasets. Snapshots are the
2013c10c16deSRichard Loweonly dataset that can be renamed recursively.
2014b3cff10cSYuri Pankov.It Xo
2015b3cff10cSYuri Pankov.Nm
2016b3cff10cSYuri Pankov.Cm list
2017b3cff10cSYuri Pankov.Op Fl r Ns | Ns Fl d Ar depth
2018b3cff10cSYuri Pankov.Op Fl Hp
2019b3cff10cSYuri Pankov.Oo Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... Oc
2020b3cff10cSYuri Pankov.Oo Fl s Ar property Oc Ns ...
2021b3cff10cSYuri Pankov.Oo Fl S Ar property Oc Ns ...
2022b3cff10cSYuri Pankov.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2023b3cff10cSYuri Pankov.Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Oc Ns ...
2024b3cff10cSYuri Pankov.Xc
2025c10c16deSRichard LoweLists the property information for the given datasets in tabular form. If
2026c10c16deSRichard Lowespecified, you can list property information by the absolute pathname or the
2027c10c16deSRichard Lowerelative pathname. By default, all file systems and volumes are displayed.
2028b3cff10cSYuri PankovSnapshots are displayed if the
2029b3cff10cSYuri Pankov.Sy listsnaps
2030b3cff10cSYuri Pankovproperty is
2031b3cff10cSYuri Pankov.Sy on
2032b3cff10cSYuri Pankov.Po the default is
2033b3cff10cSYuri Pankov.Sy off
2034b3cff10cSYuri Pankov.Pc .
2035b3cff10cSYuri PankovThe following fields are displayed,
2036b3cff10cSYuri Pankov.Sy name Ns , Ns Sy used Ns , Ns Sy available Ns , Ns Sy referenced Ns , Ns
2037b3cff10cSYuri Pankov.Sy mountpoint .
2038b3cff10cSYuri Pankov.Bl -tag -width "-H"
2039b3cff10cSYuri Pankov.It Fl H
2040c10c16deSRichard LoweUsed for scripting mode. Do not print headers and separate fields by a single
2041c10c16deSRichard Lowetab instead of arbitrary white space.
2042b3cff10cSYuri Pankov.It Fl S Ar property
2043b3cff10cSYuri PankovSame as the
2044b3cff10cSYuri Pankov.Fl s
2045b3cff10cSYuri Pankovoption, but sorts by property in descending order.
2046b3cff10cSYuri Pankov.It Fl d Ar depth
2047c10c16deSRichard LoweRecursively display any children of the dataset, limiting the recursion to
2048b3cff10cSYuri Pankov.It Fl o Ar property
2049c10c16deSRichard LoweA comma-separated list of properties to display. The property must be:
2050b3cff10cSYuri Pankov.Bl -bullet
2051b3cff10cSYuri Pankov.It
2052b3cff10cSYuri PankovOne of the properties described in the
2053b3cff10cSYuri Pankov.Sx Native Properties
2054b3cff10cSYuri Pankovsection
2055b3cff10cSYuri Pankov.It
2056c10c16deSRichard LoweA user property
2057b3cff10cSYuri Pankov.It
2058b3cff10cSYuri PankovThe value
2059b3cff10cSYuri Pankov.Sy name
2060b3cff10cSYuri Pankovto display the dataset name
2061b3cff10cSYuri Pankov.It
2062b3cff10cSYuri PankovThe value
2063b3cff10cSYuri Pankov.Sy space
2064b3cff10cSYuri Pankovto display space usage properties on file systems and volumes. This is a
2065b3cff10cSYuri Pankovshortcut for specifying
2066b3cff10cSYuri Pankov.Fl o Sy name Ns , Ns Sy avail Ns , Ns Sy used Ns , Ns Sy usedsnap Ns , Ns
2067b3cff10cSYuri Pankov.Sy usedds Ns , Ns Sy usedrefreserv Ns , Ns Sy usedchild Fl t
2068b3cff10cSYuri Pankov.Sy filesystem Ns , Ns Sy volume
2069b3cff10cSYuri Pankovsyntax.
2070b3cff10cSYuri Pankov.El
2071b3cff10cSYuri Pankov.It Fl p
2072b3cff10cSYuri PankovDisplay numbers in parsable
2073b3cff10cSYuri Pankov.Pq exact
2074b3cff10cSYuri Pankovvalues.
2075b3cff10cSYuri Pankov.It Fl r
2076b3cff10cSYuri PankovRecursively display any children of the dataset on the command line.
2077b3cff10cSYuri Pankov.Ar depth .
2078b3cff10cSYuri PankovA depth of
2079b3cff10cSYuri Pankov.Sy 1
2080b3cff10cSYuri Pankovwill display only the dataset and its direct children.
2081b3cff10cSYuri Pankov.It Fl s Ar property
2082c10c16deSRichard LoweA property for sorting the output by column in ascending order based on the
2083c10c16deSRichard Lowevalue of the property. The property must be one of the properties described in
2084b3cff10cSYuri Pankovthe
2085b3cff10cSYuri Pankov.Sx Properties
2086b3cff10cSYuri Pankovsection, or the special value
2087b3cff10cSYuri Pankov.Sy name
2088b3cff10cSYuri Pankovto sort by the dataset name. Multiple properties can be specified at one time
2089b3cff10cSYuri Pankovusing multiple
2090b3cff10cSYuri Pankov.Fl s
2091b3cff10cSYuri Pankovproperty options. Multiple
2092b3cff10cSYuri Pankov.Fl s
2093b3cff10cSYuri Pankovoptions are evaluated from left to right in decreasing order of importance. The
2094b3cff10cSYuri Pankovfollowing is a list of sorting criteria:
2095b3cff10cSYuri Pankov.Bl -bullet
2096b3cff10cSYuri Pankov.It
2097c10c16deSRichard LoweNumeric types sort in numeric order.
2098b3cff10cSYuri Pankov.It
2099c10c16deSRichard LoweString types sort in alphabetical order.
2100b3cff10cSYuri Pankov.It
2101b3cff10cSYuri PankovTypes inappropriate for a row sort that row to the literal bottom, regardless of
2102b3cff10cSYuri Pankovthe specified ordering.
2103b3cff10cSYuri Pankov.El
2104b3cff10cSYuri Pankov.Pp
2105b3cff10cSYuri PankovIf no sorting options are specified the existing behavior of
2106b3cff10cSYuri Pankov.Nm zfs Cm list
2107b3cff10cSYuri Pankovis preserved.
2108b3cff10cSYuri Pankov.It Fl t Ar type
2109b3cff10cSYuri PankovA comma-separated list of types to display, where
2110b3cff10cSYuri Pankov.Ar type
2111b3cff10cSYuri Pankovis one of
2112b3cff10cSYuri Pankov.Sy filesystem ,
2113b3cff10cSYuri Pankov.Sy snapshot ,
2114b3cff10cSYuri Pankov.Sy volume ,
2115b3cff10cSYuri Pankov.Sy bookmark ,
2116b3cff10cSYuri Pankovor
2117b3cff10cSYuri Pankov.Sy all .
2118b3cff10cSYuri PankovFor example, specifying
2119b3cff10cSYuri Pankov.Fl t Sy snapshot
2120b3cff10cSYuri Pankovdisplays only snapshots.
2121b3cff10cSYuri Pankov.El
2122b3cff10cSYuri Pankov.It Xo
2123b3cff10cSYuri Pankov.Nm
2124b3cff10cSYuri Pankov.Cm set
2125b3cff10cSYuri Pankov.Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ...
2126b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2127b3cff10cSYuri Pankov.Xc
212830925561SChris WilliamsonSets the property or list of properties to the given value(s) for each dataset.
2129b3cff10cSYuri PankovOnly some properties can be edited. See the
2130b3cff10cSYuri Pankov.Sx Properties
2131b3cff10cSYuri Pankovsection for more information on what properties can be set and acceptable
2132b3cff10cSYuri Pankovvalues. Numeric values can be specified as exact values, or in a human-readable
2133b3cff10cSYuri Pankovform with a suffix of
2134b3cff10cSYuri Pankov.Sy B , K , M , G , T , P , E , Z
2135b3cff10cSYuri Pankov.Po for bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes,
2136b3cff10cSYuri Pankovor zettabytes, respectively
2137b3cff10cSYuri Pankov.Pc .
2138b3cff10cSYuri PankovUser properties can be set on snapshots. For more information, see the
2139b3cff10cSYuri Pankov.Sx User Properties
2140b3cff10cSYuri Pankovsection.
2141b3cff10cSYuri Pankov.It Xo
2142b3cff10cSYuri Pankov.Nm
2143b3cff10cSYuri Pankov.Cm get
2144b3cff10cSYuri Pankov.Op Fl r Ns | Ns Fl d Ar depth
2145b3cff10cSYuri Pankov.Op Fl Hp
2146b3cff10cSYuri Pankov.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2147b3cff10cSYuri Pankov.Oo Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... Oc
2148b3cff10cSYuri Pankov.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2149b3cff10cSYuri Pankov.Cm all | Ar property Ns Oo , Ns Ar property Oc Ns ...
2150fbc66171SMarcel Telka.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns | Ns Ar bookmark Ns ...
2151b3cff10cSYuri Pankov.Xc
2152c10c16deSRichard LoweDisplays properties for the given datasets. If no datasets are specified, then
2153c10c16deSRichard Lowethe command displays properties for all datasets on the system. For each
2154c10c16deSRichard Loweproperty, the following columns are displayed:
2155b3cff10cSYuri Pankov.Bd -literal
2156c10c16deSRichard Lowe    name      Dataset name
2157c10c16deSRichard Lowe    property  Property name
2158c10c16deSRichard Lowe    value     Property value
2159c10c16deSRichard Lowe    source    Property source. Can either be local, default,
2160b3cff10cSYuri Pankov              temporary, inherited, or none (-).
2161b3cff10cSYuri Pankov.Ed
2162b3cff10cSYuri Pankov.Pp
2163b3cff10cSYuri PankovAll columns are displayed by default, though this can be controlled by using the
2164b3cff10cSYuri Pankov.Fl o
2165b3cff10cSYuri Pankovoption. This command takes a comma-separated list of properties as described in
2166b3cff10cSYuri Pankovthe
2167b3cff10cSYuri Pankov.Sx Native Properties
2168b3cff10cSYuri Pankovand
2169b3cff10cSYuri Pankov.Sx User Properties
2170b3cff10cSYuri Pankovsections.
2171b3cff10cSYuri Pankov.Pp
2172b3cff10cSYuri PankovThe special value
2173b3cff10cSYuri Pankov.Sy all
2174b3cff10cSYuri Pankovcan be used to display all properties that apply to the given dataset's type
2175b3cff10cSYuri Pankov.Pq filesystem, volume, snapshot, or bookmark .
2176b3cff10cSYuri Pankov.Bl -tag -width "-H"
2177b3cff10cSYuri Pankov.It Fl H
2178b3cff10cSYuri PankovDisplay output in a form more easily parsed by scripts. Any headers are omitted,
2179b3cff10cSYuri Pankovand fields are explicitly separated by a single tab instead of an arbitrary
2180b3cff10cSYuri Pankovamount of space.
2181b3cff10cSYuri Pankov.It Fl d Ar depth
2182c10c16deSRichard LoweRecursively display any children of the dataset, limiting the recursion to
2183b3cff10cSYuri Pankov.Ar depth .
2184b3cff10cSYuri PankovA depth of
2185b3cff10cSYuri Pankov.Sy 1
2186b3cff10cSYuri Pankovwill display only the dataset and its direct children.
2187b3cff10cSYuri Pankov.It Fl o Ar field
2188b3cff10cSYuri PankovA comma-separated list of columns to display.
2189b3cff10cSYuri Pankov.Sy name Ns , Ns Sy property Ns , Ns Sy value Ns , Ns Sy source
2190c10c16deSRichard Loweis the default value.
2191b3cff10cSYuri Pankov.It Fl p
2192b3cff10cSYuri PankovDisplay numbers in parsable
2193b3cff10cSYuri Pankov.Pq exact
2194b3cff10cSYuri Pankovvalues.
2195b3cff10cSYuri Pankov.It Fl r
2196b3cff10cSYuri PankovRecursively display properties for any children.
2197b3cff10cSYuri Pankov.It Fl s Ar source
2198c10c16deSRichard LoweA comma-separated list of sources to display. Those properties coming from a
2199b3cff10cSYuri Pankovsource other than those in this list are ignored. Each source must be one of the
2200b3cff10cSYuri Pankovfollowing:
2201b3cff10cSYuri Pankov.Sy local ,
2202b3cff10cSYuri Pankov.Sy default ,
2203b3cff10cSYuri Pankov.Sy inherited ,
2204b3cff10cSYuri Pankov.Sy temporary ,
2205b3cff10cSYuri Pankovand
2206b3cff10cSYuri Pankov.Sy none .
2207b3cff10cSYuri PankovThe default value is all sources.
2208b3cff10cSYuri Pankov.It Fl t Ar type
2209b3cff10cSYuri PankovA comma-separated list of types to display, where
2210b3cff10cSYuri Pankov.Ar type
2211b3cff10cSYuri Pankovis one of
2212b3cff10cSYuri Pankov.Sy filesystem ,
2213b3cff10cSYuri Pankov.Sy snapshot ,
2214b3cff10cSYuri Pankov.Sy volume ,
2215b3cff10cSYuri Pankov.Sy bookmark ,
2216b3cff10cSYuri Pankovor
2217b3cff10cSYuri Pankov.Sy all .
2218b3cff10cSYuri Pankov.El
2219b3cff10cSYuri Pankov.It Xo
2220b3cff10cSYuri Pankov.Nm
2221b3cff10cSYuri Pankov.Cm inherit
2222b3cff10cSYuri Pankov.Op Fl rS
2223b3cff10cSYuri Pankov.Ar property Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
2224b3cff10cSYuri Pankov.Xc
22255ff8cfa9SPaul B. HensonClears the specified property, causing it to be inherited from an ancestor,
2226b3cff10cSYuri Pankovrestored to default if no ancestor has the property set, or with the
2227b3cff10cSYuri Pankov.Fl S
2228b3cff10cSYuri Pankovoption reverted to the received value if one exists. See the
2229b3cff10cSYuri Pankov.Sx Properties
22305ff8cfa9SPaul B. Hensonsection for a listing of default values, and details on which properties can be
22315ff8cfa9SPaul B. Hensoninherited.
2232b3cff10cSYuri Pankov.Bl -tag -width "-r"
2233b3cff10cSYuri Pankov.It Fl r
2234c10c16deSRichard LoweRecursively inherit the given property for all children.
2235b3cff10cSYuri Pankov.It Fl S
22365ff8cfa9SPaul B. HensonRevert the property to the received value if one exists; otherwise operate as
2237b3cff10cSYuri Pankovif the
2238b3cff10cSYuri Pankov.Fl S
2239b3cff10cSYuri Pankovoption was not specified.
2240b3cff10cSYuri Pankov.El
2241b3cff10cSYuri Pankov.It Xo
2242b3cff10cSYuri Pankov.Nm
2243b3cff10cSYuri Pankov.Cm upgrade
2244b3cff10cSYuri Pankov.Xc
2245c10c16deSRichard LoweDisplays a list of file systems that are not the most recent version.
2246b3cff10cSYuri Pankov.It Xo
2247b3cff10cSYuri Pankov.Nm
2248b3cff10cSYuri Pankov.Cm upgrade
2249b3cff10cSYuri Pankov.Fl v
2250b3cff10cSYuri Pankov.Xc
2251b3cff10cSYuri PankovDisplays a list of currently supported file system versions.
2252b3cff10cSYuri Pankov.It Xo
2253b3cff10cSYuri Pankov.Nm
2254b3cff10cSYuri Pankov.Cm upgrade
2255b3cff10cSYuri Pankov.Op Fl r
2256b3cff10cSYuri Pankov.Op Fl V Ar version
2257b3cff10cSYuri Pankov.Fl a | Ar filesystem
2258b3cff10cSYuri Pankov.Xc
2259c10c16deSRichard LoweUpgrades file systems to a new on-disk version. Once this is done, the file
2260c10c16deSRichard Lowesystems will no longer be accessible on systems running older versions of the
2261b3cff10cSYuri Pankovsoftware.
2262b3cff10cSYuri Pankov.Nm zfs Cm send
2263b3cff10cSYuri Pankovstreams generated from new snapshots of these file systems cannot be accessed on
2264b3cff10cSYuri Pankovsystems running older versions of the software.
2265b3cff10cSYuri Pankov.Pp
2266c10c16deSRichard LoweIn general, the file system version is independent of the pool version. See
2267b3cff10cSYuri Pankov.Xr zpool 1M
2268b3cff10cSYuri Pankovfor information on the
2269b3cff10cSYuri Pankov.Nm zpool Cm upgrade
2270b3cff10cSYuri Pankovcommand.
2271b3cff10cSYuri Pankov.Pp
2272b3cff10cSYuri PankovIn some cases, the file system version and the pool version are interrelated and
2273b3cff10cSYuri Pankovthe pool version must be upgraded before the file system version can be upgraded.
2274b3cff10cSYuri Pankov.Bl -tag -width "-V"
2275b3cff10cSYuri Pankov.It Fl V Ar version
2276b3cff10cSYuri PankovUpgrade to the specified
2277b3cff10cSYuri Pankov.Ar version .
2278b3cff10cSYuri PankovIf the
2279b3cff10cSYuri Pankov.Fl V
2280b3cff10cSYuri Pankovflag is not specified, this command upgrades to the most recent version. This
2281b3cff10cSYuri Pankovoption can only be used to increase the version number, and only up to the most
2282b3cff10cSYuri Pankovrecent version supported by this software.
2283b3cff10cSYuri Pankov.It Fl a
2284c10c16deSRichard LoweUpgrade all file systems on all imported pools.
2285b3cff10cSYuri Pankov.It Ar filesystem
2286c10c16deSRichard LoweUpgrade the specified file system.
2287b3cff10cSYuri Pankov.It Fl r
2288b3cff10cSYuri PankovUpgrade the specified file system and all descendent file systems.
2289b3cff10cSYuri Pankov.El
2290b3cff10cSYuri Pankov.It Xo
2291b3cff10cSYuri Pankov.Nm
2292b3cff10cSYuri Pankov.Cm userspace
2293b3cff10cSYuri Pankov.Op Fl Hinp
2294b3cff10cSYuri Pankov.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2295b3cff10cSYuri Pankov.Oo Fl s Ar field Oc Ns ...
2296b3cff10cSYuri Pankov.Oo Fl S Ar field Oc Ns ...
2297b3cff10cSYuri Pankov.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2298b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar snapshot
2299b3cff10cSYuri Pankov.Xc
2300b3cff10cSYuri PankovDisplays space consumed by, and quotas on, each user in the specified filesystem
2301b3cff10cSYuri Pankovor snapshot. This corresponds to the
2302b3cff10cSYuri Pankov.Sy userused@ Ns Em user
2303b3cff10cSYuri Pankovand
2304b3cff10cSYuri Pankov.Sy userquota@ Ns Em user
2305b3cff10cSYuri Pankovproperties.
2306b3cff10cSYuri Pankov.Bl -tag -width "-H"
2307b3cff10cSYuri Pankov.It Fl H
2308c10c16deSRichard LoweDo not print headers, use tab-delimited output.
2309b3cff10cSYuri Pankov.It Fl S Ar field
2310b3cff10cSYuri PankovSort by this field in reverse order. See
2311b3cff10cSYuri Pankov.Fl s .
2312b3cff10cSYuri Pankov.It Fl i
2313c10c16deSRichard LoweTranslate SID to POSIX ID. The POSIX ID may be ephemeral if no mapping exists.
2314b3cff10cSYuri PankovNormal POSIX interfaces
2315b3cff10cSYuri Pankov.Po for example,
2316b3cff10cSYuri Pankov.Xr stat 2 ,
2317b3cff10cSYuri Pankov.Nm ls Fl l
2318b3cff10cSYuri Pankov.Pc
2319b3cff10cSYuri Pankovperform this translation, so the
2320b3cff10cSYuri Pankov.Fl i
2321b3cff10cSYuri Pankovoption allows the output from
2322b3cff10cSYuri Pankov.Nm zfs Cm userspace
2323b3cff10cSYuri Pankovto be compared directly with those utilities. However,
2324b3cff10cSYuri Pankov.Fl i
2325c10c16deSRichard Lowemay lead to confusion if some files were created by an SMB user before a
2326b3cff10cSYuri PankovSMB-to-POSIX name mapping was established. In such a case, some files will be
2327b3cff10cSYuri Pankovowned by the SMB entity and some by the POSIX entity. However, the
2328b3cff10cSYuri Pankov.Fl i
2329b3cff10cSYuri Pankovoption will report that the POSIX entity has the total usage and quota for both.
2330b3cff10cSYuri Pankov.It Fl n
2331b3cff10cSYuri PankovPrint numeric ID instead of user/group name.
2332b3cff10cSYuri Pankov.It Fl o Ar field Ns Oo , Ns Ar field Oc Ns ...
2333b3cff10cSYuri PankovDisplay only the specified fields from the following set:
2334b3cff10cSYuri Pankov.Sy type ,
2335b3cff10cSYuri Pankov.Sy name ,
2336b3cff10cSYuri Pankov.Sy used ,
2337b3cff10cSYuri Pankov.Sy quota .
2338b3cff10cSYuri PankovThe default is to display all fields.
2339b3cff10cSYuri Pankov.It Fl p
2340b3cff10cSYuri PankovUse exact
2341b3cff10cSYuri Pankov.Pq parsable
2342b3cff10cSYuri Pankovnumeric output.
2343b3cff10cSYuri Pankov.It Fl s Ar field
2344b3cff10cSYuri PankovSort output by this field. The
2345b3cff10cSYuri Pankov.Fl s
2346b3cff10cSYuri Pankovand
2347b3cff10cSYuri Pankov.Fl S
2348b3cff10cSYuri Pankovflags may be specified multiple times to sort first by one field, then by
2349b3cff10cSYuri Pankovanother. The default is
2350b3cff10cSYuri Pankov.Fl s Sy type Fl s Sy name .
2351b3cff10cSYuri Pankov.It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ...
2352b3cff10cSYuri PankovPrint only the specified types from the following set:
2353b3cff10cSYuri Pankov.Sy all ,
2354b3cff10cSYuri Pankov.Sy posixuser ,
2355b3cff10cSYuri Pankov.Sy smbuser ,
2356b3cff10cSYuri Pankov.Sy posixgroup ,
2357b3cff10cSYuri Pankov.Sy smbgroup .
2358b3cff10cSYuri PankovThe default is
2359b3cff10cSYuri Pankov.Fl t Sy posixuser Ns , Ns Sy smbuser .
2360b3cff10cSYuri PankovThe default can be changed to include group types.
2361b3cff10cSYuri Pankov.El
2362b3cff10cSYuri Pankov.It Xo
2363b3cff10cSYuri Pankov.Nm
2364b3cff10cSYuri Pankov.Cm groupspace
2365b3cff10cSYuri Pankov.Op Fl Hinp
2366b3cff10cSYuri Pankov.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
2367b3cff10cSYuri Pankov.Oo Fl s Ar field Oc Ns ...
2368b3cff10cSYuri Pankov.Oo Fl S Ar field Oc Ns ...
2369b3cff10cSYuri Pankov.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
2370b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar snapshot
2371b3cff10cSYuri Pankov.Xc
2372c10c16deSRichard LoweDisplays space consumed by, and quotas on, each group in the specified
2373b3cff10cSYuri Pankovfilesystem or snapshot. This subcommand is identical to
2374b3cff10cSYuri Pankov.Nm zfs Cm userspace ,
2375b3cff10cSYuri Pankovexcept that the default types to display are
2376b3cff10cSYuri Pankov.Fl t Sy posixgroup Ns , Ns Sy smbgroup .
2377b3cff10cSYuri Pankov.It Xo
2378b3cff10cSYuri Pankov.Nm
2379b3cff10cSYuri Pankov.Cm mount
2380b3cff10cSYuri Pankov.Xc
2381b3cff10cSYuri PankovDisplays all ZFS file systems currently mounted.
2382b3cff10cSYuri Pankov.It Xo
2383b3cff10cSYuri Pankov.Nm
2384b3cff10cSYuri Pankov.Cm mount
2385b3cff10cSYuri Pankov.Op Fl Ov
2386b3cff10cSYuri Pankov.Op Fl o Ar options
2387b3cff10cSYuri Pankov.Fl a | Ar filesystem
2388b3cff10cSYuri Pankov.Xc
2389b3cff10cSYuri PankovMounts ZFS file systems.
2390b3cff10cSYuri Pankov.Bl -tag -width "-O"
2391b3cff10cSYuri Pankov.It Fl O
2392b3cff10cSYuri PankovPerform an overlay mount. See
2393b3cff10cSYuri Pankov.Xr mount 1M
2394b3cff10cSYuri Pankovfor more information.
2395b3cff10cSYuri Pankov.It Fl a
2396b3cff10cSYuri PankovMount all available ZFS file systems. Invoked automatically as part of the boot
2397c10c16deSRichard Loweprocess.
2398b3cff10cSYuri Pankov.It Ar filesystem
2399c10c16deSRichard LoweMount the specified filesystem.
2400b3cff10cSYuri Pankov.It Fl o Ar options
2401b3cff10cSYuri PankovAn optional, comma-separated list of mount options to use temporarily for the
2402b3cff10cSYuri Pankovduration of the mount. See the
2403b3cff10cSYuri Pankov.Sx Temporary Mount Point Properties
2404b3cff10cSYuri Pankovsection for details.
2405b3cff10cSYuri Pankov.It Fl v
2406b3cff10cSYuri PankovReport mount progress.
2407b3cff10cSYuri Pankov.El
2408b3cff10cSYuri Pankov.It Xo
2409b3cff10cSYuri Pankov.Nm
2410b3cff10cSYuri Pankov.Cm unmount
2411b3cff10cSYuri Pankov.Op Fl f
2412b3cff10cSYuri Pankov.Fl a | Ar filesystem Ns | Ns Ar mountpoint
2413b3cff10cSYuri Pankov.Xc
2414b3cff10cSYuri PankovUnmounts currently mounted ZFS file systems.
2415b3cff10cSYuri Pankov.Bl -tag -width "-a"
2416b3cff10cSYuri Pankov.It Fl a
2417b3cff10cSYuri PankovUnmount all available ZFS file systems. Invoked automatically as part of the
2418b3cff10cSYuri Pankovshutdown process.
2419b3cff10cSYuri Pankov.It Ar filesystem Ns | Ns Ar mountpoint
2420b3cff10cSYuri PankovUnmount the specified filesystem. The command can also be given a path to a ZFS
2421b3cff10cSYuri Pankovfile system mount point on the system.
2422b3cff10cSYuri Pankov.It Fl f
2423c10c16deSRichard LoweForcefully unmount the file system, even if it is currently in use.
2424b3cff10cSYuri Pankov.El
2425b3cff10cSYuri Pankov.It Xo
2426b3cff10cSYuri Pankov.Nm
2427b3cff10cSYuri Pankov.Cm share
2428b3cff10cSYuri Pankov.Fl a | Ar filesystem
2429b3cff10cSYuri Pankov.Xc
2430b3cff10cSYuri PankovShares available ZFS file systems.
2431b3cff10cSYuri Pankov.Bl -tag -width "-a"
2432b3cff10cSYuri Pankov.It Fl a
2433b3cff10cSYuri PankovShare all available ZFS file systems. Invoked automatically as part of the boot
2434b3cff10cSYuri Pankovprocess.
2435b3cff10cSYuri Pankov.It Ar filesystem
2436b3cff10cSYuri PankovShare the specified filesystem according to the
2437b3cff10cSYuri Pankov.Sy sharenfs
2438b3cff10cSYuri Pankovand
2439b3cff10cSYuri Pankov.Sy sharesmb
2440b3cff10cSYuri Pankovproperties. File systems are shared when the
2441b3cff10cSYuri Pankov.Sy sharenfs
2442b3cff10cSYuri Pankovor
2443b3cff10cSYuri Pankov.Sy sharesmb
2444b3cff10cSYuri Pankovproperty is set.
2445b3cff10cSYuri Pankov.El
2446b3cff10cSYuri Pankov.It Xo
2447b3cff10cSYuri Pankov.Nm
2448b3cff10cSYuri Pankov.Cm unshare
2449b3cff10cSYuri Pankov.Fl a | Ar filesystem Ns | Ns Ar mountpoint
2450b3cff10cSYuri Pankov.Xc
2451b3cff10cSYuri PankovUnshares currently shared ZFS file systems.
2452b3cff10cSYuri Pankov.Bl -tag -width "-a"
2453b3cff10cSYuri Pankov.It Fl a
2454b3cff10cSYuri PankovUnshare all available ZFS file systems. Invoked automatically as part of the
2455b3cff10cSYuri Pankovshutdown process.
2456b3cff10cSYuri Pankov.It Ar filesystem Ns | Ns Ar mountpoint
2457b3cff10cSYuri PankovUnshare the specified filesystem. The command can also be given a path to a ZFS
2458b3cff10cSYuri Pankovfile system shared on the system.
2459b3cff10cSYuri Pankov.El
2460b3cff10cSYuri Pankov.It Xo
2461b3cff10cSYuri Pankov.Nm
2462b3cff10cSYuri Pankov.Cm bookmark
2463b3cff10cSYuri Pankov.Ar snapshot bookmark
2464b3cff10cSYuri Pankov.Xc
2465b3cff10cSYuri PankovCreates a bookmark of the given snapshot. Bookmarks mark the point in time when
2466b3cff10cSYuri Pankovthe snapshot was created, and can be used as the incremental source for a
2467b3cff10cSYuri Pankov.Nm zfs Cm send
2468b3cff10cSYuri Pankovcommand.
2469b3cff10cSYuri Pankov.Pp
2470b3cff10cSYuri PankovThis feature must be enabled to be used. See
2471b3cff10cSYuri Pankov.Xr zpool-features 5
2472b3cff10cSYuri Pankovfor details on ZFS feature flags and the
2473b3cff10cSYuri Pankov.Sy bookmarks
2474b3cff10cSYuri Pankovfeature.
2475b3cff10cSYuri Pankov.It Xo
2476b3cff10cSYuri Pankov.Nm
2477b3cff10cSYuri Pankov.Cm send
2478b3cff10cSYuri Pankov.Op Fl DLPRenpv
2479b3cff10cSYuri Pankov.Op Oo Fl I Ns | Ns Fl i Oc Ar snapshot
2480b3cff10cSYuri Pankov.Ar snapshot
2481b3cff10cSYuri Pankov.Xc
2482b3cff10cSYuri PankovCreates a stream representation of the second
2483b3cff10cSYuri Pankov.Ar snapshot ,
2484b3cff10cSYuri Pankovwhich is written to standard output. The output can be redirected to a file or
2485b3cff10cSYuri Pankovto a different system
2486b3cff10cSYuri Pankov.Po for example, using
2487b3cff10cSYuri Pankov.Xr ssh 1
2488b3cff10cSYuri Pankov.Pc .
2489b3cff10cSYuri PankovBy default, a full stream is generated.
2490b3cff10cSYuri Pankov.Bl -tag -width "-D"
2491b3cff10cSYuri Pankov.It Fl D
2492b3cff10cSYuri PankovGenerate a deduplicated stream. Blocks which would have been sent multiple times
2493b3cff10cSYuri Pankovin the send stream will only be sent once. The receiving system must also
2494b3cff10cSYuri Pankovsupport this feature to recieve a deduplicated stream. This flag can be used
2495b3cff10cSYuri Pankovregardless of the dataset's
2496b3cff10cSYuri Pankov.Sy dedup
2497b3cff10cSYuri Pankovproperty, but performance will be much better if the filesystem uses a
2498b3cff10cSYuri Pankovdedup-capable checksum
2499b3cff10cSYuri Pankov.Po for example,
2500b3cff10cSYuri Pankov.Sy sha256
2501b3cff10cSYuri Pankov.Pc .
2502b3cff10cSYuri Pankov.It Fl I Ar snapshot
2503c10c16deSRichard LoweGenerate a stream package that sends all intermediary snapshots from the first
2504b3cff10cSYuri Pankovsnapshot to the second snapshot. For example,
2505b3cff10cSYuri Pankov.Fl I Em @a Em fs@d
2506b3cff10cSYuri Pankovis similar to
2507b3cff10cSYuri Pankov.Fl i Em @a Em fs@b Ns ; Fl i Em @b Em fs@c Ns ; Fl i Em @c Em fs@d .
2508b3cff10cSYuri PankovThe incremental source may be specified as with the
2509b3cff10cSYuri Pankov.Fl i
2510b3cff10cSYuri Pankovoption.
2511b3cff10cSYuri Pankov.It Fl L
2512b3cff10cSYuri PankovGenerate a stream which may contain blocks larger than 128KB. This flag has no
2513b3cff10cSYuri Pankoveffect if the
2514b3cff10cSYuri Pankov.Sy large_blocks
2515b3cff10cSYuri Pankovpool feature is disabled, or if the
2516b3cff10cSYuri Pankov.Sy recordsize
2517b3cff10cSYuri Pankovproperty of this filesystem has never been set above 128KB. The receiving system
2518b3cff10cSYuri Pankovmust have the
2519b3cff10cSYuri Pankov.Sy large_blocks
2520b3cff10cSYuri Pankovpool feature enabled as well. See
2521b3cff10cSYuri Pankov.Xr zpool-features 5
2522b3cff10cSYuri Pankovfor details on ZFS feature flags and the
2523b3cff10cSYuri Pankov.Sy large_blocks
2524b3cff10cSYuri Pankovfeature.
2525b3cff10cSYuri Pankov.It Fl P
2526b3cff10cSYuri PankovPrint machine-parsable verbose information about the stream package generated.
2527b3cff10cSYuri Pankov.It Fl R
2528c10c16deSRichard LoweGenerate a replication stream package, which will replicate the specified
2529c10c16deSRichard Lowefile system, and all descendent file systems, up to the named snapshot. When
2530c10c16deSRichard Lowereceived, all properties, snapshots, descendent file systems, and clones are
2531c10c16deSRichard Lowepreserved.
2532b3cff10cSYuri Pankov.Pp
2533b3cff10cSYuri PankovIf the
2534b3cff10cSYuri Pankov.Fl i
2535b3cff10cSYuri Pankovor
2536b3cff10cSYuri Pankov.Fl I
2537b3cff10cSYuri Pankovflags are used in conjunction with the
2538b3cff10cSYuri Pankov.Fl R
2539c10c16deSRichard Loweflag, an incremental replication stream is generated. The current values of
2540c10c16deSRichard Loweproperties, and current snapshot and file system names are set when the stream
2541b3cff10cSYuri Pankovis received. If the
2542b3cff10cSYuri Pankov.Fl F
2543b3cff10cSYuri Pankovflag is specified when this stream is received, snapshots and file systems that
2544b3cff10cSYuri Pankovdo not exist on the sending side are destroyed.
2545b3cff10cSYuri Pankov.It Fl e
2546b3cff10cSYuri PankovGenerate a more compact stream by using
2547b3cff10cSYuri Pankov.Sy WRITE_EMBEDDED
2548b3cff10cSYuri Pankovrecords for blocks which are stored more compactly on disk by the
2549b3cff10cSYuri Pankov.Sy embedded_data
2550b3cff10cSYuri Pankovpool feature. This flag has no effect if the
2551b3cff10cSYuri Pankov.Sy embedded_data
2552b3cff10cSYuri Pankovfeature is disabled. The receiving system must have the
2553b3cff10cSYuri Pankov.Sy embedded_data
2554b3cff10cSYuri Pankovfeature enabled. If the
2555b3cff10cSYuri Pankov.Sy lz4_compress
2556b3cff10cSYuri Pankovfeature is active on the sending system, then the receiving system must have
2557b3cff10cSYuri Pankovthat feature enabled as well. See
2558b3cff10cSYuri Pankov.Xr zpool-features 5
2559b3cff10cSYuri Pankovfor details on ZFS feature flags and the
2560b3cff10cSYuri Pankov.Sy embedded_data
2561b3cff10cSYuri Pankovfeature.
2562b3cff10cSYuri Pankov.It Fl i Ar snapshot
2563b3cff10cSYuri PankovGenerate an incremental stream from the first
2564b3cff10cSYuri Pankov.Ar snapshot
2565b3cff10cSYuri Pankov.Pq the incremental source
2566b3cff10cSYuri Pankovto the second
2567b3cff10cSYuri Pankov.Ar snapshot
2568b3cff10cSYuri Pankov.Pq the incremental target .
2569b3cff10cSYuri PankovThe incremental source can be specified as the last component of the snapshot
2570b3cff10cSYuri Pankovname
2571b3cff10cSYuri Pankov.Po the
2572b3cff10cSYuri Pankov.Sy @
2573b3cff10cSYuri Pankovcharacter and following
2574b3cff10cSYuri Pankov.Pc
2575b3cff10cSYuri Pankovand it is assumed to be from the same file system as the incremental target.
2576b3cff10cSYuri Pankov.Pp
2577b3cff10cSYuri PankovIf the destination is a clone, the source may be the origin snapshot, which must
2578b3cff10cSYuri Pankovbe fully specified
2579b3cff10cSYuri Pankov.Po for example,
2580b3cff10cSYuri Pankov.Em pool/fs@origin ,
2581b3cff10cSYuri Pankovnot just
2582b3cff10cSYuri Pankov.Em @origin
2583b3cff10cSYuri Pankov.Pc .
2584b3cff10cSYuri Pankov.It Fl n
2585b3cff10cSYuri PankovDo a dry-run
2586b3cff10cSYuri Pankov.Pq Qq No-op
2587b3cff10cSYuri Pankovsend. Do not generate any actual send data. This is useful in conjunction with
2588b3cff10cSYuri Pankovthe
2589b3cff10cSYuri Pankov.Fl v
2590b3cff10cSYuri Pankovor
2591b3cff10cSYuri Pankov.Fl P
2592b3cff10cSYuri Pankovflags to determine what data will be sent. In this case, the verbose output will
2593b3cff10cSYuri Pankovbe written to standard output
2594b3cff10cSYuri Pankov.Po contrast with a non-dry-run, where the stream is written to standard output
2595b3cff10cSYuri Pankovand the verbose output goes to standard error
2596b3cff10cSYuri Pankov.Pc .
2597b3cff10cSYuri Pankov.It Fl p
259819b94df9SMatthew AhrensInclude the dataset's properties in the stream. This flag is implicit when
2599b3cff10cSYuri Pankov.Fl R
2600b3cff10cSYuri Pankovis specified. The receiving system must also support this feature.
2601b3cff10cSYuri Pankov.It Fl v
26024e3c9f44SBill PijewskiPrint verbose information about the stream package generated. This information
26034e3c9f44SBill Pijewskiincludes a per-second report of how much data has been sent.
2604b3cff10cSYuri Pankov.Pp
2605c10c16deSRichard LoweThe format of the stream is committed. You will be able to receive your streams
2606b3cff10cSYuri Pankovon future versions of ZFS .
2607b3cff10cSYuri Pankov.El
2608b3cff10cSYuri Pankov.It Xo
2609b3cff10cSYuri Pankov.Nm
2610b3cff10cSYuri Pankov.Cm send
2611b3cff10cSYuri Pankov.Op Fl Le
2612b3cff10cSYuri Pankov.Op Fl i Ar snapshot Ns | Ns Ar bookmark
2613b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2614b3cff10cSYuri Pankov.Xc
2615b3cff10cSYuri PankovGenerate a send stream, which may be of a filesystem, and may be incremental
2616b3cff10cSYuri Pankovfrom a bookmark. If the destination is a filesystem or volume, the pool must be
2617b3cff10cSYuri Pankovread-only, or the filesystem must not be mounted. When the stream generated from
2618b3cff10cSYuri Pankova filesystem or volume is received, the default snapshot name will be
2619b3cff10cSYuri Pankov.Qq --head-- .
2620b3cff10cSYuri Pankov.Bl -tag -width "-L"
2621b3cff10cSYuri Pankov.It Fl L
2622b3cff10cSYuri PankovGenerate a stream which may contain blocks larger than 128KB. This flag has no
2623b3cff10cSYuri Pankoveffect if the
2624b3cff10cSYuri Pankov.Sy large_blocks
2625b3cff10cSYuri Pankovpool feature is disabled, or if the
2626b3cff10cSYuri Pankov.Sy recordsize
2627b3cff10cSYuri Pankovproperty of this filesystem has never been set above 128KB. The receiving system
2628b3cff10cSYuri Pankovmust have the
2629b3cff10cSYuri Pankov.Sy large_blocks
2630b3cff10cSYuri Pankovpool feature enabled as well. See
2631b3cff10cSYuri Pankov.Xr zpool-features 5
2632b3cff10cSYuri Pankovfor details on ZFS feature flags and the
2633b3cff10cSYuri Pankov.Sy large_blocks
2634b3cff10cSYuri Pankovfeature.
2635b3cff10cSYuri Pankov.It Fl e
2636b3cff10cSYuri PankovGenerate a more compact stream by using
2637b3cff10cSYuri Pankov.Sy WRITE_EMBEDDED
2638b3cff10cSYuri Pankovrecords for blocks which are stored more compactly on disk by the
2639b3cff10cSYuri Pankov.Sy embedded_data
2640b3cff10cSYuri Pankovpool feature. This flag has no effect if the
2641b3cff10cSYuri Pankov.Sy embedded_data
2642b3cff10cSYuri Pankovfeature is disabled. The receiving system must have the
2643b3cff10cSYuri Pankov.Sy embedded_data
2644b3cff10cSYuri Pankovfeature enabled. If the
2645b3cff10cSYuri Pankov.Sy lz4_compress
2646b3cff10cSYuri Pankovfeature is active on the sending system, then the receiving system must have
2647b3cff10cSYuri Pankovthat feature enabled as well. See
2648b3cff10cSYuri Pankov.Xr zpool-features 5
2649b3cff10cSYuri Pankovfor details on ZFS feature flags and the
2650b3cff10cSYuri Pankov.Sy embedded_data
2651b3cff10cSYuri Pankovfeature.
2652b3cff10cSYuri Pankov.It Fl i Ar snapshot Ns | Ns Ar bookmark
265378f17100SMatthew AhrensGenerate an incremental send stream. The incremental source must be an earlier
2654b3cff10cSYuri Pankovsnapshot in the destination's history. It will commonly be an earlier snapshot
2655b3cff10cSYuri Pankovin the destination's file system, in which case it can be specified as the last
2656b3cff10cSYuri Pankovcomponent of the name
2657b3cff10cSYuri Pankov.Po the
2658b3cff10cSYuri Pankov.Sy #
2659b3cff10cSYuri Pankovor
2660b3cff10cSYuri Pankov.Sy @
2661b3cff10cSYuri Pankovcharacter and following
2662b3cff10cSYuri Pankov.Pc .
2663b3cff10cSYuri Pankov.Pp
2664b3cff10cSYuri PankovIf the incremental target is a clone, the incremental source can be the origin
2665b3cff10cSYuri Pankovsnapshot, or an earlier snapshot in the origin's filesystem, or the origin's
2666b3cff10cSYuri Pankovorigin, etc.
2667b3cff10cSYuri Pankov.El
2668b3cff10cSYuri Pankov.It Xo
2669b3cff10cSYuri Pankov.Nm
26709c3fd121SMatthew Ahrens.Cm send
26719c3fd121SMatthew Ahrens.Op Fl Penv
26729c3fd121SMatthew Ahrens.Fl t
26739c3fd121SMatthew Ahrens.Ar receive_resume_token
26749c3fd121SMatthew Ahrens.Xc
26759c3fd121SMatthew AhrensCreates a send stream which resumes an interrupted receive.  The
26769c3fd121SMatthew Ahrens.Ar receive_resume_token
26779c3fd121SMatthew Ahrensis the value of this property on the filesystem
26789c3fd121SMatthew Ahrensor volume that was being received into.  See the documentation for
26799c3fd121SMatthew Ahrens.Sy zfs receive -s
26809c3fd121SMatthew Ahrensfor more details.
26819c3fd121SMatthew Ahrens.It Xo
26829c3fd121SMatthew Ahrens.Nm
2683b3cff10cSYuri Pankov.Cm receive
26849c3fd121SMatthew Ahrens.Op Fl Fnsuv
2685a2cdcdd2SPaul Dagnelie.Op Fl o Sy origin Ns = Ns Ar snapshot
2686b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot
2687c10c16deSRichard Lowe.br
2688b3cff10cSYuri Pankov.Nm
2689b3cff10cSYuri Pankov.Cm receive
26909c3fd121SMatthew Ahrens.Op Fl Fnsuv
2691b3cff10cSYuri Pankov.Op Fl d Ns | Ns Fl e
2692a2cdcdd2SPaul Dagnelie.Op Fl o Sy origin Ns = Ns Ar snapshot
2693b3cff10cSYuri Pankov.Ar filesystem
2694b3cff10cSYuri Pankov.Xc
2695c10c16deSRichard LoweCreates a snapshot whose contents are as specified in the stream provided on
2696c10c16deSRichard Lowestandard input. If a full stream is received, then a new file system is created
2697b3cff10cSYuri Pankovas well. Streams are created using the
2698b3cff10cSYuri Pankov.Nm zfs Cm send
2699b3cff10cSYuri Pankovsubcommand, which by default creates a full stream.
2700b3cff10cSYuri Pankov.Nm zfs Cm recv
2701b3cff10cSYuri Pankovcan be used as an alias for
2702b3cff10cSYuri Pankov.Nm zfs Cm receive.
2703b3cff10cSYuri Pankov.Pp
2704c10c16deSRichard LoweIf an incremental stream is received, then the destination file system must
2705c10c16deSRichard Lowealready exist, and its most recent snapshot must match the incremental stream's
2706b3cff10cSYuri Pankovsource. For
2707b3cff10cSYuri Pankov.Sy zvols ,
2708b3cff10cSYuri Pankovthe destination device link is destroyed and recreated, which means the
2709b3cff10cSYuri Pankov.Sy zvol
2710b3cff10cSYuri Pankovcannot be accessed during the
2711b3cff10cSYuri Pankov.Cm receive
2712b3cff10cSYuri Pankovoperation.
2713b3cff10cSYuri Pankov.Pp
2714c10c16deSRichard LoweWhen a snapshot replication package stream that is generated by using the
2715b3cff10cSYuri Pankov.Nm zfs Cm send Fl R
2716b3cff10cSYuri Pankovcommand is received, any snapshots that do not exist on the sending location are
2717b3cff10cSYuri Pankovdestroyed by using the
2718b3cff10cSYuri Pankov.Nm zfs Cm destroy Fl d
2719c10c16deSRichard Lowecommand.
2720b3cff10cSYuri Pankov.Pp
2721b3cff10cSYuri PankovThe name of the snapshot
2722b3cff10cSYuri Pankov.Pq and file system, if a full stream is received
2723b3cff10cSYuri Pankovthat this subcommand creates depends on the argument type and the use of the
2724b3cff10cSYuri Pankov.Fl d
2725b3cff10cSYuri Pankovor
2726b3cff10cSYuri Pankov.Fl e
2727b3cff10cSYuri Pankovoptions.
2728b3cff10cSYuri Pankov.Pp
2729b3cff10cSYuri PankovIf the argument is a snapshot name, the specified
2730b3cff10cSYuri Pankov.Ar snapshot
2731b3cff10cSYuri Pankovis created. If the argument is a file system or volume name, a snapshot with the
2732b3cff10cSYuri Pankovsame name as the sent snapshot is created within the specified
2733b3cff10cSYuri Pankov.Ar filesystem
2734b3cff10cSYuri Pankovor
2735b3cff10cSYuri Pankov.Ar volume .
2736b3cff10cSYuri PankovIf neither of the
2737b3cff10cSYuri Pankov.Fl d
2738b3cff10cSYuri Pankovor
2739b3cff10cSYuri Pankov.Fl e
2740b3cff10cSYuri Pankovoptions are specified, the provided target snapshot name is used exactly as
2741b3cff10cSYuri Pankovprovided.
2742b3cff10cSYuri Pankov.Pp
2743b3cff10cSYuri PankovThe
2744b3cff10cSYuri Pankov.Fl d
2745b3cff10cSYuri Pankovand
2746b3cff10cSYuri Pankov.Fl e
2747b3cff10cSYuri Pankovoptions cause the file system name of the target snapshot to be determined by
2748b3cff10cSYuri Pankovappending a portion of the sent snapshot's name to the specified target
2749b3cff10cSYuri Pankov.Ar filesystem .
2750b3cff10cSYuri PankovIf the
2751b3cff10cSYuri Pankov.Fl d
2752b3cff10cSYuri Pankovoption is specified, all but the first element of the sent snapshot's file
2753b3cff10cSYuri Pankovsystem path
2754b3cff10cSYuri Pankov.Pq usually the pool name
2755b3cff10cSYuri Pankovis used and any required intermediate file systems within the specified one are
2756b3cff10cSYuri Pankovcreated. If the
2757b3cff10cSYuri Pankov.Fl e
2758b3cff10cSYuri Pankovoption is specified, then only the last element of the sent snapshot's file
2759b3cff10cSYuri Pankovsystem name
2760b3cff10cSYuri Pankov.Pq i.e. the name of the source file system itself
2761b3cff10cSYuri Pankovis used as the target file system name.
2762b3cff10cSYuri Pankov.Bl -tag -width "-F"
2763b3cff10cSYuri Pankov.It Fl F
2764b3cff10cSYuri PankovForce a rollback of the file system to the most recent snapshot before
2765b3cff10cSYuri Pankovperforming the receive operation. If receiving an incremental replication stream
2766b3cff10cSYuri Pankov.Po for example, one generated by
2767b3cff10cSYuri Pankov.Nm zfs Cm send Fl R Op Fl i Ns | Ns Fl I
2768b3cff10cSYuri Pankov.Pc ,
2769b3cff10cSYuri Pankovdestroy snapshots and file systems that do not exist on the sending side.
2770b3cff10cSYuri Pankov.It Fl d
2771b3cff10cSYuri PankovDiscard the first element of the sent snapshot's file system name, using the
2772b3cff10cSYuri Pankovremaining elements to determine the name of the target file system for the new
2773b3cff10cSYuri Pankovsnapshot as described in the paragraph above.
2774b3cff10cSYuri Pankov.It Fl e
2775b3cff10cSYuri PankovDiscard all but the last element of the sent snapshot's file system name, using
2776b3cff10cSYuri Pankovthat element to determine the name of the target file system for the new
2777b3cff10cSYuri Pankovsnapshot as described in the paragraph above.
2778b3cff10cSYuri Pankov.It Fl n
2779b3cff10cSYuri PankovDo not actually receive the stream. This can be useful in conjunction with the
2780b3cff10cSYuri Pankov.Fl v
2781b3cff10cSYuri Pankovoption to verify the name the receive operation would use.
2782a2cdcdd2SPaul Dagnelie.It Fl o Sy origin Ns = Ns Ar snapshot
2783a2cdcdd2SPaul DagnelieForces the stream to be received as a clone of the given snapshot.
278468ecb2ecSPaul DagnelieIf the stream is a full send stream, this will create the filesystem
278568ecb2ecSPaul Dagneliedescribed by the stream as a clone of the specified snapshot. Which
278668ecb2ecSPaul Dagneliesnapshot was specified will not affect the success or failure of the
278768ecb2ecSPaul Dagneliereceive, as long as the snapshot does exist.  If the stream is an
278868ecb2ecSPaul Dagnelieincremental send stream, all the normal verification will be performed.
2789b3cff10cSYuri Pankov.It Fl u
2790c10c16deSRichard LoweFile system that is associated with the received stream is not mounted.
2791b3cff10cSYuri Pankov.It Fl v
2792c10c16deSRichard LowePrint verbose information about the stream and the time required to perform the
2793c10c16deSRichard Lowereceive operation.
27949c3fd121SMatthew Ahrens.It Fl s
27959c3fd121SMatthew AhrensIf the receive is interrupted, save the partially received state, rather
27969c3fd121SMatthew Ahrensthan deleting it.  Interruption may be due to premature termination of
27979c3fd121SMatthew Ahrensthe stream
27989c3fd121SMatthew Ahrens.Po e.g. due to network failure or failure of the remote system
27999c3fd121SMatthew Ahrensif the stream is being read over a network connection
28009c3fd121SMatthew Ahrens.Pc ,
28019c3fd121SMatthew Ahrensa checksum error in the stream, termination of the
28029c3fd121SMatthew Ahrens.Nm zfs Cm receive
28039c3fd121SMatthew Ahrensprocess, or unclean shutdown of the system.
28049c3fd121SMatthew Ahrens.Pp
28059c3fd121SMatthew AhrensThe receive can be resumed with a stream generated by
28069c3fd121SMatthew Ahrens.Nm zfs Cm send Fl t Ar token ,
28079c3fd121SMatthew Ahrenswhere the
28089c3fd121SMatthew Ahrens.Ar token
28099c3fd121SMatthew Ahrensis the value of the
28109c3fd121SMatthew Ahrens.Sy receive_resume_token
28119c3fd121SMatthew Ahrensproperty of the filesystem or volume which is received into.
28129c3fd121SMatthew Ahrens.Pp
28139c3fd121SMatthew AhrensTo use this flag, the storage pool must have the
28149c3fd121SMatthew Ahrens.Sy extensible_dataset
28159c3fd121SMatthew Ahrensfeature enabled.  See
28169c3fd121SMatthew Ahrens.Xr zpool-features 5
28179c3fd121SMatthew Ahrensfor details on ZFS feature flags.
2818b3cff10cSYuri Pankov.El
2819b3cff10cSYuri Pankov.It Xo
2820b3cff10cSYuri Pankov.Nm
28219c3fd121SMatthew Ahrens.Cm receive
28229c3fd121SMatthew Ahrens.Fl A
28239c3fd121SMatthew Ahrens.Ar filesystem Ns | Ns Ar volume
28249c3fd121SMatthew Ahrens.Xc
28259c3fd121SMatthew AhrensAbort an interrupted
28269c3fd121SMatthew Ahrens.Nm zfs Cm receive Fl s ,
28279c3fd121SMatthew Ahrensdeleting its saved partially received state.
28289c3fd121SMatthew Ahrens.It Xo
28299c3fd121SMatthew Ahrens.Nm
2830b3cff10cSYuri Pankov.Cm allow
2831b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume
2832b3cff10cSYuri Pankov.Xc
2833c10c16deSRichard LoweDisplays permissions that have been delegated on the specified filesystem or
2834b3cff10cSYuri Pankovvolume. See the other forms of
2835b3cff10cSYuri Pankov.Nm zfs Cm allow
2836b3cff10cSYuri Pankovfor more information.
2837b3cff10cSYuri Pankov.It Xo
2838b3cff10cSYuri Pankov.Nm
2839b3cff10cSYuri Pankov.Cm allow
2840b3cff10cSYuri Pankov.Op Fl dglu
2841b3cff10cSYuri Pankov.Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
2842b3cff10cSYuri Pankov.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
2843b3cff10cSYuri Pankov.Ar setname Oc Ns ...
2844b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume
2845c10c16deSRichard Lowe.br
2846b3cff10cSYuri Pankov.Nm
2847b3cff10cSYuri Pankov.Cm allow
2848b3cff10cSYuri Pankov.Op Fl dl
2849b3cff10cSYuri Pankov.Fl e Ns | Ns Sy everyone
2850b3cff10cSYuri Pankov.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
2851b3cff10cSYuri Pankov.Ar setname Oc Ns ...
2852b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume
2853b3cff10cSYuri Pankov.Xc
2854b3cff10cSYuri PankovDelegates ZFS administration permission for the file systems to non-privileged
2855b3cff10cSYuri Pankovusers.
2856b3cff10cSYuri Pankov.Bl -tag -width "-d"
2857b3cff10cSYuri Pankov.It Fl d
2858b3cff10cSYuri PankovAllow only for the descendent file systems.
2859b3cff10cSYuri Pankov.It Fl e Ns | Ns Sy everyone
286052fd7480SMarcel TelkaSpecifies that the permissions be delegated to everyone.
2861b3cff10cSYuri Pankov.It Fl g Ar group Ns Oo , Ns Ar group Oc Ns ...
2862b3cff10cSYuri PankovExplicitly specify that permissions are delegated to the group.
2863b3cff10cSYuri Pankov.It Fl l
2864b3cff10cSYuri PankovAllow
2865b3cff10cSYuri Pankov.Qq locally
2866b3cff10cSYuri Pankovonly for the specified file system.
2867b3cff10cSYuri Pankov.It Fl u Ar user Ns Oo , Ns Ar user Oc Ns ...
2868b3cff10cSYuri PankovExplicitly specify that permissions are delegated to the user.
2869b3cff10cSYuri Pankov.It Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
2870b3cff10cSYuri PankovSpecifies to whom the permissions are delegated. Multiple entities can be
2871b3cff10cSYuri Pankovspecified as a comma-separated list. If neither of the
2872b3cff10cSYuri Pankov.Fl gu
2873b3cff10cSYuri Pankovoptions are specified, then the argument is interpreted preferentially as the
2874b3cff10cSYuri Pankovkeyword
2875b3cff10cSYuri Pankov.Sy everyone ,
2876b3cff10cSYuri Pankovthen as a user name, and lastly as a group name. To specify a user or group
2877b3cff10cSYuri Pankovnamed
2878b3cff10cSYuri Pankov.Qq everyone ,
2879b3cff10cSYuri Pankovuse the
2880b3cff10cSYuri Pankov.Fl g
2881b3cff10cSYuri Pankovor
2882b3cff10cSYuri Pankov.Fl u
2883b3cff10cSYuri Pankovoptions. To specify a group with the same name as a user, use the
2884b3cff10cSYuri Pankov.Fl g
2885b3cff10cSYuri Pankovoptions.
2886b3cff10cSYuri Pankov.It Xo
2887b3cff10cSYuri Pankov.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
2888b3cff10cSYuri Pankov.Ar setname Oc Ns ...
2889b3cff10cSYuri Pankov.Xc
2890b3cff10cSYuri PankovThe permissions to delegate. Multiple permissions may be specified as a
2891b3cff10cSYuri Pankovcomma-separated list. Permission names are the same as ZFS subcommand and
2892b3cff10cSYuri Pankovproperty names. See the property list below. Property set names,
2893b3cff10cSYuri Pankovwhich begin with
2894b3cff10cSYuri Pankov.Sy @ ,
2895b3cff10cSYuri Pankovmay be specified. See the
2896b3cff10cSYuri Pankov.Fl s
2897b3cff10cSYuri Pankovform below for details.
2898b3cff10cSYuri Pankov.El
2899b3cff10cSYuri Pankov.Pp
2900b3cff10cSYuri PankovIf neither of the
2901b3cff10cSYuri Pankov.Fl dl
2902c10c16deSRichard Loweoptions are specified, or both are, then the permissions are allowed for the
2903b3cff10cSYuri Pankovfile system or volume, and all of its descendents.
2904b3cff10cSYuri Pankov.Pp
2905b3cff10cSYuri PankovPermissions are generally the ability to use a ZFS subcommand or change a ZFS
2906b3cff10cSYuri Pankovproperty. The following permissions are available:
2907b3cff10cSYuri Pankov.Bd -literal
2908c10c16deSRichard LoweNAME             TYPE           NOTES
2909c10c16deSRichard Loweallow            subcommand     Must also have the permission that is being
2910c10c16deSRichard Lowe                                allowed
2911c10c16deSRichard Loweclone            subcommand     Must also have the 'create' ability and 'mount'
2912c10c16deSRichard Lowe                                ability in the origin file system
2913c10c16deSRichard Lowecreate           subcommand     Must also have the 'mount' ability
2914c10c16deSRichard Lowedestroy          subcommand     Must also have the 'mount' ability
29153b8be6bfSRichard Lowediff             subcommand     Allows lookup of paths within a dataset
29163b8be6bfSRichard Lowe                                given an object number, and the ability to
29173b8be6bfSRichard Lowe                                create snapshots necessary to 'zfs diff'.
2918c10c16deSRichard Lowemount            subcommand     Allows mount/umount of ZFS datasets
2919c10c16deSRichard Lowepromote          subcommand     Must also have the 'mount'
2920c10c16deSRichard Lowe                                and 'promote' ability in the origin file system
2921c10c16deSRichard Lowereceive          subcommand     Must also have the 'mount' and 'create' ability
2922c10c16deSRichard Lowerename           subcommand     Must also have the 'mount' and 'create'
2923c10c16deSRichard Lowe                                ability in the new parent
2924c10c16deSRichard Lowerollback         subcommand     Must also have the 'mount' ability
2925c10c16deSRichard Lowesend             subcommand
2926c10c16deSRichard Loweshare            subcommand     Allows sharing file systems over NFS or SMB
2927c10c16deSRichard Lowe                                protocols
2928c10c16deSRichard Lowesnapshot         subcommand     Must also have the 'mount' ability
2929b3cff10cSYuri Pankov
2930c10c16deSRichard Lowegroupquota       other          Allows accessing any groupquota@... property
2931c10c16deSRichard Lowegroupused        other          Allows reading any groupused@... property
2932c10c16deSRichard Loweuserprop         other          Allows changing any user property
2933c10c16deSRichard Loweuserquota        other          Allows accessing any userquota@... property
2934c10c16deSRichard Loweuserused         other          Allows reading any userused@... property
2935c10c16deSRichard Lowe
2936c10c16deSRichard Loweaclinherit       property
2937c10c16deSRichard Loweaclmode          property
2938c10c16deSRichard Loweatime            property
2939c10c16deSRichard Lowecanmount         property
2940c10c16deSRichard Lowecasesensitivity  property
2941c10c16deSRichard Lowechecksum         property
2942c10c16deSRichard Lowecompression      property
2943c10c16deSRichard Lowecopies           property
2944c10c16deSRichard Lowedevices          property
2945c10c16deSRichard Loweexec             property
2946*e6d2808dSMarcel Telkafollow           property
2947a2afb611SJerry Jelinekfilesystem_limit property
2948c10c16deSRichard Lowemountpoint       property
2949c10c16deSRichard Lowenbmand           property
2950c10c16deSRichard Lowenormalization    property
2951c10c16deSRichard Loweprimarycache     property
2952c10c16deSRichard Lowequota            property
2953c10c16deSRichard Lowereadonly         property
2954c10c16deSRichard Lowerecordsize       property
2955c10c16deSRichard Lowerefquota         property
2956c10c16deSRichard Lowerefreservation   property
2957c10c16deSRichard Lowereservation      property
2958c10c16deSRichard Lowesecondarycache   property
2959c10c16deSRichard Lowesetuid           property
2960c10c16deSRichard Lowesharenfs         property
2961c10c16deSRichard Lowesharesmb         property
2962c10c16deSRichard Lowesnapdir          property
2963a2afb611SJerry Jelineksnapshot_limit   property
2964c10c16deSRichard Loweutf8only         property
2965c10c16deSRichard Loweversion          property
2966c10c16deSRichard Lowevolblocksize     property
2967c10c16deSRichard Lowevolsize          property
2968c10c16deSRichard Lowevscan            property
2969c10c16deSRichard Lowexattr            property
2970c10c16deSRichard Lowezoned            property
2971b3cff10cSYuri Pankov.Ed
2972b3cff10cSYuri Pankov.It Xo
2973b3cff10cSYuri Pankov.Nm
2974b3cff10cSYuri Pankov.Cm allow
2975b3cff10cSYuri Pankov.Fl c
2976b3cff10cSYuri Pankov.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
2977b3cff10cSYuri Pankov.Ar setname Oc Ns ...
2978b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume
2979b3cff10cSYuri Pankov.Xc
2980b3cff10cSYuri PankovSets
2981b3cff10cSYuri Pankov.Qq create time
2982b3cff10cSYuri Pankovpermissions. These permissions are granted
2983b3cff10cSYuri Pankov.Pq locally
2984b3cff10cSYuri Pankovto the creator of any newly-created descendent file system.
2985b3cff10cSYuri Pankov.It Xo
2986b3cff10cSYuri Pankov.Nm
2987b3cff10cSYuri Pankov.Cm allow
2988b3cff10cSYuri Pankov.Fl s No @ Ns Ar setname
2989b3cff10cSYuri Pankov.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
2990b3cff10cSYuri Pankov.Ar setname Oc Ns ...
2991b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume
2992b3cff10cSYuri Pankov.Xc
2993c10c16deSRichard LoweDefines or adds permissions to a permission set. The set can be used by other
2994b3cff10cSYuri Pankov.Nm zfs Cm allow
2995b3cff10cSYuri Pankovcommands for the specified file system and its descendents. Sets are evaluated
2996b3cff10cSYuri Pankovdynamically, so changes to a set are immediately reflected. Permission sets
2997b3cff10cSYuri Pankovfollow the same naming restrictions as ZFS file systems, but the name must begin
2998b3cff10cSYuri Pankovwith
2999b3cff10cSYuri Pankov.Sy @ ,
3000b3cff10cSYuri Pankovand can be no more than 64 characters long.
3001b3cff10cSYuri Pankov.It Xo
3002b3cff10cSYuri Pankov.Nm
3003b3cff10cSYuri Pankov.Cm unallow
3004b3cff10cSYuri Pankov.Op Fl dglru
3005b3cff10cSYuri Pankov.Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ...
3006b3cff10cSYuri Pankov.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3007b3cff10cSYuri Pankov.Ar setname Oc Ns ... Oc
3008b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume
3009c10c16deSRichard Lowe.br
3010b3cff10cSYuri Pankov.Nm
3011b3cff10cSYuri Pankov.Cm unallow
3012b3cff10cSYuri Pankov.Op Fl dlr
3013b3cff10cSYuri Pankov.Fl e Ns | Ns Sy everyone
3014b3cff10cSYuri Pankov.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3015b3cff10cSYuri Pankov.Ar setname Oc Ns ... Oc
3016b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume
3017c10c16deSRichard Lowe.br
3018b3cff10cSYuri Pankov.Nm
3019b3cff10cSYuri Pankov.Cm unallow
3020b3cff10cSYuri Pankov.Op Fl r
3021b3cff10cSYuri Pankov.Fl c
3022b3cff10cSYuri Pankov.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3023b3cff10cSYuri Pankov.Ar setname Oc Ns ... Oc
3024b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume
3025b3cff10cSYuri Pankov.Xc
3026b3cff10cSYuri PankovRemoves permissions that were granted with the
3027b3cff10cSYuri Pankov.Nm zfs Cm allow
3028b3cff10cSYuri Pankovcommand. No permissions are explicitly denied, so other permissions granted are
3029b3cff10cSYuri Pankovstill in effect. For example, if the permission is granted by an ancestor. If no
3030b3cff10cSYuri Pankovpermissions are specified, then all permissions for the specified
3031b3cff10cSYuri Pankov.Ar user ,
3032b3cff10cSYuri Pankov.Ar group ,
3033b3cff10cSYuri Pankovor
3034b3cff10cSYuri Pankov.Sy everyone
3035b3cff10cSYuri Pankovare removed. Specifying
3036b3cff10cSYuri Pankov.Sy everyone
3037b3cff10cSYuri Pankov.Po or using the
3038b3cff10cSYuri Pankov.Fl e
3039b3cff10cSYuri Pankovoption
3040b3cff10cSYuri Pankov.Pc
3041b3cff10cSYuri Pankovonly removes the permissions that were granted to everyone, not all permissions
3042b3cff10cSYuri Pankovfor every user and group. See the
3043b3cff10cSYuri Pankov.Nm zfs Cm allow
3044b3cff10cSYuri Pankovcommand for a description of the
3045b3cff10cSYuri Pankov.Fl ldugec
3046b3cff10cSYuri Pankovoptions.
3047b3cff10cSYuri Pankov.Bl -tag -width "-r"
3048b3cff10cSYuri Pankov.It Fl r
3049c10c16deSRichard LoweRecursively remove the permissions from this file system and all descendents.
3050b3cff10cSYuri Pankov.El
3051b3cff10cSYuri Pankov.It Xo
3052b3cff10cSYuri Pankov.Nm
3053b3cff10cSYuri Pankov.Cm unallow
3054b3cff10cSYuri Pankov.Op Fl r
3055b3cff10cSYuri Pankov.Fl s @ Ns Ar setname
3056b3cff10cSYuri Pankov.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
3057b3cff10cSYuri Pankov.Ar setname Oc Ns ... Oc
3058b3cff10cSYuri Pankov.Ar filesystem Ns | Ns Ar volume
3059b3cff10cSYuri Pankov.Xc
3060b3cff10cSYuri PankovRemoves permissions from a permission set. If no permissions are specified, then
3061b3cff10cSYuri Pankovall permissions are removed, thus removing the set entirely.
3062b3cff10cSYuri Pankov.It Xo
3063b3cff10cSYuri Pankov.Nm
3064b3cff10cSYuri Pankov.Cm hold
3065b3cff10cSYuri Pankov.Op Fl r
3066b3cff10cSYuri Pankov.Ar tag Ar snapshot Ns ...
3067b3cff10cSYuri Pankov.Xc
3068b3cff10cSYuri PankovAdds a single reference, named with the
3069b3cff10cSYuri Pankov.Ar tag
3070b3cff10cSYuri Pankovargument, to the specified snapshot or snapshots. Each snapshot has its own tag
3071b3cff10cSYuri Pankovnamespace, and tags must be unique within that space.
3072b3cff10cSYuri Pankov.Pp
3073c10c16deSRichard LoweIf a hold exists on a snapshot, attempts to destroy that snapshot by using the
3074b3cff10cSYuri Pankov.Nm zfs Cm destroy
3075b3cff10cSYuri Pankovcommand return
3076b3cff10cSYuri Pankov.Er EBUSY .
3077b3cff10cSYuri Pankov.Bl -tag -width "-r"
3078b3cff10cSYuri Pankov.It Fl r
3079b3cff10cSYuri PankovSpecifies that a hold with the given tag is applied recursively to the snapshots
3080b3cff10cSYuri Pankovof all descendent file systems.
3081b3cff10cSYuri Pankov.El
3082b3cff10cSYuri Pankov.It Xo
3083b3cff10cSYuri Pankov.Nm
3084b3cff10cSYuri Pankov.Cm holds
3085b3cff10cSYuri Pankov.Op Fl r
3086b3cff10cSYuri Pankov.Ar snapshot Ns ...
3087b3cff10cSYuri Pankov.Xc
3088c10c16deSRichard LoweLists all existing user references for the given snapshot or snapshots.
3089b3cff10cSYuri Pankov.Bl -tag -width "-r"
3090b3cff10cSYuri Pankov.It Fl r
3091c10c16deSRichard LoweLists the holds that are set on the named descendent snapshots, in addition to
3092c10c16deSRichard Lowelisting the holds on the named snapshot.
3093b3cff10cSYuri Pankov.El
3094b3cff10cSYuri Pankov.It Xo
3095b3cff10cSYuri Pankov.Nm
3096b3cff10cSYuri Pankov.Cm release
3097b3cff10cSYuri Pankov.Op Fl r
3098b3cff10cSYuri Pankov.Ar tag Ar snapshot Ns ...
3099b3cff10cSYuri Pankov.Xc
3100b3cff10cSYuri PankovRemoves a single reference, named with the
3101b3cff10cSYuri Pankov.Ar tag
3102b3cff10cSYuri Pankovargument, from the specified snapshot or snapshots. The tag must already exist
3103b3cff10cSYuri Pankovfor each snapshot. If a hold exists on a snapshot, attempts to destroy that
3104b3cff10cSYuri Pankovsnapshot by using the
3105b3cff10cSYuri Pankov.Nm zfs Cm destroy
3106b3cff10cSYuri Pankovcommand return
3107b3cff10cSYuri Pankov.Er EBUSY .
3108b3cff10cSYuri Pankov.Bl -tag -width "-r"
3109b3cff10cSYuri Pankov.It Fl r
3110c10c16deSRichard LoweRecursively releases a hold with the given tag on the snapshots of all
3111c10c16deSRichard Lowedescendent file systems.
3112b3cff10cSYuri Pankov.El
3113b3cff10cSYuri Pankov.It Xo
3114b3cff10cSYuri Pankov.Nm
3115b3cff10cSYuri Pankov.Cm diff
3116b3cff10cSYuri Pankov.Op Fl FHt
3117b3cff10cSYuri Pankov.Ar snapshot Ar snapshot Ns | Ns Ar filesystem
3118b3cff10cSYuri Pankov.Xc
31193b8be6bfSRichard LoweDisplay the difference between a snapshot of a given filesystem and another
31203b8be6bfSRichard Lowesnapshot of that filesystem from a later time or the current contents of the
3121b3cff10cSYuri Pankovfilesystem. The first column is a character indicating the type of change, the
3122b3cff10cSYuri Pankovother columns indicate pathname, new pathname
3123b3cff10cSYuri Pankov.Pq in case of rename ,
3124b3cff10cSYuri Pankovchange in link count, and optionally file type and/or change time. The types of
3125b3cff10cSYuri Pankovchange are:
3126b3cff10cSYuri Pankov.Bd -literal
31273b8be6bfSRichard Lowe-       The path has been removed
31283b8be6bfSRichard Lowe+       The path has been created
31293b8be6bfSRichard LoweM       The path has been modified
31303b8be6bfSRichard LoweR       The path has been renamed
3131b3cff10cSYuri Pankov.Ed
3132b3cff10cSYuri Pankov.Bl -tag -width "-F"
3133b3cff10cSYuri Pankov.It Fl F
3134b3cff10cSYuri PankovDisplay an indication of the type of file, in a manner similar to the
3135b3cff10cSYuri Pankov.Fl
3136b3cff10cSYuri Pankovoption of
3137b3cff10cSYuri Pankov.Xr ls 1 .
3138b3cff10cSYuri Pankov.Bd -literal
31393b8be6bfSRichard LoweB       Block device
31403b8be6bfSRichard LoweC       Character device
31413b8be6bfSRichard Lowe/       Directory
31423b8be6bfSRichard Lowe>       Door
31433b8be6bfSRichard Lowe|       Named pipe
31443b8be6bfSRichard Lowe@       Symbolic link
31453b8be6bfSRichard LoweP       Event port
31463b8be6bfSRichard Lowe=       Socket
31473b8be6bfSRichard LoweF       Regular file
3148b3cff10cSYuri Pankov.Ed
3149b3cff10cSYuri Pankov.It Fl H
3150b3cff10cSYuri PankovGive more parsable tab-separated output, without header lines and without
3151b3cff10cSYuri Pankovarrows.
3152b3cff10cSYuri Pankov.It Fl t
31533b8be6bfSRichard LoweDisplay the path's inode change time as the first column of output.
3154b3cff10cSYuri Pankov.El
3155b3cff10cSYuri Pankov.El
3156b3cff10cSYuri Pankov.Sh EXIT STATUS
3157b3cff10cSYuri PankovThe
3158b3cff10cSYuri Pankov.Nm
3159b3cff10cSYuri Pankovutility exits 0 on success, 1 if an error occurs, and 2 if invalid command line
3160b3cff10cSYuri Pankovoptions were specified.
3161b3cff10cSYuri Pankov.Sh EXAMPLES
3162b3cff10cSYuri Pankov.Bl -tag -width ""
3163b3cff10cSYuri Pankov.It Sy Example 1 No Creating a ZFS File System Hierarchy
3164b3cff10cSYuri PankovThe following commands create a file system named
3165b3cff10cSYuri Pankov.Em pool/home
3166b3cff10cSYuri Pankovand a file system named
3167b3cff10cSYuri Pankov.Em pool/home/bob .
3168b3cff10cSYuri PankovThe mount point
3169b3cff10cSYuri Pankov.Pa /export/home
3170b3cff10cSYuri Pankovis set for the parent file system, and is automatically inherited by the child
3171b3cff10cSYuri Pankovfile system.
3172b3cff10cSYuri Pankov.Bd -literal
3173b3cff10cSYuri Pankov# zfs create pool/home
3174b3cff10cSYuri Pankov# zfs set mountpoint=/export/home pool/home
3175b3cff10cSYuri Pankov# zfs create pool/home/bob
3176b3cff10cSYuri Pankov.Ed
3177b3cff10cSYuri Pankov.It Sy Example 2 No Creating a ZFS Snapshot
3178b3cff10cSYuri PankovThe following command creates a snapshot named
3179b3cff10cSYuri Pankov.Sy yesterday .
3180b3cff10cSYuri PankovThis snapshot is mounted on demand in the
3181b3cff10cSYuri Pankov.Pa .zfs/snapshot
3182b3cff10cSYuri Pankovdirectory at the root of the
3183b3cff10cSYuri Pankov.Em pool/home/bob
3184b3cff10cSYuri Pankovfile system.
3185b3cff10cSYuri Pankov.Bd -literal
3186b3cff10cSYuri Pankov# zfs snapshot pool/home/bob@yesterday
3187b3cff10cSYuri Pankov.Ed
3188b3cff10cSYuri Pankov.It Sy Example 3 No Creating and Destroying Multiple Snapshots
3189b3cff10cSYuri PankovThe following command creates snapshots named
3190b3cff10cSYuri Pankov.Sy yesterday
3191b3cff10cSYuri Pankovof
3192b3cff10cSYuri Pankov.Em pool/home
3193b3cff10cSYuri Pankovand all of its descendent file systems. Each snapshot is mounted on demand in
3194b3cff10cSYuri Pankovthe
3195b3cff10cSYuri Pankov.Pa .zfs/snapshot
3196b3cff10cSYuri Pankovdirectory at the root of its file system. The second command destroys the newly
3197b3cff10cSYuri Pankovcreated snapshots.
3198b3cff10cSYuri Pankov.Bd -literal
3199b3cff10cSYuri Pankov# zfs snapshot -r pool/home@yesterday
3200b3cff10cSYuri Pankov# zfs destroy -r pool/home@yesterday
3201b3cff10cSYuri Pankov.Ed
3202b3cff10cSYuri Pankov.It Sy Example 4 No Disabling and Enabling File System Compression
3203b3cff10cSYuri PankovThe following command disables the
3204b3cff10cSYuri Pankov.Sy compression
3205b3cff10cSYuri Pankovproperty for all file systems under
3206b3cff10cSYuri Pankov.Em pool/home .
3207b3cff10cSYuri PankovThe next command explicitly enables
3208b3cff10cSYuri Pankov.Sy compression
3209b3cff10cSYuri Pankovfor
3210b3cff10cSYuri Pankov.Em pool/home/anne .
3211b3cff10cSYuri Pankov.Bd -literal
3212b3cff10cSYuri Pankov# zfs set compression=off pool/home
3213b3cff10cSYuri Pankov# zfs set compression=on pool/home/anne
3214b3cff10cSYuri Pankov.Ed
3215b3cff10cSYuri Pankov.It Sy Example 5 No Listing ZFS Datasets
3216c10c16deSRichard LoweThe following command lists all active file systems and volumes in the system.
3217b3cff10cSYuri PankovSnapshots are displayed if the
3218b3cff10cSYuri Pankov.Sy listsnaps
3219b3cff10cSYuri Pankovproperty is
3220b3cff10cSYuri Pankov.Sy on .
3221b3cff10cSYuri PankovThe default is
3222b3cff10cSYuri Pankov.Sy off .
3223b3cff10cSYuri PankovSee
3224b3cff10cSYuri Pankov.Xr zpool 1M
3225b3cff10cSYuri Pankovfor more information on pool properties.
3226b3cff10cSYuri Pankov.Bd -literal
3227b3cff10cSYuri Pankov# zfs list
3228c10c16deSRichard LoweNAME                      USED  AVAIL  REFER  MOUNTPOINT
3229c10c16deSRichard Lowepool                      450K   457G    18K  /pool
3230c10c16deSRichard Lowepool/home                 315K   457G    21K  /export/home
3231c10c16deSRichard Lowepool/home/anne             18K   457G    18K  /export/home/anne
3232c10c16deSRichard Lowepool/home/bob             276K   457G   276K  /export/home/bob
3233b3cff10cSYuri Pankov.Ed
3234b3cff10cSYuri Pankov.It Sy Example 6 No Setting a Quota on a ZFS File System
3235b3cff10cSYuri PankovThe following command sets a quota of 50 Gbytes for
3236b3cff10cSYuri Pankov.Em pool/home/bob .
3237b3cff10cSYuri Pankov.Bd -literal
3238b3cff10cSYuri Pankov# zfs set quota=50G pool/home/bob
3239b3cff10cSYuri Pankov.Ed
3240b3cff10cSYuri Pankov.It Sy Example 7 No Listing ZFS Properties
3241b3cff10cSYuri PankovThe following command lists all properties for
3242b3cff10cSYuri Pankov.Em pool/home/bob .
3243b3cff10cSYuri Pankov.Bd -literal
3244b3cff10cSYuri Pankov# zfs get all pool/home/bob
3245c10c16deSRichard LoweNAME           PROPERTY              VALUE                  SOURCE
3246c10c16deSRichard Lowepool/home/bob  type                  filesystem             -
3247c10c16deSRichard Lowepool/home/bob  creation              Tue Jul 21 15:53 2009  -
3248c10c16deSRichard Lowepool/home/bob  used                  21K                    -
3249c10c16deSRichard Lowepool/home/bob  available             20.0G                  -
3250c10c16deSRichard Lowepool/home/bob  referenced            21K                    -
3251c10c16deSRichard Lowepool/home/bob  compressratio         1.00x                  -
3252c10c16deSRichard Lowepool/home/bob  mounted               yes                    -
3253c10c16deSRichard Lowepool/home/bob  quota                 20G                    local
3254c10c16deSRichard Lowepool/home/bob  reservation           none                   default
3255c10c16deSRichard Lowepool/home/bob  recordsize            128K                   default
3256c10c16deSRichard Lowepool/home/bob  mountpoint            /pool/home/bob         default
3257c10c16deSRichard Lowepool/home/bob  sharenfs              off                    default
3258c10c16deSRichard Lowepool/home/bob  checksum              on                     default
3259c10c16deSRichard Lowepool/home/bob  compression           on                     local
3260c10c16deSRichard Lowepool/home/bob  atime                 on                     default
3261c10c16deSRichard Lowepool/home/bob  devices               on                     default
3262c10c16deSRichard Lowepool/home/bob  exec                  on                     default
3263*e6d2808dSMarcel Telkapool/home/bob  follow                on                     default
3264c10c16deSRichard Lowepool/home/bob  setuid                on                     default
3265c10c16deSRichard Lowepool/home/bob  readonly              off                    default
3266c10c16deSRichard Lowepool/home/bob  zoned                 off                    default
3267c10c16deSRichard Lowepool/home/bob  snapdir               hidden                 default
3268a3c49ce1SAlbert Leepool/home/bob  aclmode               discard                default
3269c10c16deSRichard Lowepool/home/bob  aclinherit            restricted             default
3270c10c16deSRichard Lowepool/home/bob  canmount              on                     default
3271c10c16deSRichard Lowepool/home/bob  xattr                 on                     default
3272c10c16deSRichard Lowepool/home/bob  copies                1                      default
3273c10c16deSRichard Lowepool/home/bob  version               4                      -
3274c10c16deSRichard Lowepool/home/bob  utf8only              off                    -
3275c10c16deSRichard Lowepool/home/bob  normalization         none                   -
3276c10c16deSRichard Lowepool/home/bob  casesensitivity       sensitive              -
3277c10c16deSRichard Lowepool/home/bob  vscan                 off                    default
3278c10c16deSRichard Lowepool/home/bob  nbmand                off                    default
3279c10c16deSRichard Lowepool/home/bob  sharesmb              off                    default
3280c10c16deSRichard Lowepool/home/bob  refquota              none                   default
3281c10c16deSRichard Lowepool/home/bob  refreservation        none                   default
3282c10c16deSRichard Lowepool/home/bob  primarycache          all                    default
3283c10c16deSRichard Lowepool/home/bob  secondarycache        all                    default
3284c10c16deSRichard Lowepool/home/bob  usedbysnapshots       0                      -
3285c10c16deSRichard Lowepool/home/bob  usedbydataset         21K                    -
3286c10c16deSRichard Lowepool/home/bob  usedbychildren        0                      -
3287c10c16deSRichard Lowepool/home/bob  usedbyrefreservation  0                      -
3288b3cff10cSYuri Pankov.Ed
3289b3cff10cSYuri Pankov.Pp
3290c10c16deSRichard LoweThe following command gets a single property value.
3291b3cff10cSYuri Pankov.Bd -literal
3292b3cff10cSYuri Pankov# zfs get -H -o value compression pool/home/bob
3293c10c16deSRichard Loweon
3294b3cff10cSYuri Pankov.Ed
3295c10c16deSRichard LoweThe following command lists all properties with local settings for
3296b3cff10cSYuri Pankov.Em pool/home/bob .
3297b3cff10cSYuri Pankov.Bd -literal
3298b3cff10cSYuri Pankov# zfs get -r -s local -o name,property,value all pool/home/bob
3299c10c16deSRichard LoweNAME           PROPERTY              VALUE
3300c10c16deSRichard Lowepool/home/bob  quota                 20G
3301c10c16deSRichard Lowepool/home/bob  compression           on
3302b3cff10cSYuri Pankov.Ed
3303b3cff10cSYuri Pankov.It Sy Example 8 No Rolling Back a ZFS File System
3304b3cff10cSYuri PankovThe following command reverts the contents of
3305b3cff10cSYuri Pankov.Em pool/home/anne
3306b3cff10cSYuri Pankovto the snapshot named
3307b3cff10cSYuri Pankov.Sy yesterday ,
3308b3cff10cSYuri Pankovdeleting all intermediate snapshots.
3309b3cff10cSYuri Pankov.Bd -literal
3310b3cff10cSYuri Pankov# zfs rollback -r pool/home/anne@yesterday
3311b3cff10cSYuri Pankov.Ed
3312b3cff10cSYuri Pankov.It Sy Example 9 No Creating a ZFS Clone
3313c10c16deSRichard LoweThe following command creates a writable file system whose initial contents are
3314b3cff10cSYuri Pankovthe same as
3315b3cff10cSYuri Pankov.Em pool/home/bob@yesterday .
3316b3cff10cSYuri Pankov.Bd -literal
3317b3cff10cSYuri Pankov# zfs clone pool/home/bob@yesterday pool/clone
3318b3cff10cSYuri Pankov.Ed
3319b3cff10cSYuri Pankov.It Sy Example 10 No Promoting a ZFS Clone
3320c10c16deSRichard LoweThe following commands illustrate how to test out changes to a file system, and
3321c10c16deSRichard Lowethen replace the original file system with the changed one, using clones, clone
3322c10c16deSRichard Lowepromotion, and renaming:
3323b3cff10cSYuri Pankov.Bd -literal
3324b3cff10cSYuri Pankov# zfs create pool/project/production
3325c10c16deSRichard Lowe  populate /pool/project/production with data
3326b3cff10cSYuri Pankov# zfs snapshot pool/project/production@today
3327b3cff10cSYuri Pankov# zfs clone pool/project/production@today pool/project/beta
3328c10c16deSRichard Lowe  make changes to /pool/project/beta and test them
3329b3cff10cSYuri Pankov# zfs promote pool/project/beta
3330b3cff10cSYuri Pankov# zfs rename pool/project/production pool/project/legacy
3331b3cff10cSYuri Pankov# zfs rename pool/project/beta pool/project/production
3332c10c16deSRichard Lowe  once the legacy version is no longer needed, it can be destroyed
3333b3cff10cSYuri Pankov# zfs destroy pool/project/legacy
3334b3cff10cSYuri Pankov.Ed
3335b3cff10cSYuri Pankov.It Sy Example 11 No Inheriting ZFS Properties
3336b3cff10cSYuri PankovThe following command causes
3337b3cff10cSYuri Pankov.Em pool/home/bob
3338b3cff10cSYuri Pankovand
3339b3cff10cSYuri Pankov.Em pool/home/anne
3340b3cff10cSYuri Pankovto inherit the
3341b3cff10cSYuri Pankov.Sy checksum
3342b3cff10cSYuri Pankovproperty from their parent.
3343b3cff10cSYuri Pankov.Bd -literal
3344b3cff10cSYuri Pankov# zfs inherit checksum pool/home/bob pool/home/anne
3345b3cff10cSYuri Pankov.Ed
3346b3cff10cSYuri Pankov.It Sy Example 12 No Remotely Replicating ZFS Data
3347c10c16deSRichard LoweThe following commands send a full stream and then an incremental stream to a
3348b3cff10cSYuri Pankovremote machine, restoring them into
3349b3cff10cSYuri Pankov.Em poolB/received/fs@a
3350b3cff10cSYuri Pankovand
3351b3cff10cSYuri Pankov.Em poolB/received/fs@b ,
3352b3cff10cSYuri Pankovrespectively.
3353b3cff10cSYuri Pankov.Em poolB
3354b3cff10cSYuri Pankovmust contain the file system
3355b3cff10cSYuri Pankov.Em poolB/received ,
3356b3cff10cSYuri Pankovand must not initially contain
3357b3cff10cSYuri Pankov.Em poolB/received/fs .
3358b3cff10cSYuri Pankov.Bd -literal
3359b3cff10cSYuri Pankov# zfs send pool/fs@a | \e
3360b3cff10cSYuri Pankov  ssh host zfs receive poolB/received/fs@a
3361b3cff10cSYuri Pankov# zfs send -i a pool/fs@b | \e
3362b3cff10cSYuri Pankov  ssh host zfs receive poolB/received/fs
3363b3cff10cSYuri Pankov.Ed
3364b3cff10cSYuri Pankov.It Sy Example 13 No Using the zfs receive -d Option
3365b3cff10cSYuri PankovThe following command sends a full stream of
3366b3cff10cSYuri Pankov.Em poolA/fsA/fsB@snap
3367b3cff10cSYuri Pankovto a remote machine, receiving it into
3368b3cff10cSYuri Pankov.Em poolB/received/fsA/fsB@snap .
3369b3cff10cSYuri PankovThe
3370b3cff10cSYuri Pankov.Em fsA/fsB@snap
3371b3cff10cSYuri Pankovportion of the received snapshot's name is determined from the name of the sent
3372b3cff10cSYuri Pankovsnapshot.
3373b3cff10cSYuri Pankov.Em poolB
3374b3cff10cSYuri Pankovmust contain the file system
3375b3cff10cSYuri Pankov.Em poolB/received .
3376b3cff10cSYuri PankovIf
3377b3cff10cSYuri Pankov.Em poolB/received/fsA
3378b3cff10cSYuri Pankovdoes not exist, it is created as an empty file system.
3379b3cff10cSYuri Pankov.Bd -literal
3380b3cff10cSYuri Pankov# zfs send poolA/fsA/fsB@snap | \e
3381b3cff10cSYuri Pankov  ssh host zfs receive -d poolB/received
3382b3cff10cSYuri Pankov.Ed
3383b3cff10cSYuri Pankov.It Sy Example 14 No Setting User Properties
3384b3cff10cSYuri PankovThe following example sets the user-defined
3385b3cff10cSYuri Pankov.Sy com.example:department
3386c10c16deSRichard Loweproperty for a dataset.
3387b3cff10cSYuri Pankov.Bd -literal
3388b3cff10cSYuri Pankov# zfs set com.example:department=12345 tank/accounting
3389b3cff10cSYuri Pankov.Ed
3390b3cff10cSYuri Pankov.It Sy Example 15 No Performing a Rolling Snapshot
3391c10c16deSRichard LoweThe following example shows how to maintain a history of snapshots with a
3392c10c16deSRichard Loweconsistent naming scheme. To keep a week's worth of snapshots, the user
3393c10c16deSRichard Lowedestroys the oldest snapshot, renames the remaining snapshots, and then creates
3394c10c16deSRichard Lowea new snapshot, as follows:
3395b3cff10cSYuri Pankov.Bd -literal
3396b3cff10cSYuri Pankov# zfs destroy -r pool/users@7daysago
3397b3cff10cSYuri Pankov# zfs rename -r pool/users@6daysago @7daysago
3398b3cff10cSYuri Pankov# zfs rename -r pool/users@5daysago @6daysago
3399b3cff10cSYuri Pankov# zfs rename -r pool/users@yesterday @5daysago
3400b3cff10cSYuri Pankov# zfs rename -r pool/users@yesterday @4daysago
3401b3cff10cSYuri Pankov# zfs rename -r pool/users@yesterday @3daysago
3402b3cff10cSYuri Pankov# zfs rename -r pool/users@yesterday @2daysago
3403b3cff10cSYuri Pankov# zfs rename -r pool/users@today @yesterday
3404b3cff10cSYuri Pankov# zfs snapshot -r pool/users@today
3405b3cff10cSYuri Pankov.Ed
3406b3cff10cSYuri Pankov.It Sy Example 16 No Setting sharenfs Property Options on a ZFS File System
3407b3cff10cSYuri PankovThe following commands show how to set
3408b3cff10cSYuri Pankov.Sy sharenfs
3409b3cff10cSYuri Pankovproperty options to enable
3410b3cff10cSYuri Pankov.Sy rw
3411b3cff10cSYuri Pankovaccess for a set of
3412b3cff10cSYuri Pankov.Sy IP
3413b3cff10cSYuri Pankovaddresses and to enable root access for system
3414b3cff10cSYuri Pankov.Sy neo
3415b3cff10cSYuri Pankovon the
3416b3cff10cSYuri Pankov.Em tank/home
3417b3cff10cSYuri Pankovfile system.
3418b3cff10cSYuri Pankov.Bd -literal
3419b3cff10cSYuri Pankov# zfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home
3420b3cff10cSYuri Pankov.Ed
3421b3cff10cSYuri Pankov.Pp
3422b3cff10cSYuri PankovIf you are using
3423b3cff10cSYuri Pankov.Sy DNS
3424b3cff10cSYuri Pankovfor host name resolution, specify the fully qualified hostname.
3425b3cff10cSYuri Pankov.It Sy Example 17 No Delegating ZFS Administration Permissions on a ZFS Dataset
3426b3cff10cSYuri PankovThe following example shows how to set permissions so that user
3427b3cff10cSYuri Pankov.Sy cindys
3428b3cff10cSYuri Pankovcan create, destroy, mount, and take snapshots on
3429b3cff10cSYuri Pankov.Em tank/cindys .
3430b3cff10cSYuri PankovThe permissions on
3431b3cff10cSYuri Pankov.Em tank/cindys
3432b3cff10cSYuri Pankovare also displayed.
3433b3cff10cSYuri Pankov.Bd -literal
3434b3cff10cSYuri Pankov# zfs allow cindys create,destroy,mount,snapshot tank/cindys
3435b3cff10cSYuri Pankov# zfs allow tank/cindys
34365619b3f8SMarcel Telka---- Permissions on tank/cindys --------------------------------------
34375619b3f8SMarcel TelkaLocal+Descendent permissions:
3438c10c16deSRichard Lowe        user cindys create,destroy,mount,snapshot
3439b3cff10cSYuri Pankov.Ed
3440b3cff10cSYuri Pankov.Pp
3441b3cff10cSYuri PankovBecause the
3442b3cff10cSYuri Pankov.Em tank/cindys
3443b3cff10cSYuri Pankovmount point permission is set to 755 by default, user
3444b3cff10cSYuri Pankov.Sy cindys
3445b3cff10cSYuri Pankovwill be unable to mount file systems under
3446b3cff10cSYuri Pankov.Em tank/cindys .
3447b3cff10cSYuri PankovAdd an
3448b3cff10cSYuri Pankov.Sy ACE
3449b3cff10cSYuri Pankovsimilar to the following syntax to provide mount point access:
3450b3cff10cSYuri Pankov.Bd -literal
3451b3cff10cSYuri Pankov# chmod A+user:cindys:add_subdirectory:allow /tank/cindys
3452b3cff10cSYuri Pankov.Ed
3453b3cff10cSYuri Pankov.It Sy Example 18 No Delegating Create Time Permissions on a ZFS Dataset
3454b3cff10cSYuri PankovThe following example shows how to grant anyone in the group
3455b3cff10cSYuri Pankov.Sy staff
3456b3cff10cSYuri Pankovto create file systems in
3457b3cff10cSYuri Pankov.Em tank/users .
3458b3cff10cSYuri PankovThis syntax also allows staff members to destroy their own file systems, but not
3459b3cff10cSYuri Pankovdestroy anyone else's file system. The permissions on
3460b3cff10cSYuri Pankov.Em tank/users
3461b3cff10cSYuri Pankovare also displayed.
3462b3cff10cSYuri Pankov.Bd -literal
3463b3cff10cSYuri Pankov# zfs allow staff create,mount tank/users
3464b3cff10cSYuri Pankov# zfs allow -c destroy tank/users
3465b3cff10cSYuri Pankov# zfs allow tank/users
34665619b3f8SMarcel Telka---- Permissions on tank/users ---------------------------------------
34675619b3f8SMarcel TelkaPermission sets:
34685619b3f8SMarcel Telka        destroy
34695619b3f8SMarcel TelkaLocal+Descendent permissions:
3470c10c16deSRichard Lowe        group staff create,mount
3471b3cff10cSYuri Pankov.Ed
3472b3cff10cSYuri Pankov.It Sy Example 19 No Defining and Granting a Permission Set on a ZFS Dataset
3473c10c16deSRichard LoweThe following example shows how to define and grant a permission set on the
3474b3cff10cSYuri Pankov.Em tank/users
3475b3cff10cSYuri Pankovfile system. The permissions on
3476b3cff10cSYuri Pankov.Em tank/users
3477b3cff10cSYuri Pankovare also displayed.
3478b3cff10cSYuri Pankov.Bd -literal
3479b3cff10cSYuri Pankov# zfs allow -s @pset create,destroy,snapshot,mount tank/users
3480b3cff10cSYuri Pankov# zfs allow staff @pset tank/users
3481b3cff10cSYuri Pankov# zfs allow tank/users
34825619b3f8SMarcel Telka---- Permissions on tank/users ---------------------------------------
34835619b3f8SMarcel TelkaPermission sets:
3484c10c16deSRichard Lowe        @pset create,destroy,mount,snapshot
34855619b3f8SMarcel TelkaLocal+Descendent permissions:
34865619b3f8SMarcel Telka        group staff @pset
3487b3cff10cSYuri Pankov.Ed
3488b3cff10cSYuri Pankov.It Sy Example 20 No Delegating Property Permissions on a ZFS Dataset
3489c10c16deSRichard LoweThe following example shows to grant the ability to set quotas and reservations
3490b3cff10cSYuri Pankovon the
3491b3cff10cSYuri Pankov.Em users/home
3492b3cff10cSYuri Pankovfile system. The permissions on
3493b3cff10cSYuri Pankov.Em users/home
3494b3cff10cSYuri Pankovare also displayed.
3495b3cff10cSYuri Pankov.Bd -literal
3496b3cff10cSYuri Pankov# zfs allow cindys quota,reservation users/home
3497b3cff10cSYuri Pankov# zfs allow users/home
34985619b3f8SMarcel Telka---- Permissions on users/home ---------------------------------------
34995619b3f8SMarcel TelkaLocal+Descendent permissions:
3500c10c16deSRichard Lowe        user cindys quota,reservation
3501b3cff10cSYuri Pankovcindys% zfs set quota=10G users/home/marks
3502b3cff10cSYuri Pankovcindys% zfs get quota users/home/marks
3503c10c16deSRichard LoweNAME              PROPERTY  VALUE  SOURCE
3504c10c16deSRichard Loweusers/home/marks  quota     10G    local
3505b3cff10cSYuri Pankov.Ed
3506b3cff10cSYuri Pankov.It Sy Example 21 No Removing ZFS Delegated Permissions on a ZFS Dataset
3507c10c16deSRichard LoweThe following example shows how to remove the snapshot permission from the
3508b3cff10cSYuri Pankov.Sy staff
3509b3cff10cSYuri Pankovgroup on the
3510b3cff10cSYuri Pankov.Em tank/users
3511b3cff10cSYuri Pankovfile system. The permissions on
3512b3cff10cSYuri Pankov.Em tank/users
3513b3cff10cSYuri Pankovare also displayed.
3514b3cff10cSYuri Pankov.Bd -literal
3515b3cff10cSYuri Pankov# zfs unallow staff snapshot tank/users
3516b3cff10cSYuri Pankov# zfs allow tank/users
35175619b3f8SMarcel Telka---- Permissions on tank/users ---------------------------------------
35185619b3f8SMarcel TelkaPermission sets:
3519c10c16deSRichard Lowe        @pset create,destroy,mount,snapshot
35205619b3f8SMarcel TelkaLocal+Descendent permissions:
35215619b3f8SMarcel Telka        group staff @pset
3522b3cff10cSYuri Pankov.Ed
3523b3cff10cSYuri Pankov.It Sy Example 22 No Showing the differences between a snapshot and a ZFS Dataset
35243b8be6bfSRichard LoweThe following example shows how to see what has changed between a prior
3525b3cff10cSYuri Pankovsnapshot of a ZFS dataset and its current state. The
3526b3cff10cSYuri Pankov.Fl F
3527b3cff10cSYuri Pankovoption is used to indicate type information for the files affected.
3528b3cff10cSYuri Pankov.Bd -literal
35293b8be6bfSRichard Lowe# zfs diff -F tank/test@before tank/test
35303b8be6bfSRichard LoweM       /       /tank/test/
35313b8be6bfSRichard LoweM       F       /tank/test/linked      (+1)
35323b8be6bfSRichard LoweR       F       /tank/test/oldname -> /tank/test/newname
35333b8be6bfSRichard Lowe-       F       /tank/test/deleted
35343b8be6bfSRichard Lowe+       F       /tank/test/created
35353b8be6bfSRichard LoweM       F       /tank/test/modified
3536b3cff10cSYuri Pankov.Ed
3537b3cff10cSYuri Pankov.El
3538b3cff10cSYuri Pankov.Sh INTERFACE STABILITY
3539b3cff10cSYuri Pankov.Sy Commited .
3540b3cff10cSYuri Pankov.Sh SEE ALSO
3541b3cff10cSYuri Pankov.Xr gzip 1 ,
3542b3cff10cSYuri Pankov.Xr ssh 1 ,
3543b3cff10cSYuri Pankov.Xr mount 1M ,
3544b3cff10cSYuri Pankov.Xr share 1M ,
3545b3cff10cSYuri Pankov.Xr sharemgr 1M ,
3546b3cff10cSYuri Pankov.Xr unshare 1M ,
3547b3cff10cSYuri Pankov.Xr zonecfg 1M ,
3548b3cff10cSYuri Pankov.Xr zpool 1M ,
3549b3cff10cSYuri Pankov.Xr chmod 2 ,
3550b3cff10cSYuri Pankov.Xr stat 2 ,
3551b3cff10cSYuri Pankov.Xr write 2 ,
3552b3cff10cSYuri Pankov.Xr fsync 3C ,
3553b3cff10cSYuri Pankov.Xr dfstab 4 ,
3554b3cff10cSYuri Pankov.Xr acl 5 ,
3555b3cff10cSYuri Pankov.Xr attributes 5
3556