]> git.proxmox.com Git - mirror_zfs.git/blame - man/man8/zfs-set.8
Add '-u' - nomount flag for zfs set
[mirror_zfs.git] / man / man8 / zfs-set.8
CommitLineData
870fc32f
RW
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
1d3ba0bf 9.\" or https://opensource.org/licenses/CDDL-1.0.
870fc32f
RW
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.\"
870fc32f
RW
21.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
22.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
23.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
24.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
25.\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
26.\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
27.\" Copyright (c) 2014 Integros [integros.com]
28.\" Copyright 2019 Richard Laager. All rights reserved.
29.\" Copyright 2018 Nexenta Systems, Inc.
30.\" Copyright 2019 Joyent, Inc.
31.\"
c522339f 32.Dd March 16, 2022
870fc32f 33.Dt ZFS-SET 8
6706552e 34.Os
f84fe3fc 35.
870fc32f 36.Sh NAME
1e36af8c 37.Nm zfs-set
f84fe3fc 38.Nd set properties on ZFS datasets
870fc32f 39.Sh SYNOPSIS
1e36af8c 40.Nm zfs
870fc32f 41.Cm set
8015e2ea 42.Op Fl u
f84fe3fc
AZ
43.Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns …
44.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns …
1e36af8c 45.Nm zfs
870fc32f
RW
46.Cm get
47.Op Fl r Ns | Ns Fl d Ar depth
48.Op Fl Hp
f84fe3fc
AZ
49.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns … Oc
50.Oo Fl s Ar source Ns Oo , Ns Ar source Oc Ns … Oc
51.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns … Oc
52.Cm all Ns | Ns Ar property Ns Oo , Ns Ar property Oc Ns …
53.Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns | Ns Ar bookmark Oc Ns …
1e36af8c 54.Nm zfs
870fc32f
RW
55.Cm inherit
56.Op Fl rS
f84fe3fc
AZ
57.Ar property Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns …
58.
870fc32f
RW
59.Sh DESCRIPTION
60.Bl -tag -width ""
61.It Xo
1e36af8c 62.Nm zfs
870fc32f 63.Cm set
8015e2ea 64.Op Fl u
f84fe3fc
AZ
65.Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns …
66.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns …
870fc32f
RW
67.Xc
68Only some properties can be edited.
69See
2badb345 70.Xr zfsprops 7
870fc32f
RW
71for more information on what properties can be set and acceptable
72values.
73Numeric values can be specified as exact values, or in a human-readable form
74with a suffix of
75.Sy B , K , M , G , T , P , E , Z
76.Po for bytes, kilobytes, megabytes, gigabytes, terabytes, petabytes, exabytes,
77or zettabytes, respectively
78.Pc .
79User properties can be set on snapshots.
80For more information, see the
81.Em User Properties
82section of
2badb345 83.Xr zfsprops 7 .
8015e2ea
US
84.Bl -tag -width "-u"
85.It Fl u
86Update mountpoint, sharenfs, sharesmb property but do not mount or share the
87dataset.
88.El
870fc32f 89.It Xo
1e36af8c 90.Nm zfs
870fc32f
RW
91.Cm get
92.Op Fl r Ns | Ns Fl d Ar depth
93.Op Fl Hp
f84fe3fc
AZ
94.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns … Oc
95.Oo Fl s Ar source Ns Oo , Ns Ar source Oc Ns … Oc
96.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns … Oc
97.Cm all Ns | Ns Ar property Ns Oo , Ns Ar property Oc Ns …
98.Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns | Ns Ar bookmark Oc Ns …
870fc32f
RW
99.Xc
100Displays properties for the given datasets.
101If no datasets are specified, then the command displays properties for all
102datasets on the system.
103For each property, the following columns are displayed:
f84fe3fc
AZ
104.Bl -tag -compact -offset 4n -width "property"
105.It Sy name
106Dataset name
107.It Sy property
108Property name
109.It Sy value
110Property value
111.It Sy source
112Property source
113.Sy local , default , inherited , temporary , received , No or Sy - Pq none .
114.El
870fc32f
RW
115.Pp
116All columns are displayed by default, though this can be controlled by using the
117.Fl o
118option.
119This command takes a comma-separated list of properties as described in the
f84fe3fc 120.Sx Native Properties
870fc32f 121and
f84fe3fc 122.Sx User Properties
870fc32f 123sections of
2badb345 124.Xr zfsprops 7 .
870fc32f
RW
125.Pp
126The value
127.Sy all
128can be used to display all properties that apply to the given dataset's type
f84fe3fc
AZ
129.Pq Sy filesystem , volume , snapshot , No or Sy bookmark .
130.Bl -tag -width "-s source"
870fc32f
RW
131.It Fl H
132Display output in a form more easily parsed by scripts.
133Any headers are omitted, and fields are explicitly separated by a single tab
134instead of an arbitrary amount of space.
135.It Fl d Ar depth
136Recursively display any children of the dataset, limiting the recursion to
137.Ar depth .
138A depth of
139.Sy 1
140will display only the dataset and its direct children.
141.It Fl o Ar field
f84fe3fc
AZ
142A comma-separated list of columns to display, defaults to
143.Sy name , Ns Sy property , Ns Sy value , Ns Sy source .
870fc32f
RW
144.It Fl p
145Display numbers in parsable
146.Pq exact
147values.
148.It Fl r
149Recursively display properties for any children.
150.It Fl s Ar source
151A comma-separated list of sources to display.
152Those properties coming from a source other than those in this list are ignored.
153Each source must be one of the following:
f84fe3fc 154.Sy local , default , inherited , temporary , received , No or Sy none .
870fc32f
RW
155The default value is all sources.
156.It Fl t Ar type
157A comma-separated list of types to display, where
158.Ar type
159is one of
f84fe3fc 160.Sy filesystem , snapshot , volume , bookmark , No or Sy all .
870fc32f
RW
161.El
162.It Xo
1e36af8c 163.Nm zfs
870fc32f
RW
164.Cm inherit
165.Op Fl rS
f84fe3fc 166.Ar property Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns …
870fc32f
RW
167.Xc
168Clears the specified property, causing it to be inherited from an ancestor,
169restored to default if no ancestor has the property set, or with the
170.Fl S
171option reverted to the received value if one exists.
172See
2badb345 173.Xr zfsprops 7
870fc32f
RW
174for a listing of default values, and details on which properties can be
175inherited.
176.Bl -tag -width "-r"
177.It Fl r
178Recursively inherit the given property for all children.
179.It Fl S
92295af8
AZ
180Revert the property to the received value, if one exists;
181otherwise, for non-inheritable properties, to the default;
182otherwise, operate as if the
870fc32f
RW
183.Fl S
184option was not specified.
185.El
186.El
f84fe3fc 187.
c522339f
AZ
188.Sh EXAMPLES
189.\" These are, respectively, examples 1, 4, 6, 7, 11, 14, 16 from zfs.8
190.\" Make sure to update them bidirectionally
191.Ss Example 1 : No Creating a ZFS File System Hierarchy
192The following commands create a file system named
193.Ar pool/home
194and a file system named
195.Ar pool/home/bob .
196The mount point
197.Pa /export/home
198is set for the parent file system, and is automatically inherited by the child
199file system.
200.Dl # Nm zfs Cm create Ar pool/home
201.Dl # Nm zfs Cm set Sy mountpoint Ns = Ns Ar /export/home pool/home
202.Dl # Nm zfs Cm create Ar pool/home/bob
203.
204.Ss Example 2 : No Disabling and Enabling File System Compression
205The following command disables the
206.Sy compression
207property for all file systems under
208.Ar pool/home .
209The next command explicitly enables
210.Sy compression
211for
212.Ar pool/home/anne .
213.Dl # Nm zfs Cm set Sy compression Ns = Ns Sy off Ar pool/home
214.Dl # Nm zfs Cm set Sy compression Ns = Ns Sy on Ar pool/home/anne
215.
216.Ss Example 3 : No Setting a Quota on a ZFS File System
217The following command sets a quota of 50 Gbytes for
218.Ar pool/home/bob :
219.Dl # Nm zfs Cm set Sy quota Ns = Ns Ar 50G pool/home/bob
220.
221.Ss Example 4 : No Listing ZFS Properties
222The following command lists all properties for
223.Ar pool/home/bob :
224.Bd -literal -compact -offset Ds
225.No # Nm zfs Cm get Sy all Ar pool/home/bob
226NAME PROPERTY VALUE SOURCE
227pool/home/bob type filesystem -
228pool/home/bob creation Tue Jul 21 15:53 2009 -
229pool/home/bob used 21K -
230pool/home/bob available 20.0G -
231pool/home/bob referenced 21K -
232pool/home/bob compressratio 1.00x -
233pool/home/bob mounted yes -
234pool/home/bob quota 20G local
235pool/home/bob reservation none default
236pool/home/bob recordsize 128K default
237pool/home/bob mountpoint /pool/home/bob default
238pool/home/bob sharenfs off default
239pool/home/bob checksum on default
240pool/home/bob compression on local
241pool/home/bob atime on default
242pool/home/bob devices on default
243pool/home/bob exec on default
244pool/home/bob setuid on default
245pool/home/bob readonly off default
246pool/home/bob zoned off default
247pool/home/bob snapdir hidden default
248pool/home/bob acltype off default
249pool/home/bob aclmode discard default
250pool/home/bob aclinherit restricted default
251pool/home/bob canmount on default
252pool/home/bob xattr on default
253pool/home/bob copies 1 default
254pool/home/bob version 4 -
255pool/home/bob utf8only off -
256pool/home/bob normalization none -
257pool/home/bob casesensitivity sensitive -
258pool/home/bob vscan off default
259pool/home/bob nbmand off default
260pool/home/bob sharesmb off default
261pool/home/bob refquota none default
262pool/home/bob refreservation none default
263pool/home/bob primarycache all default
264pool/home/bob secondarycache all default
265pool/home/bob usedbysnapshots 0 -
266pool/home/bob usedbydataset 21K -
267pool/home/bob usedbychildren 0 -
268pool/home/bob usedbyrefreservation 0 -
269.Ed
270.Pp
271The following command gets a single property value:
272.Bd -literal -compact -offset Ds
273.No # Nm zfs Cm get Fl H o Sy value compression Ar pool/home/bob
274on
275.Ed
276.Pp
277The following command lists all properties with local settings for
278.Ar pool/home/bob :
279.Bd -literal -compact -offset Ds
280.No # Nm zfs Cm get Fl r s Sy local Fl o Sy name , Ns Sy property , Ns Sy value all Ar pool/home/bob
281NAME PROPERTY VALUE
282pool/home/bob quota 20G
283pool/home/bob compression on
284.Ed
285.
286.Ss Example 5 : No Inheriting ZFS Properties
287The following command causes
288.Ar pool/home/bob No and Ar pool/home/anne
289to inherit the
290.Sy checksum
291property from their parent.
292.Dl # Nm zfs Cm inherit Sy checksum Ar pool/home/bob pool/home/anne
293.
294.Ss Example 6 : No Setting User Properties
295The following example sets the user-defined
296.Ar com.example : Ns Ar department
297property for a dataset:
298.Dl # Nm zfs Cm set Ar com.example : Ns Ar department Ns = Ns Ar 12345 tank/accounting
299.
300.Ss Example 7 : No Setting sharenfs Property Options on a ZFS File System
301The following commands show how to set
302.Sy sharenfs
303property options to enable read-write
304access for a set of IP addresses and to enable root access for system
305.Qq neo
306on the
307.Ar tank/home
308file system:
309.Dl # Nm zfs Cm set Sy sharenfs Ns = Ns ' Ns Ar rw Ns =@123.123.0.0/16:[::1],root= Ns Ar neo Ns ' tank/home
310.Pp
311If you are using DNS for host name resolution,
312specify the fully-qualified hostname.
313.
870fc32f 314.Sh SEE ALSO
2badb345
AZ
315.Xr zfsprops 7 ,
316.Xr zfs-list 8