xref: /freebsd/sys/contrib/openzfs/man/man8/zfs.8 (revision 61145dc2b94f12f6a47344fb9aac702321880e43)
1*61145dc2SMartin Matuska.\" SPDX-License-Identifier: CDDL-1.0
2eda14cbcSMatt Macy.\"
3eda14cbcSMatt Macy.\" CDDL HEADER START
4eda14cbcSMatt Macy.\"
5eda14cbcSMatt Macy.\" The contents of this file are subject to the terms of the
6eda14cbcSMatt Macy.\" Common Development and Distribution License (the "License").
7eda14cbcSMatt Macy.\" You may not use this file except in compliance with the License.
8eda14cbcSMatt Macy.\"
9eda14cbcSMatt Macy.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10271171e0SMartin Matuska.\" or https://opensource.org/licenses/CDDL-1.0.
11eda14cbcSMatt Macy.\" See the License for the specific language governing permissions
12eda14cbcSMatt Macy.\" and limitations under the License.
13eda14cbcSMatt Macy.\"
14eda14cbcSMatt Macy.\" When distributing Covered Code, include this CDDL HEADER in each
15eda14cbcSMatt Macy.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16eda14cbcSMatt Macy.\" If applicable, add the following below this CDDL HEADER, with the
17eda14cbcSMatt Macy.\" fields enclosed by brackets "[]" replaced with your own identifying
18eda14cbcSMatt Macy.\" information: Portions Copyright [yyyy] [name of copyright owner]
19eda14cbcSMatt Macy.\"
20eda14cbcSMatt Macy.\" CDDL HEADER END
21eda14cbcSMatt Macy.\"
22eda14cbcSMatt Macy.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
23eda14cbcSMatt Macy.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
24eda14cbcSMatt Macy.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
25eda14cbcSMatt Macy.\" Copyright (c) 2011, Pawel Jakub Dawidek <pjd@FreeBSD.org>
26eda14cbcSMatt Macy.\" Copyright (c) 2012, Glen Barber <gjb@FreeBSD.org>
27eda14cbcSMatt Macy.\" Copyright (c) 2012, Bryan Drewery <bdrewery@FreeBSD.org>
28eda14cbcSMatt Macy.\" Copyright (c) 2013, Steven Hartland <smh@FreeBSD.org>
29eda14cbcSMatt Macy.\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
30eda14cbcSMatt Macy.\" Copyright (c) 2014, Joyent, Inc. All rights reserved.
31eda14cbcSMatt Macy.\" Copyright (c) 2014 by Adam Stevko. All rights reserved.
32eda14cbcSMatt Macy.\" Copyright (c) 2014 Integros [integros.com]
33eda14cbcSMatt Macy.\" Copyright (c) 2014, Xin LI <delphij@FreeBSD.org>
34eda14cbcSMatt Macy.\" Copyright (c) 2014-2015, The FreeBSD Foundation, All Rights Reserved.
35eda14cbcSMatt Macy.\" Copyright (c) 2016 Nexenta Systems, Inc. All Rights Reserved.
36eda14cbcSMatt Macy.\" Copyright 2019 Richard Laager. All rights reserved.
37eda14cbcSMatt Macy.\" Copyright 2018 Nexenta Systems, Inc.
38eda14cbcSMatt Macy.\" Copyright 2019 Joyent, Inc.
39eda14cbcSMatt Macy.\"
40716fd348SMartin Matuska.Dd May 12, 2022
41eda14cbcSMatt Macy.Dt ZFS 8
42eda14cbcSMatt Macy.Os
4316038816SMartin Matuska.
44eda14cbcSMatt Macy.Sh NAME
45eda14cbcSMatt Macy.Nm zfs
4616038816SMartin Matuska.Nd configure ZFS datasets
47eda14cbcSMatt Macy.Sh SYNOPSIS
48eda14cbcSMatt Macy.Nm
49eda14cbcSMatt Macy.Fl ?V
50eda14cbcSMatt Macy.Nm
51eda14cbcSMatt Macy.Cm version
52ce4dcb97SMartin Matuska.Op Fl j
53eda14cbcSMatt Macy.Nm
5416038816SMartin Matuska.Cm subcommand
5516038816SMartin Matuska.Op Ar arguments
5616038816SMartin Matuska.
57eda14cbcSMatt Macy.Sh DESCRIPTION
58eda14cbcSMatt MacyThe
59eda14cbcSMatt Macy.Nm
60eda14cbcSMatt Macycommand configures ZFS datasets within a ZFS storage pool, as described in
61eda14cbcSMatt Macy.Xr zpool 8 .
62716fd348SMartin MatuskaA dataset is identified by a unique path within the ZFS namespace:
63eda14cbcSMatt Macy.Pp
64716fd348SMartin Matuska.D1 Ar pool Ns Oo Sy / Ns Ar component Oc Ns Sy / Ns Ar component
65716fd348SMartin Matuska.Pp
66716fd348SMartin Matuskafor example:
67716fd348SMartin Matuska.Pp
68716fd348SMartin Matuska.Dl rpool/var/log
69716fd348SMartin Matuska.Pp
70716fd348SMartin MatuskaThe maximum length of a dataset name is
71716fd348SMartin Matuska.Sy ZFS_MAX_DATASET_NAME_LEN No - 1
72716fd348SMartin MatuskaASCII characters (currently 255) satisfying
73716fd348SMartin Matuska.Sy [A-Za-z_.:/ -] .
74716fd348SMartin MatuskaAdditionally snapshots are allowed to contain a single
75716fd348SMartin Matuska.Sy @
76716fd348SMartin Matuskacharacter, while bookmarks are allowed to contain a single
77716fd348SMartin Matuska.Sy #
78716fd348SMartin Matuskacharacter.
79716fd348SMartin Matuska.Sy /
80716fd348SMartin Matuskais used as separator between components.
81716fd348SMartin MatuskaThe maximum amount of nesting allowed in a path is
82716fd348SMartin Matuska.Sy zfs_max_dataset_nesting
83716fd348SMartin Matuskalevels deep.
84716fd348SMartin MatuskaZFS tunables
85716fd348SMartin Matuska.Pq Sy zfs_*
86716fd348SMartin Matuskaare explained in
87716fd348SMartin Matuska.Xr zfs 4 .
88eda14cbcSMatt Macy.Pp
89eda14cbcSMatt MacyA dataset can be one of the following:
9016038816SMartin Matuska.Bl -tag -offset Ds -width "file system"
91eda14cbcSMatt Macy.It Sy file system
9216038816SMartin MatuskaCan be mounted within the standard system namespace and behaves like other file
93eda14cbcSMatt Macysystems.
9416038816SMartin MatuskaWhile ZFS file systems are designed to be POSIX-compliant, known issues exist
95eda14cbcSMatt Macythat prevent compliance in some cases.
96eda14cbcSMatt MacyApplications that depend on standards conformance might fail due to non-standard
97eda14cbcSMatt Macybehavior when checking file system free space.
98eda14cbcSMatt Macy.It Sy volume
99eda14cbcSMatt MacyA logical volume exported as a raw or block device.
100eda14cbcSMatt MacyThis type of dataset should only be used when a block device is required.
101eda14cbcSMatt MacyFile systems are typically used in most environments.
102eda14cbcSMatt Macy.It Sy snapshot
103eda14cbcSMatt MacyA read-only version of a file system or volume at a given point in time.
104eda14cbcSMatt MacyIt is specified as
105eda14cbcSMatt Macy.Ar filesystem Ns @ Ns Ar name
106eda14cbcSMatt Macyor
107eda14cbcSMatt Macy.Ar volume Ns @ Ns Ar name .
108eda14cbcSMatt Macy.It Sy bookmark
109eda14cbcSMatt MacyMuch like a
110eda14cbcSMatt Macy.Sy snapshot ,
111eda14cbcSMatt Macybut without the hold on on-disk data.
11216038816SMartin MatuskaIt can be used as the source of a send (but not for a receive).
11316038816SMartin MatuskaIt is specified as
114eda14cbcSMatt Macy.Ar filesystem Ns # Ns Ar name
115eda14cbcSMatt Macyor
116eda14cbcSMatt Macy.Ar volume Ns # Ns Ar name .
117eda14cbcSMatt Macy.El
118eda14cbcSMatt Macy.Pp
11916038816SMartin MatuskaSee
1203ff01b23SMartin Matuska.Xr zfsconcepts 7
12116038816SMartin Matuskafor details.
12216038816SMartin Matuska.
123eda14cbcSMatt Macy.Ss Properties
12416038816SMartin MatuskaProperties are divided into two types: native properties and user-defined
12516038816SMartin Matuska.Pq or Qq user
126eda14cbcSMatt Macyproperties.
127eda14cbcSMatt MacyNative properties either export internal statistics or control ZFS behavior.
128eda14cbcSMatt MacyIn addition, native properties are either editable or read-only.
129eda14cbcSMatt MacyUser properties have no effect on ZFS behavior, but you can use them to annotate
130eda14cbcSMatt Macydatasets in a way that is meaningful in your environment.
13116038816SMartin MatuskaFor more information about properties, see
1323ff01b23SMartin Matuska.Xr zfsprops 7 .
13316038816SMartin Matuska.
134eda14cbcSMatt Macy.Ss Encryption
135eda14cbcSMatt MacyEnabling the
136eda14cbcSMatt Macy.Sy encryption
137eda14cbcSMatt Macyfeature allows for the creation of encrypted filesystems and volumes.
138eda14cbcSMatt MacyZFS will encrypt file and zvol data, file attributes, ACLs, permission bits,
139eda14cbcSMatt Macydirectory listings, FUID mappings, and
14016038816SMartin Matuska.Sy userused Ns / Ns Sy groupused Ns / Ns Sy projectused
141eda14cbcSMatt Macydata.
14216038816SMartin MatuskaFor an overview of encryption, see
14316038816SMartin Matuska.Xr zfs-load-key 8 .
14416038816SMartin Matuska.
145eda14cbcSMatt Macy.Sh SUBCOMMANDS
146eda14cbcSMatt MacyAll subcommands that modify state are logged persistently to the pool in their
147eda14cbcSMatt Macyoriginal form.
148eda14cbcSMatt Macy.Bl -tag -width ""
149eda14cbcSMatt Macy.It Nm Fl ?
150eda14cbcSMatt MacyDisplays a help message.
151eda14cbcSMatt Macy.It Xo
152eda14cbcSMatt Macy.Nm
153eda14cbcSMatt Macy.Fl V , -version
154eda14cbcSMatt Macy.Xc
155eda14cbcSMatt Macy.It Xo
156eda14cbcSMatt Macy.Nm
157eda14cbcSMatt Macy.Cm version
158ce4dcb97SMartin Matuska.Op Fl j
159eda14cbcSMatt Macy.Xc
160eda14cbcSMatt MacyDisplays the software version of the
161eda14cbcSMatt Macy.Nm
162eda14cbcSMatt Macyuserland utility and the zfs kernel module.
163ce4dcb97SMartin MatuskaUse
164ce4dcb97SMartin Matuska.Fl j
165ce4dcb97SMartin Matuskaoption to output in JSON format.
166eda14cbcSMatt Macy.El
16716038816SMartin Matuska.
168eda14cbcSMatt Macy.Ss Dataset Management
169eda14cbcSMatt Macy.Bl -tag -width ""
170eda14cbcSMatt Macy.It Xr zfs-list 8
171eda14cbcSMatt MacyLists the property information for the given datasets in tabular form.
172eda14cbcSMatt Macy.It Xr zfs-create 8
173eda14cbcSMatt MacyCreates a new ZFS file system or volume.
174eda14cbcSMatt Macy.It Xr zfs-destroy 8
175eda14cbcSMatt MacyDestroys the given dataset(s), snapshot(s), or bookmark.
176eda14cbcSMatt Macy.It Xr zfs-rename 8
177eda14cbcSMatt MacyRenames the given dataset (filesystem or snapshot).
178eda14cbcSMatt Macy.It Xr zfs-upgrade 8
179eda14cbcSMatt MacyManage upgrading the on-disk version of filesystems.
180eda14cbcSMatt Macy.El
18116038816SMartin Matuska.
182eda14cbcSMatt Macy.Ss Snapshots
183eda14cbcSMatt Macy.Bl -tag -width ""
184eda14cbcSMatt Macy.It Xr zfs-snapshot 8
185eda14cbcSMatt MacyCreates snapshots with the given names.
186eda14cbcSMatt Macy.It Xr zfs-rollback 8
187eda14cbcSMatt MacyRoll back the given dataset to a previous snapshot.
18816038816SMartin Matuska.It Xr zfs-hold 8 Ns / Ns Xr zfs-release 8
189eda14cbcSMatt MacyAdd or remove a hold reference to the specified snapshot or snapshots.
190eda14cbcSMatt MacyIf a hold exists on a snapshot, attempts to destroy that snapshot by using the
191eda14cbcSMatt Macy.Nm zfs Cm destroy
192eda14cbcSMatt Macycommand return
19316038816SMartin Matuska.Sy EBUSY .
194eda14cbcSMatt Macy.It Xr zfs-diff 8
195eda14cbcSMatt MacyDisplay the difference between a snapshot of a given filesystem and another
196eda14cbcSMatt Macysnapshot of that filesystem from a later time or the current contents of the
197eda14cbcSMatt Macyfilesystem.
198eda14cbcSMatt Macy.El
19916038816SMartin Matuska.
200eda14cbcSMatt Macy.Ss Clones
201eda14cbcSMatt Macy.Bl -tag -width ""
202eda14cbcSMatt Macy.It Xr zfs-clone 8
203eda14cbcSMatt MacyCreates a clone of the given snapshot.
204eda14cbcSMatt Macy.It Xr zfs-promote 8
205eda14cbcSMatt MacyPromotes a clone file system to no longer be dependent on its
206eda14cbcSMatt Macy.Qq origin
207eda14cbcSMatt Macysnapshot.
208eda14cbcSMatt Macy.El
20916038816SMartin Matuska.
210eda14cbcSMatt Macy.Ss Send & Receive
211eda14cbcSMatt Macy.Bl -tag -width ""
212eda14cbcSMatt Macy.It Xr zfs-send 8
213eda14cbcSMatt MacyGenerate a send stream, which may be of a filesystem, and may be incremental
214eda14cbcSMatt Macyfrom a bookmark.
215eda14cbcSMatt Macy.It Xr zfs-receive 8
216eda14cbcSMatt MacyCreates a snapshot whose contents are as specified in the stream provided on
217eda14cbcSMatt Macystandard input.
218eda14cbcSMatt MacyIf a full stream is received, then a new file system is created as well.
219eda14cbcSMatt MacyStreams are created using the
220eda14cbcSMatt Macy.Xr zfs-send 8
221eda14cbcSMatt Macysubcommand, which by default creates a full stream.
222eda14cbcSMatt Macy.It Xr zfs-bookmark 8
223eda14cbcSMatt MacyCreates a new bookmark of the given snapshot or bookmark.
224eda14cbcSMatt MacyBookmarks mark the point in time when the snapshot was created, and can be used
225eda14cbcSMatt Macyas the incremental source for a
226eda14cbcSMatt Macy.Nm zfs Cm send
227eda14cbcSMatt Macycommand.
228eda14cbcSMatt Macy.It Xr zfs-redact 8
229eda14cbcSMatt MacyGenerate a new redaction bookmark.
230eda14cbcSMatt MacyThis feature can be used to allow clones of a filesystem to be made available on
231eda14cbcSMatt Macya remote system, in the case where their parent need not (or needs to not) be
232eda14cbcSMatt Macyusable.
233eda14cbcSMatt Macy.El
23416038816SMartin Matuska.
235eda14cbcSMatt Macy.Ss Properties
236eda14cbcSMatt Macy.Bl -tag -width ""
237eda14cbcSMatt Macy.It Xr zfs-get 8
238eda14cbcSMatt MacyDisplays properties for the given datasets.
239eda14cbcSMatt Macy.It Xr zfs-set 8
240eda14cbcSMatt MacySets the property or list of properties to the given value(s) for each dataset.
241eda14cbcSMatt Macy.It Xr zfs-inherit 8
242eda14cbcSMatt MacyClears the specified property, causing it to be inherited from an ancestor,
243eda14cbcSMatt Macyrestored to default if no ancestor has the property set, or with the
244eda14cbcSMatt Macy.Fl S
245eda14cbcSMatt Macyoption reverted to the received value if one exists.
246eda14cbcSMatt Macy.El
24716038816SMartin Matuska.
248eda14cbcSMatt Macy.Ss Quotas
249eda14cbcSMatt Macy.Bl -tag -width ""
25016038816SMartin Matuska.It Xr zfs-userspace 8 Ns / Ns Xr zfs-groupspace 8 Ns / Ns Xr zfs-projectspace 8
251eda14cbcSMatt MacyDisplays space consumed by, and quotas on, each user, group, or project
252eda14cbcSMatt Macyin the specified filesystem or snapshot.
253eda14cbcSMatt Macy.It Xr zfs-project 8
254716fd348SMartin MatuskaList, set, or clear project ID and/or inherit flag on the files or directories.
255eda14cbcSMatt Macy.El
25616038816SMartin Matuska.
257eda14cbcSMatt Macy.Ss Mountpoints
258eda14cbcSMatt Macy.Bl -tag -width ""
259eda14cbcSMatt Macy.It Xr zfs-mount 8
260eda14cbcSMatt MacyDisplays all ZFS file systems currently mounted, or mount ZFS filesystem
261eda14cbcSMatt Macyon a path described by its
262eda14cbcSMatt Macy.Sy mountpoint
263eda14cbcSMatt Macyproperty.
264eda14cbcSMatt Macy.It Xr zfs-unmount 8
265eda14cbcSMatt MacyUnmounts currently mounted ZFS file systems.
266eda14cbcSMatt Macy.El
26716038816SMartin Matuska.
268eda14cbcSMatt Macy.Ss Shares
269eda14cbcSMatt Macy.Bl -tag -width ""
270eda14cbcSMatt Macy.It Xr zfs-share 8
271eda14cbcSMatt MacyShares available ZFS file systems.
272eda14cbcSMatt Macy.It Xr zfs-unshare 8
273eda14cbcSMatt MacyUnshares currently shared ZFS file systems.
274eda14cbcSMatt Macy.El
27516038816SMartin Matuska.
276eda14cbcSMatt Macy.Ss Delegated Administration
277eda14cbcSMatt Macy.Bl -tag -width ""
278eda14cbcSMatt Macy.It Xr zfs-allow 8
279eda14cbcSMatt MacyDelegate permissions on the specified filesystem or volume.
280eda14cbcSMatt Macy.It Xr zfs-unallow 8
281eda14cbcSMatt MacyRemove delegated permissions on the specified filesystem or volume.
282eda14cbcSMatt Macy.El
28316038816SMartin Matuska.
284eda14cbcSMatt Macy.Ss Encryption
285eda14cbcSMatt Macy.Bl -tag -width ""
286eda14cbcSMatt Macy.It Xr zfs-change-key 8
287eda14cbcSMatt MacyAdd or change an encryption key on the specified dataset.
288eda14cbcSMatt Macy.It Xr zfs-load-key 8
289eda14cbcSMatt MacyLoad the key for the specified encrypted dataset, enabling access.
290eda14cbcSMatt Macy.It Xr zfs-unload-key 8
291716fd348SMartin MatuskaUnload a key for the specified dataset,
292716fd348SMartin Matuskaremoving the ability to access the dataset.
293eda14cbcSMatt Macy.El
29416038816SMartin Matuska.
295eda14cbcSMatt Macy.Ss Channel Programs
296eda14cbcSMatt Macy.Bl -tag -width ""
297eda14cbcSMatt Macy.It Xr zfs-program 8
298eda14cbcSMatt MacyExecute ZFS administrative operations
299eda14cbcSMatt Macyprogrammatically via a Lua script-language channel program.
300eda14cbcSMatt Macy.El
30116038816SMartin Matuska.
302eda14cbcSMatt Macy.Ss Jails
303eda14cbcSMatt Macy.Bl -tag -width ""
304eda14cbcSMatt Macy.It Xr zfs-jail 8
305eda14cbcSMatt MacyAttaches a filesystem to a jail.
306eda14cbcSMatt Macy.It Xr zfs-unjail 8
307eda14cbcSMatt MacyDetaches a filesystem from a jail.
308eda14cbcSMatt Macy.El
30916038816SMartin Matuska.
310eda14cbcSMatt Macy.Ss Waiting
311eda14cbcSMatt Macy.Bl -tag -width ""
312eda14cbcSMatt Macy.It Xr zfs-wait 8
313eda14cbcSMatt MacyWait for background activity in a filesystem to complete.
314eda14cbcSMatt Macy.El
31516038816SMartin Matuska.
316eda14cbcSMatt Macy.Sh EXIT STATUS
317eda14cbcSMatt MacyThe
318eda14cbcSMatt Macy.Nm
31916038816SMartin Matuskautility exits
32016038816SMartin Matuska.Sy 0
32116038816SMartin Matuskaon success,
32216038816SMartin Matuska.Sy 1
32316038816SMartin Matuskaif an error occurs, and
32416038816SMartin Matuska.Sy 2
32516038816SMartin Matuskaif invalid command line options were specified.
32616038816SMartin Matuska.
327eda14cbcSMatt Macy.Sh EXAMPLES
328da5137abSMartin Matuska.\" Examples 1, 4, 6, 7, 11, 14, 16 are shared with zfs-set.8.
329da5137abSMartin Matuska.\" Examples 1, 10 are shared with zfs-create.8.
330da5137abSMartin Matuska.\" Examples 2, 3, 10, 15 are also shared with zfs-snapshot.8.
331da5137abSMartin Matuska.\" Examples 3, 10, 15 are shared with zfs-destroy.8.
332da5137abSMartin Matuska.\" Examples 5 are shared with zfs-list.8.
333da5137abSMartin Matuska.\" Examples 8 are shared with zfs-rollback.8.
334da5137abSMartin Matuska.\" Examples 9, 10 are shared with zfs-clone.8.
335da5137abSMartin Matuska.\" Examples 10 are also shared with zfs-promote.8.
336da5137abSMartin Matuska.\" Examples 10, 15 also are shared with zfs-rename.8.
337da5137abSMartin Matuska.\" Examples 12, 13 are shared with zfs-send.8.
338da5137abSMartin Matuska.\" Examples 12, 13 are also shared with zfs-receive.8.
339da5137abSMartin Matuska.\" Examples 17, 18, 19, 20, 21 are shared with zfs-allow.8.
340da5137abSMartin Matuska.\" Examples 22 are shared with zfs-diff.8.
341da5137abSMartin Matuska.\" Examples 23 are shared with zfs-bookmark.8.
342da5137abSMartin Matuska.\" Make sure to update them omnidirectionally
343da5137abSMartin Matuska.Ss Example 1 : No Creating a ZFS File System Hierarchy
344eda14cbcSMatt MacyThe following commands create a file system named
34516038816SMartin Matuska.Ar pool/home
346eda14cbcSMatt Macyand a file system named
34716038816SMartin Matuska.Ar pool/home/bob .
348eda14cbcSMatt MacyThe mount point
349eda14cbcSMatt Macy.Pa /export/home
350eda14cbcSMatt Macyis set for the parent file system, and is automatically inherited by the child
351eda14cbcSMatt Macyfile system.
35216038816SMartin Matuska.Dl # Nm zfs Cm create Ar pool/home
35316038816SMartin Matuska.Dl # Nm zfs Cm set Sy mountpoint Ns = Ns Ar /export/home pool/home
35416038816SMartin Matuska.Dl # Nm zfs Cm create Ar pool/home/bob
35516038816SMartin Matuska.
356da5137abSMartin Matuska.Ss Example 2 : No Creating a ZFS Snapshot
357eda14cbcSMatt MacyThe following command creates a snapshot named
35816038816SMartin Matuska.Ar yesterday .
359eda14cbcSMatt MacyThis snapshot is mounted on demand in the
360eda14cbcSMatt Macy.Pa .zfs/snapshot
361eda14cbcSMatt Macydirectory at the root of the
36216038816SMartin Matuska.Ar pool/home/bob
363eda14cbcSMatt Macyfile system.
36416038816SMartin Matuska.Dl # Nm zfs Cm snapshot Ar pool/home/bob Ns @ Ns Ar yesterday
36516038816SMartin Matuska.
366da5137abSMartin Matuska.Ss Example 3 : No Creating and Destroying Multiple Snapshots
367eda14cbcSMatt MacyThe following command creates snapshots named
36816038816SMartin Matuska.Ar yesterday No of Ar pool/home
369eda14cbcSMatt Macyand all of its descendent file systems.
370eda14cbcSMatt MacyEach snapshot is mounted on demand in the
371eda14cbcSMatt Macy.Pa .zfs/snapshot
372eda14cbcSMatt Macydirectory at the root of its file system.
373eda14cbcSMatt MacyThe second command destroys the newly created snapshots.
37416038816SMartin Matuska.Dl # Nm zfs Cm snapshot Fl r Ar pool/home Ns @ Ns Ar yesterday
37516038816SMartin Matuska.Dl # Nm zfs Cm destroy Fl r Ar pool/home Ns @ Ns Ar yesterday
37616038816SMartin Matuska.
377da5137abSMartin Matuska.Ss Example 4 : No Disabling and Enabling File System Compression
378eda14cbcSMatt MacyThe following command disables the
379eda14cbcSMatt Macy.Sy compression
380eda14cbcSMatt Macyproperty for all file systems under
38116038816SMartin Matuska.Ar pool/home .
382eda14cbcSMatt MacyThe next command explicitly enables
383eda14cbcSMatt Macy.Sy compression
384eda14cbcSMatt Macyfor
38516038816SMartin Matuska.Ar pool/home/anne .
38616038816SMartin Matuska.Dl # Nm zfs Cm set Sy compression Ns = Ns Sy off Ar pool/home
38716038816SMartin Matuska.Dl # Nm zfs Cm set Sy compression Ns = Ns Sy on Ar pool/home/anne
38816038816SMartin Matuska.
389da5137abSMartin Matuska.Ss Example 5 : No Listing ZFS Datasets
390eda14cbcSMatt MacyThe following command lists all active file systems and volumes in the system.
39116038816SMartin MatuskaSnapshots are displayed if
39216038816SMartin Matuska.Sy listsnaps Ns = Ns Sy on .
393eda14cbcSMatt MacyThe default is
394eda14cbcSMatt Macy.Sy off .
395eda14cbcSMatt MacySee
3963ff01b23SMartin Matuska.Xr zpoolprops 7
397eda14cbcSMatt Macyfor more information on pool properties.
39816038816SMartin Matuska.Bd -literal -compact -offset Ds
39916038816SMartin Matuska.No # Nm zfs Cm list
400eda14cbcSMatt MacyNAME                      USED  AVAIL  REFER  MOUNTPOINT
401eda14cbcSMatt Macypool                      450K   457G    18K  /pool
402eda14cbcSMatt Macypool/home                 315K   457G    21K  /export/home
403eda14cbcSMatt Macypool/home/anne             18K   457G    18K  /export/home/anne
404eda14cbcSMatt Macypool/home/bob             276K   457G   276K  /export/home/bob
405eda14cbcSMatt Macy.Ed
40616038816SMartin Matuska.
407da5137abSMartin Matuska.Ss Example 6 : No Setting a Quota on a ZFS File System
408eda14cbcSMatt MacyThe following command sets a quota of 50 Gbytes for
40916038816SMartin Matuska.Ar pool/home/bob :
41016038816SMartin Matuska.Dl # Nm zfs Cm set Sy quota Ns = Ns Ar 50G pool/home/bob
41116038816SMartin Matuska.
412da5137abSMartin Matuska.Ss Example 7 : No Listing ZFS Properties
413eda14cbcSMatt MacyThe following command lists all properties for
41416038816SMartin Matuska.Ar pool/home/bob :
41516038816SMartin Matuska.Bd -literal -compact -offset Ds
41616038816SMartin Matuska.No # Nm zfs Cm get Sy all Ar pool/home/bob
417eda14cbcSMatt MacyNAME           PROPERTY              VALUE                  SOURCE
418eda14cbcSMatt Macypool/home/bob  type                  filesystem             -
419eda14cbcSMatt Macypool/home/bob  creation              Tue Jul 21 15:53 2009  -
420eda14cbcSMatt Macypool/home/bob  used                  21K                    -
421eda14cbcSMatt Macypool/home/bob  available             20.0G                  -
422eda14cbcSMatt Macypool/home/bob  referenced            21K                    -
423eda14cbcSMatt Macypool/home/bob  compressratio         1.00x                  -
424eda14cbcSMatt Macypool/home/bob  mounted               yes                    -
425eda14cbcSMatt Macypool/home/bob  quota                 20G                    local
426eda14cbcSMatt Macypool/home/bob  reservation           none                   default
427eda14cbcSMatt Macypool/home/bob  recordsize            128K                   default
428eda14cbcSMatt Macypool/home/bob  mountpoint            /pool/home/bob         default
429eda14cbcSMatt Macypool/home/bob  sharenfs              off                    default
430eda14cbcSMatt Macypool/home/bob  checksum              on                     default
431eda14cbcSMatt Macypool/home/bob  compression           on                     local
432eda14cbcSMatt Macypool/home/bob  atime                 on                     default
433eda14cbcSMatt Macypool/home/bob  devices               on                     default
434eda14cbcSMatt Macypool/home/bob  exec                  on                     default
435eda14cbcSMatt Macypool/home/bob  setuid                on                     default
436eda14cbcSMatt Macypool/home/bob  readonly              off                    default
437eda14cbcSMatt Macypool/home/bob  zoned                 off                    default
438eda14cbcSMatt Macypool/home/bob  snapdir               hidden                 default
439eda14cbcSMatt Macypool/home/bob  acltype               off                    default
440eda14cbcSMatt Macypool/home/bob  aclmode               discard                default
441eda14cbcSMatt Macypool/home/bob  aclinherit            restricted             default
442eda14cbcSMatt Macypool/home/bob  canmount              on                     default
443eda14cbcSMatt Macypool/home/bob  xattr                 on                     default
444eda14cbcSMatt Macypool/home/bob  copies                1                      default
445eda14cbcSMatt Macypool/home/bob  version               4                      -
446eda14cbcSMatt Macypool/home/bob  utf8only              off                    -
447eda14cbcSMatt Macypool/home/bob  normalization         none                   -
448eda14cbcSMatt Macypool/home/bob  casesensitivity       sensitive              -
449eda14cbcSMatt Macypool/home/bob  vscan                 off                    default
450eda14cbcSMatt Macypool/home/bob  nbmand                off                    default
451eda14cbcSMatt Macypool/home/bob  sharesmb              off                    default
452eda14cbcSMatt Macypool/home/bob  refquota              none                   default
453eda14cbcSMatt Macypool/home/bob  refreservation        none                   default
454eda14cbcSMatt Macypool/home/bob  primarycache          all                    default
455eda14cbcSMatt Macypool/home/bob  secondarycache        all                    default
456eda14cbcSMatt Macypool/home/bob  usedbysnapshots       0                      -
457eda14cbcSMatt Macypool/home/bob  usedbydataset         21K                    -
458eda14cbcSMatt Macypool/home/bob  usedbychildren        0                      -
459eda14cbcSMatt Macypool/home/bob  usedbyrefreservation  0                      -
460eda14cbcSMatt Macy.Ed
461eda14cbcSMatt Macy.Pp
46216038816SMartin MatuskaThe following command gets a single property value:
46316038816SMartin Matuska.Bd -literal -compact -offset Ds
46416038816SMartin Matuska.No # Nm zfs Cm get Fl H o Sy value compression Ar pool/home/bob
465eda14cbcSMatt Macyon
466eda14cbcSMatt Macy.Ed
46716038816SMartin Matuska.Pp
468eda14cbcSMatt MacyThe following command lists all properties with local settings for
46916038816SMartin Matuska.Ar pool/home/bob :
47016038816SMartin Matuska.Bd -literal -compact -offset Ds
47116038816SMartin Matuska.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
472eda14cbcSMatt MacyNAME           PROPERTY              VALUE
473eda14cbcSMatt Macypool/home/bob  quota                 20G
474eda14cbcSMatt Macypool/home/bob  compression           on
475eda14cbcSMatt Macy.Ed
47616038816SMartin Matuska.
477da5137abSMartin Matuska.Ss Example 8 : No Rolling Back a ZFS File System
478eda14cbcSMatt MacyThe following command reverts the contents of
47916038816SMartin Matuska.Ar pool/home/anne
480eda14cbcSMatt Macyto the snapshot named
48116038816SMartin Matuska.Ar yesterday ,
48216038816SMartin Matuskadeleting all intermediate snapshots:
48316038816SMartin Matuska.Dl # Nm zfs Cm rollback Fl r Ar pool/home/anne Ns @ Ns Ar yesterday
48416038816SMartin Matuska.
485da5137abSMartin Matuska.Ss Example 9 : No Creating a ZFS Clone
486eda14cbcSMatt MacyThe following command creates a writable file system whose initial contents are
487eda14cbcSMatt Macythe same as
48816038816SMartin Matuska.Ar pool/home/bob@yesterday .
48916038816SMartin Matuska.Dl # Nm zfs Cm clone Ar pool/home/bob@yesterday pool/clone
49016038816SMartin Matuska.
491da5137abSMartin Matuska.Ss Example 10 : No Promoting a ZFS Clone
492eda14cbcSMatt MacyThe following commands illustrate how to test out changes to a file system, and
493eda14cbcSMatt Macythen replace the original file system with the changed one, using clones, clone
494eda14cbcSMatt Macypromotion, and renaming:
49516038816SMartin Matuska.Bd -literal -compact -offset Ds
49616038816SMartin Matuska.No # Nm zfs Cm create Ar pool/project/production
497eda14cbcSMatt Macy  populate /pool/project/production with data
49816038816SMartin Matuska.No # Nm zfs Cm snapshot Ar pool/project/production Ns @ Ns Ar today
49916038816SMartin Matuska.No # Nm zfs Cm clone Ar pool/project/production@today pool/project/beta
500eda14cbcSMatt Macy  make changes to /pool/project/beta and test them
50116038816SMartin Matuska.No # Nm zfs Cm promote Ar pool/project/beta
50216038816SMartin Matuska.No # Nm zfs Cm rename Ar pool/project/production pool/project/legacy
50316038816SMartin Matuska.No # Nm zfs Cm rename Ar pool/project/beta pool/project/production
504eda14cbcSMatt Macy  once the legacy version is no longer needed, it can be destroyed
50516038816SMartin Matuska.No # Nm zfs Cm destroy Ar pool/project/legacy
506eda14cbcSMatt Macy.Ed
50716038816SMartin Matuska.
508da5137abSMartin Matuska.Ss Example 11 : No Inheriting ZFS Properties
509eda14cbcSMatt MacyThe following command causes
51016038816SMartin Matuska.Ar pool/home/bob No and Ar pool/home/anne
511eda14cbcSMatt Macyto inherit the
512eda14cbcSMatt Macy.Sy checksum
513eda14cbcSMatt Macyproperty from their parent.
51416038816SMartin Matuska.Dl # Nm zfs Cm inherit Sy checksum Ar pool/home/bob pool/home/anne
51516038816SMartin Matuska.
516da5137abSMartin Matuska.Ss Example 12 : No Remotely Replicating ZFS Data
517eda14cbcSMatt MacyThe following commands send a full stream and then an incremental stream to a
518eda14cbcSMatt Macyremote machine, restoring them into
519eda14cbcSMatt Macy.Em poolB/received/fs@a
520eda14cbcSMatt Macyand
521eda14cbcSMatt Macy.Em poolB/received/fs@b ,
522eda14cbcSMatt Macyrespectively.
523eda14cbcSMatt Macy.Em poolB
524eda14cbcSMatt Macymust contain the file system
525eda14cbcSMatt Macy.Em poolB/received ,
526eda14cbcSMatt Macyand must not initially contain
527eda14cbcSMatt Macy.Em poolB/received/fs .
52816038816SMartin Matuska.Bd -literal -compact -offset Ds
52916038816SMartin Matuska.No # Nm zfs Cm send Ar pool/fs@a |
53016038816SMartin Matuska.No "   " Nm ssh Ar host Nm zfs Cm receive Ar poolB/received/fs Ns @ Ns Ar a
53116038816SMartin Matuska.No # Nm zfs Cm send Fl i Ar a pool/fs@b |
53216038816SMartin Matuska.No "   " Nm ssh Ar host Nm zfs Cm receive Ar poolB/received/fs
533eda14cbcSMatt Macy.Ed
53416038816SMartin Matuska.
535da5137abSMartin Matuska.Ss Example 13 : No Using the Nm zfs Cm receive Fl d No Option
536eda14cbcSMatt MacyThe following command sends a full stream of
53716038816SMartin Matuska.Ar poolA/fsA/fsB@snap
538eda14cbcSMatt Macyto a remote machine, receiving it into
53916038816SMartin Matuska.Ar poolB/received/fsA/fsB@snap .
540eda14cbcSMatt MacyThe
54116038816SMartin Matuska.Ar fsA/fsB@snap
542eda14cbcSMatt Macyportion of the received snapshot's name is determined from the name of the sent
543eda14cbcSMatt Macysnapshot.
54416038816SMartin Matuska.Ar poolB
545eda14cbcSMatt Macymust contain the file system
54616038816SMartin Matuska.Ar poolB/received .
547eda14cbcSMatt MacyIf
54816038816SMartin Matuska.Ar poolB/received/fsA
549eda14cbcSMatt Macydoes not exist, it is created as an empty file system.
55016038816SMartin Matuska.Bd -literal -compact -offset Ds
55116038816SMartin Matuska.No # Nm zfs Cm send Ar poolA/fsA/fsB@snap |
55216038816SMartin Matuska.No "   " Nm ssh Ar host Nm zfs Cm receive Fl d Ar poolB/received
553eda14cbcSMatt Macy.Ed
55416038816SMartin Matuska.
555da5137abSMartin Matuska.Ss Example 14 : No Setting User Properties
556eda14cbcSMatt MacyThe following example sets the user-defined
55716038816SMartin Matuska.Ar com.example : Ns Ar department
55816038816SMartin Matuskaproperty for a dataset:
55916038816SMartin Matuska.Dl # Nm zfs Cm set Ar com.example : Ns Ar department Ns = Ns Ar 12345 tank/accounting
56016038816SMartin Matuska.
561da5137abSMartin Matuska.Ss Example 15 : No Performing a Rolling Snapshot
562eda14cbcSMatt MacyThe following example shows how to maintain a history of snapshots with a
563eda14cbcSMatt Macyconsistent naming scheme.
564eda14cbcSMatt MacyTo keep a week's worth of snapshots, the user destroys the oldest snapshot,
565eda14cbcSMatt Macyrenames the remaining snapshots, and then creates a new snapshot, as follows:
56616038816SMartin Matuska.Bd -literal -compact -offset Ds
56716038816SMartin Matuska.No # Nm zfs Cm destroy Fl r Ar pool/users@7daysago
56816038816SMartin Matuska.No # Nm zfs Cm rename Fl r Ar pool/users@6daysago No @ Ns Ar 7daysago
56916038816SMartin Matuska.No # Nm zfs Cm rename Fl r Ar pool/users@5daysago No @ Ns Ar 6daysago
57016038816SMartin Matuska.No # Nm zfs Cm rename Fl r Ar pool/users@4daysago No @ Ns Ar 5daysago
57116038816SMartin Matuska.No # Nm zfs Cm rename Fl r Ar pool/users@3daysago No @ Ns Ar 4daysago
57216038816SMartin Matuska.No # Nm zfs Cm rename Fl r Ar pool/users@2daysago No @ Ns Ar 3daysago
57316038816SMartin Matuska.No # Nm zfs Cm rename Fl r Ar pool/users@yesterday No @ Ns Ar 2daysago
57416038816SMartin Matuska.No # Nm zfs Cm rename Fl r Ar pool/users@today No @ Ns Ar yesterday
57516038816SMartin Matuska.No # Nm zfs Cm snapshot Fl r Ar pool/users Ns @ Ns Ar today
576eda14cbcSMatt Macy.Ed
57716038816SMartin Matuska.
578da5137abSMartin Matuska.Ss Example 16 : No Setting sharenfs Property Options on a ZFS File System
579eda14cbcSMatt MacyThe following commands show how to set
580eda14cbcSMatt Macy.Sy sharenfs
58116038816SMartin Matuskaproperty options to enable read-write
58216038816SMartin Matuskaaccess for a set of IP addresses and to enable root access for system
58316038816SMartin Matuska.Qq neo
584eda14cbcSMatt Macyon the
58516038816SMartin Matuska.Ar tank/home
58616038816SMartin Matuskafile system:
5876ba2210eSMartin Matuska.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
588eda14cbcSMatt Macy.Pp
58916038816SMartin MatuskaIf you are using DNS for host name resolution,
59016038816SMartin Matuskaspecify the fully-qualified hostname.
59116038816SMartin Matuska.
592da5137abSMartin Matuska.Ss Example 17 : No Delegating ZFS Administration Permissions on a ZFS Dataset
593eda14cbcSMatt MacyThe following example shows how to set permissions so that user
59416038816SMartin Matuska.Ar cindys
595eda14cbcSMatt Macycan create, destroy, mount, and take snapshots on
59616038816SMartin Matuska.Ar tank/cindys .
597eda14cbcSMatt MacyThe permissions on
59816038816SMartin Matuska.Ar tank/cindys
599eda14cbcSMatt Macyare also displayed.
60016038816SMartin Matuska.Bd -literal -compact -offset Ds
60116038816SMartin Matuska.No # Nm zfs Cm allow Sy cindys create , Ns Sy destroy , Ns Sy mount , Ns Sy snapshot Ar tank/cindys
60216038816SMartin Matuska.No # Nm zfs Cm allow Ar tank/cindys
603eda14cbcSMatt Macy---- Permissions on tank/cindys --------------------------------------
604eda14cbcSMatt MacyLocal+Descendent permissions:
605eda14cbcSMatt Macy        user cindys create,destroy,mount,snapshot
606eda14cbcSMatt Macy.Ed
607eda14cbcSMatt Macy.Pp
608eda14cbcSMatt MacyBecause the
60916038816SMartin Matuska.Ar tank/cindys
610eda14cbcSMatt Macymount point permission is set to 755 by default, user
61116038816SMartin Matuska.Ar cindys
612eda14cbcSMatt Macywill be unable to mount file systems under
61316038816SMartin Matuska.Ar tank/cindys .
614eda14cbcSMatt MacyAdd an ACE similar to the following syntax to provide mount point access:
61516038816SMartin Matuska.Dl # Cm chmod No A+user : Ns Ar cindys Ns :add_subdirectory:allow Ar /tank/cindys
61616038816SMartin Matuska.
617da5137abSMartin Matuska.Ss Example 18 : No Delegating Create Time Permissions on a ZFS Dataset
618eda14cbcSMatt MacyThe following example shows how to grant anyone in the group
61916038816SMartin Matuska.Ar staff
620eda14cbcSMatt Macyto create file systems in
62116038816SMartin Matuska.Ar tank/users .
622eda14cbcSMatt MacyThis syntax also allows staff members to destroy their own file systems, but not
623eda14cbcSMatt Macydestroy anyone else's file system.
624eda14cbcSMatt MacyThe permissions on
62516038816SMartin Matuska.Ar tank/users
626eda14cbcSMatt Macyare also displayed.
62716038816SMartin Matuska.Bd -literal -compact -offset Ds
62816038816SMartin Matuska.No # Nm zfs Cm allow Ar staff Sy create , Ns Sy mount Ar tank/users
62916038816SMartin Matuska.No # Nm zfs Cm allow Fl c Sy destroy Ar tank/users
63016038816SMartin Matuska.No # Nm zfs Cm allow Ar tank/users
631eda14cbcSMatt Macy---- Permissions on tank/users ---------------------------------------
632eda14cbcSMatt MacyPermission sets:
633eda14cbcSMatt Macy        destroy
634eda14cbcSMatt MacyLocal+Descendent permissions:
635eda14cbcSMatt Macy        group staff create,mount
636eda14cbcSMatt Macy.Ed
63716038816SMartin Matuska.
638da5137abSMartin Matuska.Ss Example 19 : No Defining and Granting a Permission Set on a ZFS Dataset
639eda14cbcSMatt MacyThe following example shows how to define and grant a permission set on the
64016038816SMartin Matuska.Ar tank/users
641eda14cbcSMatt Macyfile system.
642eda14cbcSMatt MacyThe permissions on
64316038816SMartin Matuska.Ar tank/users
644eda14cbcSMatt Macyare also displayed.
64516038816SMartin Matuska.Bd -literal -compact -offset Ds
64616038816SMartin Matuska.No # Nm zfs Cm allow Fl s No @ Ns Ar pset Sy create , Ns Sy destroy , Ns Sy snapshot , Ns Sy mount Ar tank/users
64716038816SMartin Matuska.No # Nm zfs Cm allow staff No @ Ns Ar pset tank/users
64816038816SMartin Matuska.No # Nm zfs Cm allow Ar tank/users
649eda14cbcSMatt Macy---- Permissions on tank/users ---------------------------------------
650eda14cbcSMatt MacyPermission sets:
651eda14cbcSMatt Macy        @pset create,destroy,mount,snapshot
652eda14cbcSMatt MacyLocal+Descendent permissions:
653eda14cbcSMatt Macy        group staff @pset
654eda14cbcSMatt Macy.Ed
65516038816SMartin Matuska.
656da5137abSMartin Matuska.Ss Example 20 : No Delegating Property Permissions on a ZFS Dataset
657eda14cbcSMatt MacyThe following example shows to grant the ability to set quotas and reservations
658eda14cbcSMatt Macyon the
65916038816SMartin Matuska.Ar users/home
660eda14cbcSMatt Macyfile system.
661eda14cbcSMatt MacyThe permissions on
66216038816SMartin Matuska.Ar users/home
663eda14cbcSMatt Macyare also displayed.
66416038816SMartin Matuska.Bd -literal -compact -offset Ds
66516038816SMartin Matuska.No # Nm zfs Cm allow Ar cindys Sy quota , Ns Sy reservation Ar users/home
66616038816SMartin Matuska.No # Nm zfs Cm allow Ar users/home
667eda14cbcSMatt Macy---- Permissions on users/home ---------------------------------------
668eda14cbcSMatt MacyLocal+Descendent permissions:
669eda14cbcSMatt Macy        user cindys quota,reservation
670eda14cbcSMatt Macycindys% zfs set quota=10G users/home/marks
671eda14cbcSMatt Macycindys% zfs get quota users/home/marks
672eda14cbcSMatt MacyNAME              PROPERTY  VALUE  SOURCE
673eda14cbcSMatt Macyusers/home/marks  quota     10G    local
674eda14cbcSMatt Macy.Ed
67516038816SMartin Matuska.
676da5137abSMartin Matuska.Ss Example 21 : No Removing ZFS Delegated Permissions on a ZFS Dataset
677eda14cbcSMatt MacyThe following example shows how to remove the snapshot permission from the
67816038816SMartin Matuska.Ar staff
679eda14cbcSMatt Macygroup on the
68016038816SMartin Matuska.Sy tank/users
681eda14cbcSMatt Macyfile system.
682eda14cbcSMatt MacyThe permissions on
68316038816SMartin Matuska.Sy tank/users
684eda14cbcSMatt Macyare also displayed.
68516038816SMartin Matuska.Bd -literal -compact -offset Ds
68616038816SMartin Matuska.No # Nm zfs Cm unallow Ar staff Sy snapshot Ar tank/users
68716038816SMartin Matuska.No # Nm zfs Cm allow Ar tank/users
688eda14cbcSMatt Macy---- Permissions on tank/users ---------------------------------------
689eda14cbcSMatt MacyPermission sets:
690eda14cbcSMatt Macy        @pset create,destroy,mount,snapshot
691eda14cbcSMatt MacyLocal+Descendent permissions:
692eda14cbcSMatt Macy        group staff @pset
693eda14cbcSMatt Macy.Ed
69416038816SMartin Matuska.
695da5137abSMartin Matuska.Ss Example 22 : No Showing the differences between a snapshot and a ZFS Dataset
696eda14cbcSMatt MacyThe following example shows how to see what has changed between a prior
697eda14cbcSMatt Macysnapshot of a ZFS dataset and its current state.
698eda14cbcSMatt MacyThe
699eda14cbcSMatt Macy.Fl F
700eda14cbcSMatt Macyoption is used to indicate type information for the files affected.
70116038816SMartin Matuska.Bd -literal -compact -offset Ds
70216038816SMartin Matuska.No # Nm zfs Cm diff Fl F Ar tank/test@before tank/test
703eda14cbcSMatt MacyM       /       /tank/test/
704eda14cbcSMatt MacyM       F       /tank/test/linked      (+1)
705eda14cbcSMatt MacyR       F       /tank/test/oldname -> /tank/test/newname
706eda14cbcSMatt Macy-       F       /tank/test/deleted
707eda14cbcSMatt Macy+       F       /tank/test/created
708eda14cbcSMatt MacyM       F       /tank/test/modified
709eda14cbcSMatt Macy.Ed
71016038816SMartin Matuska.
711da5137abSMartin Matuska.Ss Example 23 : No Creating a bookmark
712716fd348SMartin MatuskaThe following example creates a bookmark to a snapshot.
713716fd348SMartin MatuskaThis bookmark can then be used instead of a snapshot in send streams.
71416038816SMartin Matuska.Dl # Nm zfs Cm bookmark Ar rpool Ns @ Ns Ar snapshot rpool Ns # Ns Ar bookmark
71516038816SMartin Matuska.
716da5137abSMartin Matuska.Ss Example 24 : No Setting Sy sharesmb No Property Options on a ZFS File System
717eda14cbcSMatt MacyThe following example show how to share SMB filesystem through ZFS.
71816038816SMartin MatuskaNote that a user and their password must be given.
71916038816SMartin Matuska.Dl # Nm smbmount Ar //127.0.0.1/share_tmp /mnt/tmp Fl o No user=workgroup/turbo,password=obrut,uid=1000
720eda14cbcSMatt Macy.Pp
721eda14cbcSMatt MacyMinimal
72216038816SMartin Matuska.Pa /etc/samba/smb.conf
72316038816SMartin Matuskaconfiguration is required, as follows.
724eda14cbcSMatt Macy.Pp
72516038816SMartin MatuskaSamba will need to bind to the loopback interface for the ZFS utilities to
726eda14cbcSMatt Macycommunicate with Samba.
727eda14cbcSMatt MacyThis is the default behavior for most Linux distributions.
728eda14cbcSMatt Macy.Pp
729eda14cbcSMatt MacySamba must be able to authenticate a user.
73016038816SMartin MatuskaThis can be done in a number of ways
73116038816SMartin Matuska.Pq Xr passwd 5 , LDAP , Xr smbpasswd 5 , &c.\& .
73216038816SMartin MatuskaHow to do this is outside the scope of this document – refer to
733eda14cbcSMatt Macy.Xr smb.conf 5
73416038816SMartin Matuskafor more information.
735eda14cbcSMatt Macy.Pp
736eda14cbcSMatt MacySee the
73716038816SMartin Matuska.Sx USERSHARES
73816038816SMartin Matuskasection for all configuration options,
73916038816SMartin Matuskain case you need to modify any options of the share afterwards.
740eda14cbcSMatt MacyDo note that any changes done with the
741eda14cbcSMatt Macy.Xr net 8
74216038816SMartin Matuskacommand will be undone if the share is ever unshared (like via a reboot).
74316038816SMartin Matuska.
744eda14cbcSMatt Macy.Sh ENVIRONMENT VARIABLES
745e3aa18adSMartin Matuska.Bl -tag -width "ZFS_MODULE_TIMEOUT"
74615f0b8c3SMartin Matuska.It Sy ZFS_COLOR
74715f0b8c3SMartin MatuskaUse ANSI color in
74815f0b8c3SMartin Matuska.Nm zfs Cm diff
7492a58b312SMartin Matuskaand
7502a58b312SMartin Matuska.Nm zfs Cm list
75115f0b8c3SMartin Matuskaoutput.
75216038816SMartin Matuska.It Sy ZFS_MOUNT_HELPER
753eda14cbcSMatt MacyCause
75416038816SMartin Matuska.Nm zfs Cm mount
755eda14cbcSMatt Macyto use
75616038816SMartin Matuska.Xr mount 8
75716038816SMartin Matuskato mount ZFS datasets.
75816038816SMartin MatuskaThis option is provided for backwards compatibility with older ZFS versions.
759e3aa18adSMartin Matuska.
760716fd348SMartin Matuska.It Sy ZFS_SET_PIPE_MAX
761716fd348SMartin MatuskaTells
762716fd348SMartin Matuska.Nm zfs
763c6767dc1SMartin Matuskato set the maximum pipe size for sends/receives.
764716fd348SMartin MatuskaDisabled by default on Linux
765716fd348SMartin Matuskadue to an unfixed deadlock in Linux's pipe size handling code.
766e3aa18adSMartin Matuska.
767e3aa18adSMartin Matuska.\" Shared with zpool.8
768e3aa18adSMartin Matuska.It Sy ZFS_MODULE_TIMEOUT
769e3aa18adSMartin MatuskaTime, in seconds, to wait for
770e3aa18adSMartin Matuska.Pa /dev/zfs
771e3aa18adSMartin Matuskato appear.
772e3aa18adSMartin MatuskaDefaults to
773e3aa18adSMartin Matuska.Sy 10 ,
774e3aa18adSMartin Matuskamax
775e3aa18adSMartin Matuska.Sy 600 Pq 10 minutes .
776e3aa18adSMartin MatuskaIf
777e3aa18adSMartin Matuska.Pf < Sy 0 ,
778e3aa18adSMartin Matuskawait forever; if
779e3aa18adSMartin Matuska.Sy 0 ,
780e3aa18adSMartin Matuskadon't wait.
781716fd348SMartin Matuska.El
78216038816SMartin Matuska.
783eda14cbcSMatt Macy.Sh INTERFACE STABILITY
784eda14cbcSMatt Macy.Sy Committed .
78516038816SMartin Matuska.
786eda14cbcSMatt Macy.Sh SEE ALSO
787eda14cbcSMatt Macy.Xr attr 1 ,
788eda14cbcSMatt Macy.Xr gzip 1 ,
789eda14cbcSMatt Macy.Xr ssh 1 ,
790eda14cbcSMatt Macy.Xr chmod 2 ,
791eda14cbcSMatt Macy.Xr fsync 2 ,
792eda14cbcSMatt Macy.Xr stat 2 ,
793eda14cbcSMatt Macy.Xr write 2 ,
794eda14cbcSMatt Macy.Xr acl 5 ,
795eda14cbcSMatt Macy.Xr attributes 5 ,
796eda14cbcSMatt Macy.Xr exports 5 ,
7973ff01b23SMartin Matuska.Xr zfsconcepts 7 ,
7983ff01b23SMartin Matuska.Xr zfsprops 7 ,
799eda14cbcSMatt Macy.Xr exportfs 8 ,
800eda14cbcSMatt Macy.Xr mount 8 ,
801eda14cbcSMatt Macy.Xr net 8 ,
802eda14cbcSMatt Macy.Xr selinux 8 ,
803ac0bf12eSMatt Macy.Xr zfs-allow 8 ,
804ac0bf12eSMatt Macy.Xr zfs-bookmark 8 ,
805ac0bf12eSMatt Macy.Xr zfs-change-key 8 ,
806ac0bf12eSMatt Macy.Xr zfs-clone 8 ,
807ac0bf12eSMatt Macy.Xr zfs-create 8 ,
808ac0bf12eSMatt Macy.Xr zfs-destroy 8 ,
809ac0bf12eSMatt Macy.Xr zfs-diff 8 ,
810ac0bf12eSMatt Macy.Xr zfs-get 8 ,
811ac0bf12eSMatt Macy.Xr zfs-groupspace 8 ,
812ac0bf12eSMatt Macy.Xr zfs-hold 8 ,
813ac0bf12eSMatt Macy.Xr zfs-inherit 8 ,
814ac0bf12eSMatt Macy.Xr zfs-jail 8 ,
815ac0bf12eSMatt Macy.Xr zfs-list 8 ,
816ac0bf12eSMatt Macy.Xr zfs-load-key 8 ,
817ac0bf12eSMatt Macy.Xr zfs-mount 8 ,
818ac0bf12eSMatt Macy.Xr zfs-program 8 ,
819ac0bf12eSMatt Macy.Xr zfs-project 8 ,
820ac0bf12eSMatt Macy.Xr zfs-projectspace 8 ,
821ac0bf12eSMatt Macy.Xr zfs-promote 8 ,
822ac0bf12eSMatt Macy.Xr zfs-receive 8 ,
823ac0bf12eSMatt Macy.Xr zfs-redact 8 ,
824ac0bf12eSMatt Macy.Xr zfs-release 8 ,
825ac0bf12eSMatt Macy.Xr zfs-rename 8 ,
826ac0bf12eSMatt Macy.Xr zfs-rollback 8 ,
827ac0bf12eSMatt Macy.Xr zfs-send 8 ,
828ac0bf12eSMatt Macy.Xr zfs-set 8 ,
829ac0bf12eSMatt Macy.Xr zfs-share 8 ,
830ac0bf12eSMatt Macy.Xr zfs-snapshot 8 ,
831ac0bf12eSMatt Macy.Xr zfs-unallow 8 ,
832ac0bf12eSMatt Macy.Xr zfs-unjail 8 ,
833ac0bf12eSMatt Macy.Xr zfs-unload-key 8 ,
834ac0bf12eSMatt Macy.Xr zfs-unmount 8 ,
835ac0bf12eSMatt Macy.Xr zfs-unshare 8 ,
836ac0bf12eSMatt Macy.Xr zfs-upgrade 8 ,
837ac0bf12eSMatt Macy.Xr zfs-userspace 8 ,
838ac0bf12eSMatt Macy.Xr zfs-wait 8 ,
839eda14cbcSMatt Macy.Xr zpool 8
840