]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sys/contrib/openzfs/man/man8/zfs-set.8
THIS BRANCH IS OBSOLETE, PLEASE READ:
[FreeBSD/FreeBSD.git] / sys / contrib / openzfs / man / man8 / zfs-set.8
1 .\"
2 .\" CDDL HEADER START
3 .\"
4 .\" The contents of this file are subject to the terms of the
5 .\" Common Development and Distribution License (the "License").
6 .\" You may not use this file except in compliance with the License.
7 .\"
8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 .\" or http://www.opensolaris.org/os/licensing.
10 .\" See the License for the specific language governing permissions
11 .\" and limitations under the License.
12 .\"
13 .\" When distributing Covered Code, include this CDDL HEADER in each
14 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 .\" If applicable, add the following below this CDDL HEADER, with the
16 .\" fields enclosed by brackets "[]" replaced with your own identifying
17 .\" information: Portions Copyright [yyyy] [name of copyright owner]
18 .\"
19 .\" CDDL HEADER END
20 .\"
21 .\"
22 .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
23 .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
24 .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
25 .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
26 .\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
27 .\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
28 .\" Copyright (c) 2014 Integros [integros.com]
29 .\" Copyright 2019 Richard Laager. All rights reserved.
30 .\" Copyright 2018 Nexenta Systems, Inc.
31 .\" Copyright 2019 Joyent, Inc.
32 .\"
33 .Dd June 30, 2019
34 .Dt ZFS-SET 8
35 .Os
36 .Sh NAME
37 .Nm zfs Ns Pf - Cm set
38 .Nd Sets the property or list of properties to the given value(s) for each dataset.
39 .Sh SYNOPSIS
40 .Nm
41 .Cm set
42 .Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ...
43 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
44 .Nm
45 .Cm get
46 .Op Fl r Ns | Ns Fl d Ar depth
47 .Op Fl Hp
48 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
49 .Oo Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... Oc
50 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
51 .Cm all | Ar property Ns Oo , Ns Ar property Oc Ns ...
52 .Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns | Ns Ar bookmark Oc Ns ...
53 .Nm
54 .Cm inherit
55 .Op Fl rS
56 .Ar property Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
57 .Sh DESCRIPTION
58 .Bl -tag -width ""
59 .It Xo
60 .Nm
61 .Cm set
62 .Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ...
63 .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
64 .Xc
65 Only some properties can be edited.
66 See
67 .Xr zfsprops 8
68 for more information on what properties can be set and acceptable
69 values.
70 Numeric values can be specified as exact values, or in a human-readable form
71 with a suffix of
72 .Sy B , K , M , G , T , P , E , Z
73 .Po for bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes,
74 or zettabytes, respectively
75 .Pc .
76 User properties can be set on snapshots.
77 For more information, see the
78 .Em User Properties
79 section of
80 .Xr zfsprops 8 .
81 .It Xo
82 .Nm
83 .Cm get
84 .Op Fl r Ns | Ns Fl d Ar depth
85 .Op Fl Hp
86 .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc
87 .Oo Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... Oc
88 .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
89 .Cm all | Ar property Ns Oo , Ns Ar property Oc Ns ...
90 .Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns | Ns Ar bookmark Oc Ns ...
91 .Xc
92 Displays properties for the given datasets.
93 If no datasets are specified, then the command displays properties for all
94 datasets on the system.
95 For each property, the following columns are displayed:
96 .Bd -literal
97     name      Dataset name
98     property  Property name
99     value     Property value
100     source    Property source  \fBlocal\fP, \fBdefault\fP, \fBinherited\fP,
101               \fBtemporary\fP, \fBreceived\fP or none (\fB-\fP).
102 .Ed
103 .Pp
104 All columns are displayed by default, though this can be controlled by using the
105 .Fl o
106 option.
107 This command takes a comma-separated list of properties as described in the
108 .Em Native Properties
109 and
110 .Em User Properties
111 sections of
112 .Xr zfsprops 8 .
113 .Pp
114 The value
115 .Sy all
116 can be used to display all properties that apply to the given dataset's type
117 .Pq filesystem, volume, snapshot, or bookmark .
118 .Bl -tag -width "-H"
119 .It Fl H
120 Display output in a form more easily parsed by scripts.
121 Any headers are omitted, and fields are explicitly separated by a single tab
122 instead of an arbitrary amount of space.
123 .It Fl d Ar depth
124 Recursively display any children of the dataset, limiting the recursion to
125 .Ar depth .
126 A depth of
127 .Sy 1
128 will display only the dataset and its direct children.
129 .It Fl o Ar field
130 A comma-separated list of columns to display.
131 .Sy name Ns \&, Ns Sy property Ns \&, Ns Sy value Ns \&, Ns Sy source
132 is the default value.
133 .It Fl p
134 Display numbers in parsable
135 .Pq exact
136 values.
137 .It Fl r
138 Recursively display properties for any children.
139 .It Fl s Ar source
140 A comma-separated list of sources to display.
141 Those properties coming from a source other than those in this list are ignored.
142 Each source must be one of the following:
143 .Sy local ,
144 .Sy default ,
145 .Sy inherited ,
146 .Sy temporary ,
147 .Sy received ,
148 and
149 .Sy none .
150 The default value is all sources.
151 .It Fl t Ar type
152 A comma-separated list of types to display, where
153 .Ar type
154 is one of
155 .Sy filesystem ,
156 .Sy snapshot ,
157 .Sy volume ,
158 .Sy bookmark ,
159 or
160 .Sy all .
161 .El
162 .It Xo
163 .Nm
164 .Cm inherit
165 .Op Fl rS
166 .Ar property Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ...
167 .Xc
168 Clears the specified property, causing it to be inherited from an ancestor,
169 restored to default if no ancestor has the property set, or with the
170 .Fl S
171 option reverted to the received value if one exists.
172 See
173 .Xr zfsprops 8
174 for a listing of default values, and details on which properties can be
175 inherited.
176 .Bl -tag -width "-r"
177 .It Fl r
178 Recursively inherit the given property for all children.
179 .It Fl S
180 Revert the property to the received value if one exists; otherwise operate as
181 if the
182 .Fl S
183 option was not specified.
184 .El
185 .El
186 .Sh SEE ALSO
187 .Xr zfs-list 8 ,
188 .Xr zfsprops 8