Lint most manpages

Reviewed-by: Richard Laager <rlaager@wiktel.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tony Nguyen <tony.nguyen@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12129
This commit is contained in:
наб 2021-05-27 02:46:40 +02:00 committed by Brian Behlendorf
parent 4a98300feb
commit f84fe3fc87
58 changed files with 2716 additions and 2698 deletions

View File

@ -1,21 +1,32 @@
.Dd July 5, 2019 .\"
.Dt ZVOL_WAIT 1 SMM .\" This file and its contents are supplied under the terms of the
.\" Common Development and Distribution License ("CDDL"), version 1.0.
.\" You may only use this file in accordance with the terms of version
.\" 1.0 of the CDDL.
.\"
.\" A full copy of the text of the CDDL should have accompanied this
.\" source. A copy of the CDDL is also available via the Internet at
.\" http://www.illumos.org/license/CDDL.
.\"
.Dd May 27, 2021
.Dt ZVOL_WAIT 1
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zvol_wait .Nm zvol_wait
.Nd Wait for ZFS volume links in .Nd wait for ZFS volume links to appear in /dev
.Em /dev
to be created.
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm .Nm
.
.Sh DESCRIPTION .Sh DESCRIPTION
When a ZFS pool is imported, ZFS will register each ZFS volume When a ZFS pool is imported, the volumes within it will appear as block devices.
(zvol) as a disk device with the system. As the disks are registered, As they're registered,
.Xr \fBudev 7\fR .Xr udev 7
will asynchronously create symlinks under asynchronously creates symlinks under
.Em /dev/zvol .Pa /dev/zvol
using the zvol's name. using the volumes' names.
.Nm .Nm
will wait for all those symlinks to be created before returning. will wait for all those symlinks to be created before exiting.
.
.Sh SEE ALSO .Sh SEE ALSO
.Xr \fBudev 7\fR .Xr udev 7

View File

@ -26,7 +26,7 @@
. .
.Sh NAME .Sh NAME
.Nm mount.zfs .Nm mount.zfs
.Nd mount a ZFS filesystem .Nd mount ZFS filesystem
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm .Nm
.Op Fl sfnvh .Op Fl sfnvh
@ -44,7 +44,7 @@ to mount filesystem snapshots and
ZFS filesystems, as well as by ZFS filesystems, as well as by
.Xr zfs 8 .Xr zfs 8
when the when the
.Ev Em $ZFS_MOUNT_HELPER .Sy ZFS_MOUNT_HELPER
environment variable is not set. environment variable is not set.
Users should should invoke either Users should should invoke either
.Xr mount 8 .Xr mount 8

View File

@ -8,7 +8,6 @@
.\" source. A copy of the CDDL is also available via the Internet at .\" source. A copy of the CDDL is also available via the Internet at
.\" http://www.illumos.org/license/CDDL. .\" http://www.illumos.org/license/CDDL.
.\" .\"
.\"
.\" Copyright 2012, Richard Lowe. .\" Copyright 2012, Richard Lowe.
.\" Copyright (c) 2012, 2019 by Delphix. All rights reserved. .\" Copyright (c) 2012, 2019 by Delphix. All rights reserved.
.\" Copyright 2017 Nexenta Systems, Inc. .\" Copyright 2017 Nexenta Systems, Inc.
@ -16,27 +15,29 @@
.\" Copyright (c) 2017 Intel Corporation. .\" Copyright (c) 2017 Intel Corporation.
.\" .\"
.Dd October 7, 2020 .Dd October 7, 2020
.Dt ZDB 8 SMM .Dt ZDB 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zdb .Nm zdb
.Nd display zpool debugging and consistency information .Nd display ZFS storage pool debugging and consistency information
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm .Nm
.Op Fl AbcdDFGhikLMPsvXYy .Op Fl AbcdDFGhikLMPsvXYy
.Op Fl e Oo Fl V Oc Op Fl p Ar path ... .Op Fl e Oo Fl V Oc Oo Fl p Ar path Oc Ns
.Op Fl I Ar inflight I/Os .Op Fl I Ar inflight I/Os
.Oo Fl o Ar var Ns = Ns Ar value Oc Ns ... .Oo Fl o Ar var Ns = Ns Ar value Oc Ns
.Op Fl t Ar txg .Op Fl t Ar txg
.Op Fl U Ar cache .Op Fl U Ar cache
.Op Fl x Ar dumpdir .Op Fl x Ar dumpdir
.Op Ar poolname[/dataset | objset ID] .Op Ar poolname Ns Op / Ns Ar dataset | objset ID
.Op Ar object | range ... .Op Ar object Ns | Ns Ar range Ns
.Nm .Nm
.Op Fl AdiPv .Op Fl AdiPv
.Op Fl e Oo Fl V Oc Op Fl p Ar path ... .Op Fl e Oo Fl V Oc Oo Fl p Ar path Oc Ns
.Op Fl U Ar cache .Op Fl U Ar cache
.Ar poolname[/dataset | objset ID] Op Ar object | range ... .Ar poolname Ns Op Ar / Ns Ar dataset | objset ID
.Op Ar object Ns | Ns Ar range Ns
.Nm .Nm
.Fl C .Fl C
.Op Fl A .Op Fl A
@ -44,7 +45,7 @@
.Nm .Nm
.Fl E .Fl E
.Op Fl A .Op Fl A
.Ar word0 Ns \&: Ns Ar word1 Ns :...: Ns Ar word15 .Ar word0 : Ns Ar word1 Ns :: Ns Ar word15
.Nm .Nm
.Fl l .Fl l
.Op Fl Aqu .Op Fl Aqu
@ -52,10 +53,10 @@
.Nm .Nm
.Fl m .Fl m
.Op Fl AFLPXY .Op Fl AFLPXY
.Op Fl e Oo Fl V Oc Op Fl p Ar path ... .Op Fl e Oo Fl V Oc Oo Fl p Ar path Oc Ns
.Op Fl t Ar txg .Op Fl t Ar txg
.Op Fl U Ar cache .Op Fl U Ar cache
.Ar poolname Op Ar vdev Op Ar metaslab ... .Ar poolname Op Ar vdev Oo Ar metaslab Oc Ns
.Nm .Nm
.Fl O .Fl O
.Ar dataset path .Ar dataset path
@ -65,15 +66,16 @@
.Nm .Nm
.Fl R .Fl R
.Op Fl A .Op Fl A
.Op Fl e Oo Fl V Oc Op Fl p Ar path ... .Op Fl e Oo Fl V Oc Oo Fl p Ar path Oc Ns
.Op Fl U Ar cache .Op Fl U Ar cache
.Ar poolname vdev Ns \&: Ns Ar offset Ns \&: Ns Ar [<lsize>/]<psize> Ns Op : Ns Ar flags .Ar poolname vdev : Ns Ar offset : Ns Oo Ar lsize Ns / Oc Ns Ar psize Ns Op : Ns Ar flags
.Nm .Nm
.Fl S .Fl S
.Op Fl AP .Op Fl AP
.Op Fl e Oo Fl V Oc Op Fl p Ar path ... .Op Fl e Oo Fl V Oc Oo Fl p Ar path Oc Ns
.Op Fl U Ar cache .Op Fl U Ar cache
.Ar poolname .Ar poolname
.
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Nm .Nm
@ -99,11 +101,11 @@ or
.Qq Sy @ .Qq Sy @
characters, it is interpreted as a pool name. characters, it is interpreted as a pool name.
The root dataset can be specified as The root dataset can be specified as
.Ar pool Ns / .Qq Ar pool Ns / .
.Pq pool name followed by a slash .
.Pp .Pp
When operating on an imported and active pool it is possible, though unlikely, When operating on an imported and active pool it is possible, though unlikely,
that zdb may interpret inconsistent pool data and behave erratically. that zdb may interpret inconsistent pool data and behave erratically.
.
.Sh OPTIONS .Sh OPTIONS
Display options: Display options:
.Bl -tag -width Ds .Bl -tag -width Ds
@ -143,27 +145,30 @@ those specific objects or ranges only.
.Pp .Pp
An object ID range is specified in terms of a colon-separated tuple of An object ID range is specified in terms of a colon-separated tuple of
the form the form
.Ao start Ac Ns : Ns Ao end Ac Ns Op Ns : Ns Ao flags Ac Ns . .Ao start Ac : Ns Ao end Ac Ns Op : Ns Ao flags Ac .
The fields The fields
.Ar start .Ar start
and and
.Ar end .Ar end
are integer object identifiers that denote the upper and lower bounds are integer object identifiers that denote the upper and lower bounds
of the range. An of the range.
An
.Ar end .Ar end
value of -1 specifies a range with no upper bound. The value of -1 specifies a range with no upper bound.
The
.Ar flags .Ar flags
field optionally specifies a set of flags, described below, that control field optionally specifies a set of flags, described below, that control
which object types are dumped. By default, all object types are dumped. A minus which object types are dumped.
sign By default, all object types are dumped.
A minus sign
.Pq - .Pq -
negates the effect of the flag that follows it and has no effect unless negates the effect of the flag that follows it and has no effect unless
preceded by the preceded by the
.Ar A .Ar A
flag. For example, the range 0:-1:A-d will dump all object types except flag.
for directories. For example, the range 0:-1:A-d will dump all object types except for directories.
.Pp .Pp
.Bl -tag -compact .Bl -tag -compact -width Ds
.It Sy A .It Sy A
Dump all objects (this is the default) Dump all objects (this is the default)
.It Sy d .It Sy d
@ -198,7 +203,7 @@ Display the statistics independently for each deduplication table.
Dump the contents of the deduplication tables describing duplicate blocks. Dump the contents of the deduplication tables describing duplicate blocks.
.It Fl DDDDD .It Fl DDDDD
Also dump the contents of the deduplication tables describing unique blocks. Also dump the contents of the deduplication tables describing unique blocks.
.It Fl E Ar word0 Ns \&: Ns Ar word1 Ns :...: Ns Ar word15 .It Fl E Ar word0 : Ns Ar word1 Ns :: Ns Ar word15
Decode and display block from an embedded block pointer specified by the Decode and display block from an embedded block pointer specified by the
.Ar word .Ar word
arguments. arguments.
@ -218,18 +223,21 @@ Note, the on disk format of the pool is not reverted to the checkpointed state.
Read the vdev labels and L2ARC header from the specified device. Read the vdev labels and L2ARC header from the specified device.
.Nm Fl l .Nm Fl l
will return 0 if valid label was found, 1 if error occurred, and 2 if no valid will return 0 if valid label was found, 1 if error occurred, and 2 if no valid
labels were found. The presence of L2ARC header is indicated by a specific labels were found.
sequence (L2ARC_DEV_HDR_MAGIC). If there is an accounting error in the size The presence of L2ARC header is indicated by a specific
or the number of L2ARC log blocks sequence (L2ARC_DEV_HDR_MAGIC).
If there is an accounting error in the size or the number of L2ARC log blocks
.Nm Fl l .Nm Fl l
will return 1. Each unique configuration is displayed only will return 1.
once. Each unique configuration is displayed only once.
.It Fl ll Ar device .It Fl ll Ar device
In addition display label space usage stats. If a valid L2ARC header was found In addition display label space usage stats.
If a valid L2ARC header was found
also display the properties of log blocks used for restoring L2ARC contents also display the properties of log blocks used for restoring L2ARC contents
(persistent L2ARC). (persistent L2ARC).
.It Fl lll Ar device .It Fl lll Ar device
Display every configuration, unique or not. If a valid L2ARC header was found Display every configuration, unique or not.
If a valid L2ARC header was found
also display the properties of log entries in log blocks used for restoring also display the properties of log entries in log blocks used for restoring
L2ARC contents (persistent L2ARC). L2ARC contents (persistent L2ARC).
.Pp .Pp
@ -239,8 +247,8 @@ option is also specified, don't print the labels or the L2ARC header.
.Pp .Pp
If the If the
.Fl u .Fl u
option is also specified, also display the uberblocks on this device. Specify option is also specified, also display the uberblocks on this device.
multiple times to increase verbosity. Specify multiple times to increase verbosity.
.It Fl L .It Fl L
Disable leak detection and the loading of space maps. Disable leak detection and the loading of space maps.
By default, By default,
@ -291,7 +299,7 @@ This option can be combined with
.Fl v .Fl v
for increasing verbosity. for increasing verbosity.
.It Xo .It Xo
.Fl R Ar poolname vdev Ns \&: Ns Ar offset Ns \&: Ns Ar [<lsize>/]<psize> Ns Op : Ns Ar flags .Fl R Ar poolname vdev : Ns Ar offset : Ns Oo Ar lsize Ns / Oc Ns Ar psize Ns Op : Ns Ar flags
.Xc .Xc
Read and display a block from the specified device. Read and display a block from the specified device.
By default the block is displayed as a hex dump, but see the description of the By default the block is displayed as a hex dump, but see the description of the
@ -315,7 +323,8 @@ Print block pointer at hex offset
.It Sy c .It Sy c
Calculate and display checksums Calculate and display checksums
.It Sy d .It Sy d
Decompress the block. Set environment variable Decompress the block.
Set environment variable
.Nm ZDB_NO_ZLE .Nm ZDB_NO_ZLE
to skip zle when guessing. to skip zle when guessing.
.It Sy e .It Sy e
@ -352,7 +361,7 @@ Enable panic recovery, certain errors which would otherwise be fatal are
demoted to warnings. demoted to warnings.
.It Fl AAA .It Fl AAA
Do not abort if asserts fail and also enable panic recovery. Do not abort if asserts fail and also enable panic recovery.
.It Fl e Op Fl p Ar path ... .It Fl e Oo Fl p Ar path Oc Ns
Operate on an exported pool, not present in Operate on an exported pool, not present in
.Pa /etc/zfs/zpool.cache . .Pa /etc/zfs/zpool.cache .
The The
@ -382,14 +391,16 @@ The default value is 200.
This option affects the performance of the This option affects the performance of the
.Fl c .Fl c
option. option.
.It Fl o Ar var Ns = Ns Ar value ... .It Fl o Ar var Ns = Ns Ar value
Set the given global libzpool variable to the provided value. Set the given global libzpool variable to the provided value.
The value must be an unsigned 32-bit integer. The value must be an unsigned 32-bit integer.
Currently only little-endian systems are supported to avoid accidentally setting Currently only little-endian systems are supported to avoid accidentally setting
the high 32 bits of 64-bit variables. the high 32 bits of 64-bit variables.
.It Fl P .It Fl P
Print numbers in an unscaled form more amenable to parsing, eg. 1000000 rather Print numbers in an unscaled form more amenable to parsing, e.g.\&
than 1M. .Sy 1000000
rather than
.Sy 1M .
.It Fl t Ar transaction .It Fl t Ar transaction
Specify the highest transaction to use when searching for uberblocks. Specify the highest transaction to use when searching for uberblocks.
See also the See also the
@ -432,51 +443,51 @@ option, with more occurrences enabling more verbosity.
.Pp .Pp
If no options are specified, all information about the named pool will be If no options are specified, all information about the named pool will be
displayed at default verbosity. displayed at default verbosity.
.
.Sh EXAMPLES .Sh EXAMPLES
.Bl -tag -width Ds .Bl -tag -width Ds
.It Xo .It Xo
.Sy Example 1 .Sy Example 1 :
Display the configuration of imported pool Display the configuration of imported pool
.Pa rpool .Ar rpool
.Xc .Xc
.Bd -literal .Bd -literal
# zdb -C rpool .No # Nm zdb Fl C Ar rpool
MOS Configuration: MOS Configuration:
version: 28 version: 28
name: 'rpool' name: 'rpool'
...
.Ed .Ed
.It Xo .It Xo
.Sy Example 2 .Sy Example 2 :
Display basic dataset information about Display basic dataset information about
.Pa rpool .Ar rpool
.Xc .Xc
.Bd -literal .Bd -literal
# zdb -d rpool .No # Nm zdb Fl d Ar rpool
Dataset mos [META], ID 0, cr_txg 4, 26.9M, 1051 objects Dataset mos [META], ID 0, cr_txg 4, 26.9M, 1051 objects
Dataset rpool/swap [ZVOL], ID 59, cr_txg 356, 486M, 2 objects Dataset rpool/swap [ZVOL], ID 59, cr_txg 356, 486M, 2 objects
...
.Ed .Ed
.It Xo .It Xo
.Sy Example 3 .Sy Example 3 :
Display basic information about object 0 in Display basic information about object 0 in
.Pa rpool/export/home .Ar rpool/export/home
.Xc .Xc
.Bd -literal .Bd -literal
# zdb -d rpool/export/home 0 .No # Nm zdb Fl d Ar rpool/export/home 0
Dataset rpool/export/home [ZPL], ID 137, cr_txg 1546, 32K, 8 objects Dataset rpool/export/home [ZPL], ID 137, cr_txg 1546, 32K, 8 objects
Object lvl iblk dblk dsize lsize %full type Object lvl iblk dblk dsize lsize %full type
0 7 16K 16K 15.0K 16K 25.00 DMU dnode 0 7 16K 16K 15.0K 16K 25.00 DMU dnode
.Ed .Ed
.It Xo .It Xo
.Sy Example 4 .Sy Example 4 :
Display the predicted effect of enabling deduplication on Display the predicted effect of enabling deduplication on
.Pa rpool .Ar rpool
.Xc .Xc
.Bd -literal .Bd -literal
# zdb -S rpool .No # Nm zdb Fl S Ar rpool
Simulated DDT histogram: Simulated DDT histogram:
bucket allocated referenced bucket allocated referenced
@ -485,10 +496,11 @@ refcnt blocks LSIZE PSIZE DSIZE blocks LSIZE PSIZE DSIZE
------ ------ ----- ----- ----- ------ ----- ----- ----- ------ ------ ----- ----- ----- ------ ----- ----- -----
1 694K 27.1G 15.0G 15.0G 694K 27.1G 15.0G 15.0G 1 694K 27.1G 15.0G 15.0G 694K 27.1G 15.0G 15.0G
2 35.0K 1.33G 699M 699M 74.7K 2.79G 1.45G 1.45G 2 35.0K 1.33G 699M 699M 74.7K 2.79G 1.45G 1.45G
...
dedup = 1.11, compress = 1.80, copies = 1.00, dedup * compress / copies = 2.00 dedup = 1.11, compress = 1.80, copies = 1.00, dedup * compress / copies = 2.00
.Ed .Ed
.El .El
.
.Sh SEE ALSO .Sh SEE ALSO
.Xr zfs 8 , .Xr zfs 8 ,
.Xr zpool 8 .Xr zpool 8

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
@ -30,67 +29,69 @@
.\" Copyright 2018 Nexenta Systems, Inc. .\" Copyright 2018 Nexenta Systems, Inc.
.\" Copyright 2019 Joyent, Inc. .\" Copyright 2019 Joyent, Inc.
.\" .\"
.Dd June 30, 2019 .Dd May 27, 2021
.Dt ZFS-ALLOW 8 .Dt ZFS-ALLOW 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zfs-allow .Nm zfs-allow
.Nd Delegates ZFS administration permission for the file systems to non-privileged users. .Nd delegate ZFS administration permissions to unprivileged users
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zfs .Nm zfs
.Cm allow .Cm allow
.Op Fl dglu .Op Fl dglu
.Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ... .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns
.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
.Ar setname Oc Ns ... .Ar setname Oc Ns
.Ar filesystem Ns | Ns Ar volume .Ar filesystem Ns | Ns Ar volume
.Nm zfs .Nm zfs
.Cm allow .Cm allow
.Op Fl dl .Op Fl dl
.Fl e Ns | Ns Sy everyone .Fl e Ns | Ns Sy everyone
.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
.Ar setname Oc Ns ... .Ar setname Oc Ns
.Ar filesystem Ns | Ns Ar volume .Ar filesystem Ns | Ns Ar volume
.Nm zfs .Nm zfs
.Cm allow .Cm allow
.Fl c .Fl c
.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
.Ar setname Oc Ns ... .Ar setname Oc Ns
.Ar filesystem Ns | Ns Ar volume .Ar filesystem Ns | Ns Ar volume
.Nm zfs .Nm zfs
.Cm allow .Cm allow
.Fl s No @ Ns Ar setname .Fl s No @ Ns Ar setname
.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
.Ar setname Oc Ns ... .Ar setname Oc Ns
.Ar filesystem Ns | Ns Ar volume .Ar filesystem Ns | Ns Ar volume
.Nm zfs .Nm zfs
.Cm unallow .Cm unallow
.Op Fl dglru .Op Fl dglru
.Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ... .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns
.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
.Ar setname Oc Ns ... Oc .Ar setname Oc Ns Oc
.Ar filesystem Ns | Ns Ar volume .Ar filesystem Ns | Ns Ar volume
.Nm zfs .Nm zfs
.Cm unallow .Cm unallow
.Op Fl dlr .Op Fl dlr
.Fl e Ns | Ns Sy everyone .Fl e Ns | Ns Sy everyone
.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
.Ar setname Oc Ns ... Oc .Ar setname Oc Ns Oc
.Ar filesystem Ns | Ns Ar volume .Ar filesystem Ns | Ns Ar volume
.Nm zfs .Nm zfs
.Cm unallow .Cm unallow
.Op Fl r .Op Fl r
.Fl c .Fl c
.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
.Ar setname Oc Ns ... Oc .Ar setname Oc Ns Oc
.Ar filesystem Ns | Ns Ar volume .Ar filesystem Ns | Ns Ar volume
.Nm zfs .Nm zfs
.Cm unallow .Cm unallow
.Op Fl r .Op Fl r
.Fl s No @ Ns Ar setname .Fl s No @ Ns Ar setname
.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
.Ar setname Oc Ns ... Oc .Ar setname Oc Ns Oc
.Ar filesystem Ns | Ns Ar volume .Ar filesystem Ns | Ns Ar volume
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width "" .Bl -tag -width ""
.It Xo .It Xo
@ -119,9 +120,9 @@ command restricts modifications of the global namespace to the root user.
.Nm zfs .Nm zfs
.Cm allow .Cm allow
.Op Fl dglu .Op Fl dglu
.Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ... .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns
.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
.Ar setname Oc Ns ... .Ar setname Oc Ns
.Ar filesystem Ns | Ns Ar volume .Ar filesystem Ns | Ns Ar volume
.Xc .Xc
.It Xo .It Xo
@ -130,7 +131,7 @@ command restricts modifications of the global namespace to the root user.
.Op Fl dl .Op Fl dl
.Fl e Ns | Ns Sy everyone .Fl e Ns | Ns Sy everyone
.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
.Ar setname Oc Ns ... .Ar setname Oc Ns
.Ar filesystem Ns | Ns Ar volume .Ar filesystem Ns | Ns Ar volume
.Xc .Xc
Delegates ZFS administration permission for the file systems to non-privileged Delegates ZFS administration permission for the file systems to non-privileged
@ -140,15 +141,15 @@ users.
Allow only for the descendent file systems. Allow only for the descendent file systems.
.It Fl e Ns | Ns Sy everyone .It Fl e Ns | Ns Sy everyone
Specifies that the permissions be delegated to everyone. Specifies that the permissions be delegated to everyone.
.It Fl g Ar group Ns Oo , Ns Ar group Oc Ns ... .It Fl g Ar group Ns Oo , Ns Ar group Oc Ns
Explicitly specify that permissions are delegated to the group. Explicitly specify that permissions are delegated to the group.
.It Fl l .It Fl l
Allow Allow
.Qq locally .Qq locally
only for the specified file system. only for the specified file system.
.It Fl u Ar user Ns Oo , Ns Ar user Oc Ns ... .It Fl u Ar user Ns Oo , Ns Ar user Oc Ns
Explicitly specify that permissions are delegated to the user. Explicitly specify that permissions are delegated to the user.
.It Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ... .It Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns
Specifies to whom the permissions are delegated. Specifies to whom the permissions are delegated.
Multiple entities can be specified as a comma-separated list. Multiple entities can be specified as a comma-separated list.
If neither of the If neither of the
@ -169,7 +170,7 @@ To specify a group with the same name as a user, use the
options. options.
.It Xo .It Xo
.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
.Ar setname Oc Ns ... .Ar setname Oc Ns
.Xc .Xc
The permissions to delegate. The permissions to delegate.
Multiple permissions may be specified as a comma-separated list. Multiple permissions may be specified as a comma-separated list.
@ -191,95 +192,80 @@ file system or volume, and all of its descendents.
Permissions are generally the ability to use a ZFS subcommand or change a ZFS Permissions are generally the ability to use a ZFS subcommand or change a ZFS
property. property.
The following permissions are available: The following permissions are available:
.Bd -literal .TS
NAME TYPE NOTES l l l .
allow subcommand Must also have the permission that is NAME TYPE NOTES
being allowed _ _ _
bookmark subcommand allow subcommand Must also have the permission that is being allowed
clone subcommand Must also have the 'create' ability and bookmark subcommand
'mount' ability in the origin file system clone subcommand Must also have the \fBcreate\fR ability and \fBmount\fR ability in the origin file system
create subcommand Must also have the 'mount' ability. create subcommand Must also have the \fBmount\fR ability. Must also have the \fBrefreservation\fR ability to create a non-sparse volume.
Must also have the 'refreservation' ability to destroy subcommand Must also have the \fBmount\fR ability
create a non-sparse volume. diff subcommand Allows lookup of paths within a dataset given an object number, and the ability to create snapshots necessary to \fBzfs diff\fR.
destroy subcommand Must also have the 'mount' ability hold subcommand Allows adding a user hold to a snapshot
diff subcommand Allows lookup of paths within a dataset load subcommand Allows loading and unloading of encryption key (see \fBzfs load-key\fR and \fBzfs unload-key\fR).
given an object number, and the ability change subcommand Allows changing an encryption key via \fBzfs change-key\fR.
to create snapshots necessary to mount subcommand Allows mounting/umounting ZFS datasets
'zfs diff'. promote subcommand Must also have the \fBmount\fR and \fBpromote\fR ability in the origin file system
hold subcommand Allows adding a user hold to a snapshot receive subcommand Must also have the \fBmount\fR and \fBcreate\fR ability
load-key subcommand Allows loading and unloading of encryption key release subcommand Allows releasing a user hold which might destroy the snapshot
(see 'zfs load-key' and 'zfs unload-key'). rename subcommand Must also have the \fBmount\fR and \fBcreate\fR ability in the new parent
change-key subcommand Allows changing an encryption key via rollback subcommand Must also have the \fBmount\fR ability
'zfs change-key'. send subcommand
mount subcommand Allows mount/umount of ZFS datasets share subcommand Allows sharing file systems over NFS or SMB protocols
promote subcommand Must also have the 'mount' and 'promote' snapshot subcommand Must also have the \fBmount\fR ability
ability in the origin file system
receive subcommand Must also have the 'mount' and 'create'
ability
release subcommand Allows releasing a user hold which might
destroy the snapshot
rename subcommand Must also have the 'mount' and 'create'
ability in the new parent
rollback subcommand Must also have the 'mount' ability
send subcommand
share subcommand Allows sharing file systems over NFS
or SMB protocols
snapshot subcommand Must also have the 'mount' ability
groupquota other Allows accessing any groupquota@... groupquota other Allows accessing any \fBgroupquota@\fI...\fR property
property groupused other Allows reading any \fBgroupused@\fI...\fR property
groupused other Allows reading any groupused@... property userprop other Allows changing any user property
userprop other Allows changing any user property userquota other Allows accessing any \fBuserquota@\fI...\fR property
userquota other Allows accessing any userquota@... userused other Allows reading any \fBuserused@\fI...\fR property
property projectobjquota other Allows accessing any \fBprojectobjquota@\fI...\fR property
userused other Allows reading any userused@... property projectquota other Allows accessing any \fBprojectquota@\fI...\fR property
projectobjquota other Allows accessing any projectobjquota@... projectobjused other Allows reading any \fBprojectobjused@\fI...\fR property
property projectused other Allows reading any \fBprojectused@\fI...\fR property
projectquota other Allows accessing any projectquota@... property
projectobjused other Allows reading any projectobjused@... property
projectused other Allows reading any projectused@... property
aclinherit property aclinherit property
acltype property acltype property
atime property atime property
canmount property canmount property
casesensitivity property casesensitivity property
checksum property checksum property
compression property compression property
copies property copies property
devices property devices property
exec property exec property
filesystem_limit property filesystem_limit property
mountpoint property mountpoint property
nbmand property nbmand property
normalization property normalization property
primarycache property primarycache property
quota property quota property
readonly property readonly property
recordsize property recordsize property
refquota property refquota property
refreservation property refreservation property
reservation property reservation property
secondarycache property secondarycache property
setuid property setuid property
sharenfs property sharenfs property
sharesmb property sharesmb property
snapdir property snapdir property
snapshot_limit property snapshot_limit property
utf8only property utf8only property
version property version property
volblocksize property volblocksize property
volsize property volsize property
vscan property vscan property
xattr property xattr property
zoned property zoned property
.Ed .TE
.It Xo .It Xo
.Nm zfs .Nm zfs
.Cm allow .Cm allow
.Fl c .Fl c
.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
.Ar setname Oc Ns ... .Ar setname Oc Ns
.Ar filesystem Ns | Ns Ar volume .Ar filesystem Ns | Ns Ar volume
.Xc .Xc
Sets Sets
@ -293,7 +279,7 @@ to the creator of any newly-created descendent file system.
.Cm allow .Cm allow
.Fl s No @ Ns Ar setname .Fl s No @ Ns Ar setname
.Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns .Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
.Ar setname Oc Ns ... .Ar setname Oc Ns
.Ar filesystem Ns | Ns Ar volume .Ar filesystem Ns | Ns Ar volume
.Xc .Xc
Defines or adds permissions to a permission set. Defines or adds permissions to a permission set.
@ -309,9 +295,9 @@ and can be no more than 64 characters long.
.Nm zfs .Nm zfs
.Cm unallow .Cm unallow
.Op Fl dglru .Op Fl dglru
.Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns ... .Ar user Ns | Ns Ar group Ns Oo , Ns Ar user Ns | Ns Ar group Oc Ns
.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
.Ar setname Oc Ns ... Oc .Ar setname Oc Ns Oc
.Ar filesystem Ns | Ns Ar volume .Ar filesystem Ns | Ns Ar volume
.Xc .Xc
.It Xo .It Xo
@ -320,7 +306,7 @@ and can be no more than 64 characters long.
.Op Fl dlr .Op Fl dlr
.Fl e Ns | Ns Sy everyone .Fl e Ns | Ns Sy everyone
.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
.Ar setname Oc Ns ... Oc .Ar setname Oc Ns Oc
.Ar filesystem Ns | Ns Ar volume .Ar filesystem Ns | Ns Ar volume
.Xc .Xc
.It Xo .It Xo
@ -329,7 +315,7 @@ and can be no more than 64 characters long.
.Op Fl r .Op Fl r
.Fl c .Fl c
.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
.Ar setname Oc Ns ... Oc .Ar setname Oc Ns Oc
.Ar filesystem Ns | Ns Ar volume .Ar filesystem Ns | Ns Ar volume
.Xc .Xc
Removes permissions that were granted with the Removes permissions that were granted with the
@ -367,7 +353,7 @@ Recursively remove the permissions from this file system and all descendents.
.Op Fl r .Op Fl r
.Fl s No @ Ns Ar setname .Fl s No @ Ns Ar setname
.Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns .Oo Ar perm Ns | Ns @ Ns Ar setname Ns Oo , Ns Ar perm Ns | Ns @ Ns
.Ar setname Oc Ns ... Oc .Ar setname Oc Ns Oc
.Ar filesystem Ns | Ns Ar volume .Ar filesystem Ns | Ns Ar volume
.Xc .Xc
Removes permissions from a permission set. Removes permissions from a permission set.

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
@ -31,29 +30,28 @@
.\" Copyright 2019 Joyent, Inc. .\" Copyright 2019 Joyent, Inc.
.\" Copyright (c) 2019, 2020 by Christian Schwarz. All Rights Reserved. .\" Copyright (c) 2019, 2020 by Christian Schwarz. All Rights Reserved.
.\" .\"
.Dd June 30, 2019 .Dd May 27, 2021
.Dt ZFS-BOOKMARK 8 SMM .Dt ZFS-BOOKMARK 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zfs-bookmark .Nm zfs-bookmark
.Nd Creates a bookmark of the given snapshot. .Nd create bookmark of ZFS snapshot
.Sh SYNOPSIS .Sh SYNOPSIS
.Sh DESCRIPTION
.Bl -tag -width ""
.It Xo
.Nm zfs .Nm zfs
.Cm bookmark .Cm bookmark
.Ar snapshot Ns | Ns Ar bookmark newbookmark .Ar snapshot Ns | Ns Ar bookmark
.Xc .Ar newbookmark
.
.Sh DESCRIPTION
Creates a new bookmark of the given snapshot or bookmark. Creates a new bookmark of the given snapshot or bookmark.
Bookmarks mark the point in time when the snapshot was created, and can be used Bookmarks mark the point in time when the snapshot was created, and can be used
as the incremental source for a as the incremental source for a
.Xr zfs-send 8 .Nm zfs Cm send .
command.
.Pp .Pp
When creating a bookmark from an existing redaction bookmark, the resulting When creating a bookmark from an existing redaction bookmark, the resulting
bookmark is bookmark is
.Sy not .Em not
a redaction bookmark. a redaction bookmark.
.Pp .Pp
This feature must be enabled to be used. This feature must be enabled to be used.
@ -62,7 +60,7 @@ See
for details on ZFS feature flags and the for details on ZFS feature flags and the
.Sy bookmarks .Sy bookmarks
feature. feature.
.El .
.Sh SEE ALSO .Sh SEE ALSO
.Xr zfs-destroy 8 , .Xr zfs-destroy 8 ,
.Xr zfs-send 8 , .Xr zfs-send 8 ,

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
@ -30,35 +29,29 @@
.\" Copyright 2018 Nexenta Systems, Inc. .\" Copyright 2018 Nexenta Systems, Inc.
.\" Copyright 2019 Joyent, Inc. .\" Copyright 2019 Joyent, Inc.
.\" .\"
.Dd June 30, 2019 .Dd May 27, 2021
.Dt ZFS-CLONE 8 .Dt ZFS-CLONE 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zfs-clone .Nm zfs-clone
.Nd Creates a clone of the given snapshot. .Nd clone snapshot of ZFS dataset
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zfs .Nm zfs
.Cm clone .Cm clone
.Op Fl p .Op Fl p
.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Oo Fl o Ar property Ns = Ns Ar value Oc Ns
.Ar snapshot Ar filesystem Ns | Ns Ar volume .Ar snapshot Ar filesystem Ns | Ns Ar volume
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width ""
.It Xo
.Nm zfs
.Cm clone
.Op Fl p
.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
.Ar snapshot Ar filesystem Ns | Ns Ar volume
.Xc
See the See the
.Em Clones .Sx Clones
section of section of
.Xr zfsconcepts 8 .Xr zfsconcepts 8
for details. for details.
The target dataset can be located anywhere in the ZFS hierarchy, and is created The target dataset can be located anywhere in the ZFS hierarchy,
as the same type as the original. and is created as the same type as the original.
.Bl -tag -width "-o" .Bl -tag -width Ds
.It Fl o Ar property Ns = Ns Ar value .It Fl o Ar property Ns = Ns Ar value
Sets the specified property; see Sets the specified property; see
.Nm zfs Cm create .Nm zfs Cm create
@ -71,7 +64,7 @@ property inherited from their parent.
If the target filesystem or volume already exists, the operation completes If the target filesystem or volume already exists, the operation completes
successfully. successfully.
.El .El
.El .
.Sh SEE ALSO .Sh SEE ALSO
.Xr zfs-promote 8 , .Xr zfs-promote 8 ,
.Xr zfs-snapshot 8 .Xr zfs-snapshot 8

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
@ -33,28 +32,30 @@
.Dd December 1, 2020 .Dd December 1, 2020
.Dt ZFS-CREATE 8 .Dt ZFS-CREATE 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zfs-create .Nm zfs-create
.Nd Creates a new ZFS file system. .Nd create ZFS dataset
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zfs .Nm zfs
.Cm create .Cm create
.Op Fl Pnpuv .Op Fl Pnpuv
.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Oo Fl o Ar property Ns = Ns Ar value Oc Ns
.Ar filesystem .Ar filesystem
.Nm zfs .Nm zfs
.Cm create .Cm create
.Op Fl ps .Op Fl ps
.Op Fl b Ar blocksize .Op Fl b Ar blocksize
.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Oo Fl o Ar property Ns = Ns Ar value Oc Ns
.Fl V Ar size Ar volume .Fl V Ar size Ar volume
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width "" .Bl -tag -width ""
.It Xo .It Xo
.Nm zfs .Nm zfs
.Cm create .Cm create
.Op Fl Pnpuv .Op Fl Pnpuv
.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Oo Fl o Ar property Ns = Ns Ar value Oc Ns
.Ar filesystem .Ar filesystem
.Xc .Xc
Creates a new ZFS file system. Creates a new ZFS file system.
@ -134,7 +135,7 @@ Print verbose information about the created dataset.
.Cm create .Cm create
.Op Fl ps .Op Fl ps
.Op Fl b Ar blocksize .Op Fl b Ar blocksize
.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Oo Fl o Ar property Ns = Ns Ar value Oc Ns
.Fl V Ar size Ar volume .Fl V Ar size Ar volume
.Xc .Xc
Creates a volume of the given size. Creates a volume of the given size.
@ -234,14 +235,14 @@ Print verbose information about the created dataset.
.El .El
.El .El
.Ss ZFS Volumes as Swap .Ss ZFS Volumes as Swap
ZFS volumes may be used as swap devices. After creating the volume with the ZFS volumes may be used as swap devices.
After creating the volume with the
.Nm zfs Cm create Fl V .Nm zfs Cm create Fl V
command set up and enable the swap area using the enable the swap area using the
.Xr mkswap 8
and
.Xr swapon 8 .Xr swapon 8
commands. Do not swap to a file on a ZFS file system. A ZFS swap file command.
configuration is not supported. Swapping to files on ZFS filesystems is not supported.
.
.Sh SEE ALSO .Sh SEE ALSO
.Xr zfs-destroy 8 , .Xr zfs-destroy 8 ,
.Xr zfs-list 8 , .Xr zfs-list 8 ,

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
@ -33,9 +32,10 @@
.Dd June 30, 2019 .Dd June 30, 2019
.Dt ZFS-DESTROY 8 .Dt ZFS-DESTROY 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zfs-destroy .Nm zfs-destroy
.Nd Destroys the given dataset(s), snapshot(s), or bookmark. .Nd destroy ZFS dataset, snapshots, or bookmark
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zfs .Nm zfs
.Cm destroy .Cm destroy
@ -45,10 +45,11 @@
.Cm destroy .Cm destroy
.Op Fl Rdnprv .Op Fl Rdnprv
.Ar filesystem Ns | Ns Ar volume Ns @ Ns Ar snap Ns .Ar filesystem Ns | Ns Ar volume Ns @ Ns Ar snap Ns
.Oo % Ns Ar snap Ns Oo , Ns Ar snap Ns Oo % Ns Ar snap Oc Oc Oc Ns ... .Oo % Ns Ar snap Ns Oo , Ns Ar snap Ns Oo % Ns Ar snap Oc Oc Oc Ns
.Nm zfs .Nm zfs
.Cm destroy .Cm destroy
.Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark .Ar filesystem Ns | Ns Ar volume Ns # Ns Ar bookmark
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width "" .Bl -tag -width ""
.It Xo .It Xo
@ -67,9 +68,7 @@ dataset that has active dependents
Recursively destroy all dependents, including cloned file systems outside the Recursively destroy all dependents, including cloned file systems outside the
target hierarchy. target hierarchy.
.It Fl f .It Fl f
Force an unmount of any file systems using the Forcibly unmount file systems.
.Nm unmount Fl f
command.
This option has no effect on non-file systems or unmounted file systems. This option has no effect on non-file systems or unmounted file systems.
.It Fl n .It Fl n
Do a dry-run Do a dry-run
@ -100,10 +99,10 @@ behavior for mounted file systems in use.
.Cm destroy .Cm destroy
.Op Fl Rdnprv .Op Fl Rdnprv
.Ar filesystem Ns | Ns Ar volume Ns @ Ns Ar snap Ns .Ar filesystem Ns | Ns Ar volume Ns @ Ns Ar snap Ns
.Oo % Ns Ar snap Ns Oo , Ns Ar snap Ns Oo % Ns Ar snap Oc Oc Oc Ns ... .Oo % Ns Ar snap Ns Oo , Ns Ar snap Ns Oo % Ns Ar snap Oc Oc Oc Ns
.Xc .Xc
The given snapshots are destroyed immediately if and only if the The given snapshots are destroyed immediately if and only if the
.Ql zfs destroy .Nm zfs Cm destroy
command without the command without the
.Fl d .Fl d
option would have destroyed it. option would have destroyed it.
@ -138,8 +137,8 @@ If this flag is specified, the
.Fl d .Fl d
flag will have no effect. flag will have no effect.
.It Fl d .It Fl d
Destroy immediately. If a snapshot cannot be destroyed now, mark it for Destroy immediately.
deferred destruction. If a snapshot cannot be destroyed now, mark it for deferred destruction.
.It Fl n .It Fl n
Do a dry-run Do a dry-run
.Pq Qq No-op .Pq Qq No-op
@ -173,6 +172,7 @@ behavior for mounted file systems in use.
.Xc .Xc
The given bookmark is destroyed. The given bookmark is destroyed.
.El .El
.
.Sh SEE ALSO .Sh SEE ALSO
.Xr zfs-create 8 , .Xr zfs-create 8 ,
.Xr zfs-hold 8 .Xr zfs-hold 8

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
@ -30,25 +29,20 @@
.\" Copyright 2018 Nexenta Systems, Inc. .\" Copyright 2018 Nexenta Systems, Inc.
.\" Copyright 2019 Joyent, Inc. .\" Copyright 2019 Joyent, Inc.
.\" .\"
.Dd June 30, 2019 .Dd May 29, 2021
.Dt ZFS-DIFF 8 .Dt ZFS-DIFF 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zfs-diff .Nm zfs-diff
.Nd Display the difference between two snapshots of a given filesystem. .Nd show difference between ZFS snapshots
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zfs .Nm zfs
.Cm diff .Cm diff
.Op Fl FHt .Op Fl FHt
.Ar snapshot Ar snapshot Ns | Ns Ar filesystem .Ar snapshot Ar snapshot Ns | Ns Ar filesystem
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width ""
.It Xo
.Nm zfs
.Cm diff
.Op Fl FHt
.Ar snapshot Ar snapshot Ns | Ns Ar filesystem
.Xc
Display the difference between a snapshot of a given filesystem and another Display the difference between a snapshot of a given filesystem and another
snapshot of that filesystem from a later time or the current contents of the snapshot of that filesystem from a later time or the current contents of the
filesystem. filesystem.
@ -57,35 +51,48 @@ indicate pathname, new pathname
.Pq in case of rename , .Pq in case of rename ,
change in link count, and optionally file type and/or change time. change in link count, and optionally file type and/or change time.
The types of change are: The types of change are:
.Bd -literal .Bl -tag -compact -offset Ds -width "M"
- The path has been removed .It Sy -
+ The path has been created The path has been removed
M The path has been modified .It Sy +
R The path has been renamed The path has been created
.Ed .It Sy M
The path has been modified
.It Sy R
The path has been renamed
.El
.Bl -tag -width "-F" .Bl -tag -width "-F"
.It Fl F .It Fl F
Display an indication of the type of file, in a manner similar to the Display an indication of the type of file, in a manner similar to the
.Fl F .Fl F
option of option of
.Xr ls 1 . .Xr ls 1 .
.Bd -literal .Bl -tag -compact -offset 2n -width "B"
B Block device .It Sy B
C Character device Block device
/ Directory .It Sy C
> Door Character device
| Named pipe .It Sy /
@ Symbolic link Directory
P Event port .It Sy >
= Socket Door
F Regular file .It Sy |\&
.Ed Named pipe
.It Sy @
Symbolic link
.It Sy P
Event port
.It Sy =
Socket
.It Sy F
Regular file
.El
.It Fl H .It Fl H
Give more parsable tab-separated output, without header lines and without Give more parsable tab-separated output, without header lines and without
arrows. arrows.
.It Fl t .It Fl t
Display the path's inode change time as the first column of output. Display the path's inode change time as the first column of output.
.El .El
.El .
.Sh SEE ALSO .Sh SEE ALSO
.Xr zfs-snapshot 8 .Xr zfs-snapshot 8

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
@ -33,40 +32,42 @@
.Dd June 30, 2019 .Dd June 30, 2019
.Dt ZFS-HOLD 8 .Dt ZFS-HOLD 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zfs-hold .Nm zfs-hold
.Nd Hold a snapshot to prevent it being removed with the zfs destroy command. .Nd hold ZFS snapshots to prevent their removal
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zfs .Nm zfs
.Cm hold .Cm hold
.Op Fl r .Op Fl r
.Ar tag Ar snapshot Ns ... .Ar tag Ar snapshot Ns
.Nm zfs .Nm zfs
.Cm holds .Cm holds
.Op Fl rH .Op Fl rH
.Ar snapshot Ns ... .Ar snapshot Ns
.Nm zfs .Nm zfs
.Cm release .Cm release
.Op Fl r .Op Fl r
.Ar tag Ar snapshot Ns ... .Ar tag Ar snapshot Ns
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width "" .Bl -tag -width ""
.It Xo .It Xo
.Nm zfs .Nm zfs
.Cm hold .Cm hold
.Op Fl r .Op Fl r
.Ar tag Ar snapshot Ns ... .Ar tag Ar snapshot Ns
.Xc .Xc
Adds a single reference, named with the Adds a single reference, named with the
.Ar tag .Ar tag
argument, to the specified snapshot or snapshots. argument, to the specified snapshots.
Each snapshot has its own tag namespace, and tags must be unique within that Each snapshot has its own tag namespace, and tags must be unique within that
space. space.
.Pp .Pp
If a hold exists on a snapshot, attempts to destroy that snapshot by using the If a hold exists on a snapshot, attempts to destroy that snapshot by using the
.Nm zfs Cm destroy .Nm zfs Cm destroy
command return command return
.Er EBUSY . .Sy EBUSY .
.Bl -tag -width "-r" .Bl -tag -width "-r"
.It Fl r .It Fl r
Specifies that a hold with the given tag is applied recursively to the snapshots Specifies that a hold with the given tag is applied recursively to the snapshots
@ -76,7 +77,7 @@ of all descendent file systems.
.Nm zfs .Nm zfs
.Cm holds .Cm holds
.Op Fl rH .Op Fl rH
.Ar snapshot Ns ... .Ar snapshot Ns
.Xc .Xc
Lists all existing user references for the given snapshot or snapshots. Lists all existing user references for the given snapshot or snapshots.
.Bl -tag -width "-r" .Bl -tag -width "-r"
@ -90,7 +91,7 @@ Do not print headers, use tab-delimited output.
.Nm zfs .Nm zfs
.Cm release .Cm release
.Op Fl r .Op Fl r
.Ar tag Ar snapshot Ns ... .Ar tag Ar snapshot Ns
.Xc .Xc
Removes a single reference, named with the Removes a single reference, named with the
.Ar tag .Ar tag
@ -99,12 +100,13 @@ The tag must already exist for each snapshot.
If a hold exists on a snapshot, attempts to destroy that snapshot by using the If a hold exists on a snapshot, attempts to destroy that snapshot by using the
.Nm zfs Cm destroy .Nm zfs Cm destroy
command return command return
.Er EBUSY . .Sy EBUSY .
.Bl -tag -width "-r" .Bl -tag -width "-r"
.It Fl r .It Fl r
Recursively releases a hold with the given tag on the snapshots of all Recursively releases a hold with the given tag on the snapshots of all
descendent file systems. descendent file systems.
.El .El
.El .El
.
.Sh SEE ALSO .Sh SEE ALSO
.Xr zfs-destroy 8 .Xr zfs-destroy 8

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
@ -37,82 +36,87 @@
.\" Copyright 2018 Nexenta Systems, Inc. .\" Copyright 2018 Nexenta Systems, Inc.
.\" Copyright 2019 Joyent, Inc. .\" Copyright 2019 Joyent, Inc.
.\" .\"
.Dd December 9, 2019 .Dd May 27, 2021
.Dt ZFS-JAIL 8 .Dt ZFS-JAIL 8
.Os FreeBSD .Os
.
.Sh NAME .Sh NAME
.Nm zfs-jail .Nm zfs-jail
.Nd Attaches and detaches ZFS filesystems from FreeBSD jails. .Nd attach or detach ZFS filesystem from FreeBSD jail
.No A Tn ZFS
dataset can be attached to a jail by using the
.Qq Nm zfs jail
subcommand. You cannot attach a dataset to one jail and the children of the
same dataset to another jail. You can also not attach the root file system
of the jail or any dataset which needs to be mounted before the zfs rc script
is run inside the jail, as it would be attached unmounted until it is
mounted from the rc script inside the jail. To allow management of the
dataset from within a jail, the
.Sy jailed
property has to be set and the jail needs access to the
.Pa /dev/zfs
device. The
.Sy quota
property cannot be changed from within a jail. See
.Xr jail 8
for information on how to allow mounting
.Tn ZFS
datasets from within a jail.
.Pp
.No A Tn ZFS
dataset can be detached from a jail using the
.Qq Nm zfs unjail
subcommand.
.Pp
After a dataset is attached to a jail and the jailed property is set, a jailed
file system cannot be mounted outside the jail, since the jail administrator
might have set the mount point to an unacceptable value.
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zfs .Nm zfs Cm jail
.Cm jail .Ar jailid Ns | Ns Ar jailname
.Ar jailid Ns | Ns Ar jailname filesystem .Ar filesystem
.Nm zfs .Nm zfs Cm unjail
.Cm unjail .Ar jailid Ns | Ns Ar jailname
.Ar jailid Ns | Ns Ar jailname filesystem .Ar filesystem
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width "" .Bl -tag -width ""
.It Xo .It Xo
.Nm zfs .Nm zfs
.Cm jail .Cm jail
.Ar jailid filesystem .Ar jailid Ns | Ns Ar jailname
.Ar filesystem
.Xc .Xc
.Pp Attach the specified
Attaches the specified
.Ar filesystem .Ar filesystem
to the jail identified by JID to the jail identified by JID
.Ar jailid . .Ar jailid
or name
.Ar jailname .
From now on this file system tree can be managed from within a jail if the From now on this file system tree can be managed from within a jail if the
.Sy jailed .Sy jailed
property has been set. To use this functuinality, the jail needs the property has been set.
.Va allow.mount To use this functionality, the jail needs the
.Sy allow.mount
and and
.Va allow.mount.zfs .Sy allow.mount.zfs
parameters set to 1 and the parameters set to
.Va enforce_statfs .Sy 1
parameter set to a value lower than 2. and the
.Sy enforce_statfs
parameter set to a value lower than
.Sy 2 .
.Pp
You cannot attach a jailed dataset's children to another jail.
You can also not attach the root file system
of the jail or any dataset which needs to be mounted before the zfs rc script
is run inside the jail, as it would be attached unmounted until it is
mounted from the rc script inside the jail.
.Pp
To allow management of the dataset from within a jail, the
.Sy jailed
property has to be set and the jail needs access to the
.Pa /dev/zfs
device.
The
.Sy quota
property cannot be changed from within a jail.
.Pp
After a dataset is attached to a jail and the
.Sy jailed
property is set, a jailed file system cannot be mounted outside the jail,
since the jail administrator might have set the mount point to an unacceptable value.
.Pp .Pp
See See
.Xr jail 8 .Xr jail 8
for more information on managing jails and configuring the parameters above. for more information on managing jails.
Jails are a
.Fx
feature and are not relevant on other platforms.
.It Xo .It Xo
.Nm zfs .Nm zfs
.Cm unjail .Cm unjail
.Ar jailid filesystem .Ar jailid Ns | Ns Ar jailname
.Ar filesystem
.Xc .Xc
.Pp
Detaches the specified Detaches the specified
.Ar filesystem .Ar filesystem
from the jail identified by JID from the jail identified by JID
.Ar jailid . .Ar jailid
or name
.Ar jailname .
.El .El
.Sh SEE ALSO .Sh SEE ALSO
.Xr jail 8 , .Xr jail 8 ,

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
@ -30,35 +29,25 @@
.\" Copyright 2018 Nexenta Systems, Inc. .\" Copyright 2018 Nexenta Systems, Inc.
.\" Copyright 2019 Joyent, Inc. .\" Copyright 2019 Joyent, Inc.
.\" .\"
.Dd June 30, 2019 .Dd May 27, 2021
.Dt ZFS-LIST 8 .Dt ZFS-LIST 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zfs-list .Nm zfs-list
.Nd Lists the property information for the given datasets in tabular form. .Nd list properties of ZFS datasets
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zfs .Nm zfs
.Cm list .Cm list
.Op Fl r Ns | Ns Fl d Ar depth .Op Fl r Ns | Ns Fl d Ar depth
.Op Fl Hp .Op Fl Hp
.Oo Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... Oc .Oo Fl o Ar property Ns Oo , Ns Ar property Oc Ns Oc
.Oo Fl s Ar property Oc Ns ... .Oo Fl s Ar property Oc Ns
.Oo Fl S Ar property Oc Ns ... .Oo Fl S Ar property Oc Ns
.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns Oc
.Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Oc Ns ... .Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Oc Ns
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width ""
.It Xo
.Nm zfs
.Cm list
.Op Fl r Ns | Ns Fl d Ar depth
.Op Fl Hp
.Oo Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... Oc
.Oo Fl s Ar property Oc Ns ...
.Oo Fl S Ar property Oc Ns ...
.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc
.Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Oc Ns ...
.Xc
If specified, you can list property information by the absolute pathname or the If specified, you can list property information by the absolute pathname or the
relative pathname. relative pathname.
By default, all file systems and volumes are displayed. By default, all file systems and volumes are displayed.
@ -75,7 +64,7 @@ or
.Fl t Sy all .Fl t Sy all
options are specified. options are specified.
The following fields are displayed: The following fields are displayed:
.Sy name Ns \&, Sy used Ns \&, Sy available Ns \&, Sy referenced Ns \&, Sy mountpoint Ns . .Sy name , Sy used , Sy available , Sy referenced , Sy mountpoint .
.Bl -tag -width "-H" .Bl -tag -width "-H"
.It Fl H .It Fl H
Used for scripting mode. Used for scripting mode.
@ -96,10 +85,10 @@ will display only the dataset and its direct children.
.It Fl o Ar property .It Fl o Ar property
A comma-separated list of properties to display. A comma-separated list of properties to display.
The property must be: The property must be:
.Bl -bullet .Bl -bullet -compact
.It .It
One of the properties described in the One of the properties described in the
.Em Native Properties .Sx Native Properties
section of section of
.Xr zfsprops 8 .Xr zfsprops 8
.It .It
@ -113,10 +102,9 @@ The value
.Sy space .Sy space
to display space usage properties on file systems and volumes. to display space usage properties on file systems and volumes.
This is a shortcut for specifying This is a shortcut for specifying
.Fl o Sy name Ns \&, Ns Sy avail Ns \&, Ns Sy used Ns \&, Ns Sy usedsnap Ns \&, Ns .Fl o Ns \ \& Ns Sy name , Ns Sy avail , Ns Sy used , Ns Sy usedsnap , Ns
.Sy usedds Ns \&, Ns Sy usedrefreserv Ns \&, Ns Sy usedchild Fl t .Sy usedds , Ns Sy usedrefreserv , Ns Sy usedchild
.Sy filesystem Ns \&, Ns Sy volume .Fl t Sy filesystem , Ns Sy volume .
syntax.
.El .El
.It Fl p .It Fl p
Display numbers in parsable Display numbers in parsable
@ -128,7 +116,7 @@ Recursively display any children of the dataset on the command line.
A property for sorting the output by column in ascending order based on the A property for sorting the output by column in ascending order based on the
value of the property. value of the property.
The property must be one of the properties described in the The property must be one of the properties described in the
.Em Properties .Sx Properties
section of section of
.Xr zfsprops 8 .Xr zfsprops 8
or the value or the value
@ -141,7 +129,7 @@ Multiple
.Fl s .Fl s
options are evaluated from left to right in decreasing order of importance. options are evaluated from left to right in decreasing order of importance.
The following is a list of sorting criteria: The following is a list of sorting criteria:
.Bl -bullet .Bl -bullet -compact
.It .It
Numeric types sort in numeric order. Numeric types sort in numeric order.
.It .It
@ -168,7 +156,7 @@ For example, specifying
.Fl t Sy snapshot .Fl t Sy snapshot
displays only snapshots. displays only snapshots.
.El .El
.El .
.Sh SEE ALSO .Sh SEE ALSO
.Xr zfs-get 8 , .Xr zfs-get 8 ,
.Xr zfsprops 8 .Xr zfsprops 8

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
@ -33,19 +32,20 @@
.Dd January 13, 2020 .Dd January 13, 2020
.Dt ZFS-LOAD-KEY 8 .Dt ZFS-LOAD-KEY 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zfs-load-key .Nm zfs-load-key
.Nd Load, unload, or change the encryption key used to access a dataset. .Nd load, unload, or change encryption key of ZFS dataset
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zfs .Nm zfs
.Cm load-key .Cm load-key
.Op Fl nr .Op Fl nr
.Op Fl L Ar keylocation .Op Fl L Ar keylocation
.Fl a | Ar filesystem .Fl a Ns | Ns Ar filesystem
.Nm zfs .Nm zfs
.Cm unload-key .Cm unload-key
.Op Fl r .Op Fl r
.Fl a | Ar filesystem .Fl a Ns | Ns Ar filesystem
.Nm zfs .Nm zfs
.Cm change-key .Cm change-key
.Op Fl l .Op Fl l
@ -58,6 +58,7 @@
.Fl i .Fl i
.Op Fl l .Op Fl l
.Ar filesystem .Ar filesystem
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width "" .Bl -tag -width ""
.It Xo .It Xo
@ -65,22 +66,25 @@
.Cm load-key .Cm load-key
.Op Fl nr .Op Fl nr
.Op Fl L Ar keylocation .Op Fl L Ar keylocation
.Fl a | Ar filesystem .Fl a Ns | Ns Ar filesystem
.Xc .Xc
Load the key for Load the key for
.Ar filesystem , .Ar filesystem ,
allowing it and all children that inherit the allowing it and all children that inherit the
.Sy keylocation .Sy keylocation
property to be accessed. The key will be expected in the format specified by the property to be accessed.
The key will be expected in the format specified by the
.Sy keyformat .Sy keyformat
and location specified by the and location specified by the
.Sy keylocation .Sy keylocation
property. Note that if the property.
Note that if the
.Sy keylocation .Sy keylocation
is set to is set to
.Sy prompt .Sy prompt
the terminal will interactively wait for the key to be entered. Loading a key the terminal will interactively wait for the key to be entered.
will not automatically mount the dataset. If that functionality is desired, Loading a key will not automatically mount the dataset.
If that functionality is desired,
.Nm zfs Cm mount Fl l .Nm zfs Cm mount Fl l
will ask for the key and mount the dataset will ask for the key and mount the dataset
.Po .Po
@ -100,16 +104,19 @@ Loads the keys for all encryption roots in all imported pools.
.It Fl n .It Fl n
Do a dry-run Do a dry-run
.Pq Qq No-op .Pq Qq No-op
load-key. This will cause zfs to simply check that the .Cm load-key .
provided key is correct. This command may be run even if the key is already This will cause
loaded. .Nm zfs
to simply check that the provided key is correct.
This command may be run even if the key is already loaded.
.It Fl L Ar keylocation .It Fl L Ar keylocation
Use Use
.Ar keylocation .Ar keylocation
instead of the instead of the
.Sy keylocation .Sy keylocation
property. This will not change the value of the property on the dataset. Note property.
that if used with either This will not change the value of the property on the dataset.
Note that if used with either
.Fl r .Fl r
or or
.Fl a , .Fl a ,
@ -121,13 +128,14 @@ may only be given as
.Nm zfs .Nm zfs
.Cm unload-key .Cm unload-key
.Op Fl r .Op Fl r
.Fl a | Ar filesystem .Fl a Ns | Ns Ar filesystem
.Xc .Xc
Unloads a key from ZFS, removing the ability to access the dataset and all of Unloads a key from ZFS, removing the ability to access the dataset and all of
its children that inherit the its children that inherit the
.Sy keylocation .Sy keylocation
property. This requires that the dataset is not currently open or mounted. Once property.
the key is unloaded the This requires that the dataset is not currently open or mounted.
Once the key is unloaded the
.Sy keystatus .Sy keystatus
property will become property will become
.Sy unavailable . .Sy unavailable .
@ -154,15 +162,16 @@ Unloads the keys for all encryption roots in all imported pools.
.Op Fl l .Op Fl l
.Ar filesystem .Ar filesystem
.Xc .Xc
Changes the user's key (e.g. a passphrase) used to access a dataset. This Changes the user's key (e.g. a passphrase) used to access a dataset.
command requires that the existing key for the dataset is already loaded into This command requires that the existing key for the dataset is already loaded.
ZFS. This command may also be used to change the This command may also be used to change the
.Sy keylocation , .Sy keylocation ,
.Sy keyformat , .Sy keyformat ,
and and
.Sy pbkdf2iters .Sy pbkdf2iters
properties as needed. If the dataset was not previously an encryption root it properties as needed.
will become one. Alternatively, the If the dataset was not previously an encryption root it will become one.
Alternatively, the
.Fl i .Fl i
flag may be provided to cause an encryption root to inherit the parent's key flag may be provided to cause an encryption root to inherit the parent's key
instead. instead.
@ -171,36 +180,33 @@ If the user's key is compromised,
.Nm zfs Cm change-key .Nm zfs Cm change-key
does not necessarily protect existing or newly-written data from attack. does not necessarily protect existing or newly-written data from attack.
Newly-written data will continue to be encrypted with the same master key as Newly-written data will continue to be encrypted with the same master key as
the existing data. The master key is compromised if an attacker obtains a the existing data.
user key and the corresponding wrapped master key. Currently, The master key is compromised if an attacker obtains a
user key and the corresponding wrapped master key.
Currently,
.Nm zfs Cm change-key .Nm zfs Cm change-key
does not overwrite the previous wrapped master key on disk, so it is does not overwrite the previous wrapped master key on disk, so it is
accessible via forensic analysis for an indeterminate length of time. accessible via forensic analysis for an indeterminate length of time.
.Pp .Pp
In the event of a master key compromise, ideally the drives should be securely In the event of a master key compromise, ideally the drives should be securely
erased to remove all the old data (which is readable using the compromised erased to remove all the old data (which is readable using the compromised
master key), a new pool created, and the data copied back. This can be master key), a new pool created, and the data copied back.
approximated in place by creating new datasets, copying the data This can be approximated in place by creating new datasets, copying the data
(e.g. using .Pq e.g. using Nm zfs Cm send | Nm zfs Cm recv ,
.Nm zfs Cm send and then clearing the free space with
| .Nm zpool Cm trim Fl -secure
.Nm zfs Cm recv Ns
), and then clearing the free space with
.Nm zpool Cm trim --secure
if supported by your hardware, otherwise if supported by your hardware, otherwise
.Nm zpool Cm initialize Ns . .Nm zpool Cm initialize .
.Bl -tag -width "-r" .Bl -tag -width "-r"
.It Fl l .It Fl l
Ensures the key is loaded before attempting to change the key. This is Ensures the key is loaded before attempting to change the key.
effectively equivalent to This is effectively equivalent to runnin
.Qq Nm zfs Cm load-key Ar filesystem ; Nm zfs Cm change-key Ar filesystem .Nm zfs Cm load-key Ar filesystem ; Nm zfs Cm change-key Ar filesystem
.It Fl o Ar property Ns = Ns Ar value .It Fl o Ar property Ns = Ns Ar value
Allows the user to set encryption key properties ( Allows the user to set encryption key properties
.Sy keyformat , .Pq Sy keyformat , keylocation , No and Sy pbkdf2iters
.Sy keylocation , while changing the key.
and This is the only way to alter
.Sy pbkdf2iters
) while changing the key. This is the only way to alter
.Sy keyformat .Sy keyformat
and and
.Sy pbkdf2iters .Sy pbkdf2iters
@ -208,44 +214,43 @@ after the dataset has been created.
.It Fl i .It Fl i
Indicates that zfs should make Indicates that zfs should make
.Ar filesystem .Ar filesystem
inherit the key of its parent. Note that this command can only be run on an inherit the key of its parent.
encryption root that has an encrypted parent. Note that this command can only be run on an encryption root
that has an encrypted parent.
.El .El
.El .El
.Ss Encryption .Ss Encryption
Enabling the Enabling the
.Sy encryption .Sy encryption
feature allows for the creation of encrypted filesystems and volumes. ZFS feature allows for the creation of encrypted filesystems and volumes.
will encrypt file and zvol data, file attributes, ACLs, permission bits, ZFS will encrypt file and volume data, file attributes, ACLs, permission bits,
directory listings, FUID mappings, and directory listings, FUID mappings, and
.Sy userused .Sy userused Ns / Ns Sy groupused
/ data.
.Sy groupused ZFS will not encrypt metadata related to the pool structure, including
data. ZFS will not encrypt metadata related to the pool structure, including
dataset and snapshot names, dataset hierarchy, properties, file size, file dataset and snapshot names, dataset hierarchy, properties, file size, file
holes, and deduplication tables (though the deduplicated data itself is holes, and deduplication tables (though the deduplicated data itself is
encrypted). encrypted).
.Pp .Pp
Key rotation is managed by ZFS. Changing the user's key (e.g. a passphrase) Key rotation is managed by ZFS.
does not require re-encrypting the entire dataset. Datasets can be scrubbed, Changing the user's key (e.g. a passphrase)
does not require re-encrypting the entire dataset.
Datasets can be scrubbed,
resilvered, renamed, and deleted without the encryption keys being loaded (see the resilvered, renamed, and deleted without the encryption keys being loaded (see the
.Nm zfs Cm load-key .Cm load-key
subcommand for more info on key loading). subcommand for more info on key loading).
.Pp .Pp
Creating an encrypted dataset requires specifying the Creating an encrypted dataset requires specifying the
.Sy encryption .Sy encryption No and Sy keyformat
and
.Sy keyformat
properties at creation time, along with an optional properties at creation time, along with an optional
.Sy keylocation .Sy keylocation No and Sy pbkdf2iters .
and
.Sy pbkdf2iters .
After entering an encryption key, the After entering an encryption key, the
created dataset will become an encryption root. Any descendant datasets will created dataset will become an encryption root.
Any descendant datasets will
inherit their encryption key from the encryption root by default, meaning that inherit their encryption key from the encryption root by default, meaning that
loading, unloading, or changing the key for the encryption root will implicitly loading, unloading, or changing the key for the encryption root will implicitly
do the same for all inheriting datasets. If this inheritance is not desired, do the same for all inheriting datasets.
simply supply a If this inheritance is not desired, simply supply a
.Sy keyformat .Sy keyformat
when creating the child dataset or use when creating the child dataset or use
.Nm zfs Cm change-key .Nm zfs Cm change-key
@ -256,39 +261,40 @@ may match that of the parent while still creating a new encryption root, and
that changing the that changing the
.Sy encryption .Sy encryption
property alone does not create a new encryption root; this would simply use a property alone does not create a new encryption root; this would simply use a
different cipher suite with the same key as its encryption root. The one different cipher suite with the same key as its encryption root.
exception is that clones will always use their origin's encryption key. The one exception is that clones will always use their origin's encryption key.
As a result of this exception, some encryption-related properties (namely As a result of this exception, some encryption-related properties
.Sy keystatus , .Pq namely Sy keystatus , keyformat , keylocation , No and Sy pbkdf2iters
.Sy keyformat ,
.Sy keylocation ,
and
.Sy pbkdf2iters )
do not inherit like other ZFS properties and instead use the value determined do not inherit like other ZFS properties and instead use the value determined
by their encryption root. Encryption root inheritance can be tracked via the by their encryption root.
read-only Encryption root inheritance can be tracked via the read-only
.Sy encryptionroot .Sy encryptionroot
property. property.
.Pp .Pp
Encryption changes the behavior of a few ZFS Encryption changes the behavior of a few ZFS
operations. Encryption is applied after compression so compression ratios are operations.
preserved. Normally checksums in ZFS are 256 bits long, but for encrypted data Encryption is applied after compression so compression ratios are preserved.
Normally checksums in ZFS are 256 bits long, but for encrypted data
the checksum is 128 bits of the user-chosen checksum and 128 bits of MAC from the checksum is 128 bits of the user-chosen checksum and 128 bits of MAC from
the encryption suite, which provides additional protection against maliciously the encryption suite, which provides additional protection against maliciously
altered data. Deduplication is still possible with encryption enabled but for altered data.
security, datasets will only dedup against themselves, their snapshots, and Deduplication is still possible with encryption enabled but for security,
their clones. datasets will only deduplicate against themselves, their snapshots,
and their clones.
.Pp .Pp
There are a few limitations on encrypted datasets. Encrypted data cannot be There are a few limitations on encrypted datasets.
embedded via the Encrypted data cannot be embedded via the
.Sy embedded_data .Sy embedded_data
feature. Encrypted datasets may not have feature.
Encrypted datasets may not have
.Sy copies Ns = Ns Em 3 .Sy copies Ns = Ns Em 3
since the implementation stores some encryption metadata where the third copy since the implementation stores some encryption metadata where the third copy
would normally be. Since compression is applied before encryption datasets may would normally be.
be vulnerable to a CRIME-like attack if applications accessing the data allow Since compression is applied before encryption, datasets may
for it. Deduplication with encryption will leak information about which blocks be vulnerable to a CRIME-like attack if applications accessing the data allow for it.
are equivalent in a dataset and will incur an extra CPU cost per block written. Deduplication with encryption will leak information about which blocks
are equivalent in a dataset and will incur an extra CPU cost for each block written.
.
.Sh SEE ALSO .Sh SEE ALSO
.Xr zfs-create 8 , .Xr zfs-create 8 ,
.Xr zfs-set 8 , .Xr zfs-set 8 ,

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
@ -33,9 +32,10 @@
.Dd February 16, 2019 .Dd February 16, 2019
.Dt ZFS-MOUNT 8 .Dt ZFS-MOUNT 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zfs-mount .Nm zfs-mount
.Nd Manage mount state of ZFS file systems. .Nd manage mount state of ZFS filesystems
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zfs .Nm zfs
.Cm mount .Cm mount
@ -43,11 +43,12 @@
.Cm mount .Cm mount
.Op Fl Oflv .Op Fl Oflv
.Op Fl o Ar options .Op Fl o Ar options
.Fl a | Ar filesystem .Fl a Ns | Ns Ar filesystem
.Nm zfs .Nm zfs
.Cm unmount .Cm unmount
.Op Fl fu .Op Fl fu
.Fl a | Ar filesystem Ns | Ns Ar mountpoint .Fl a Ns | Ns Ar filesystem Ns | Ns Ar mountpoint
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width "" .Bl -tag -width ""
.It Xo .It Xo
@ -60,11 +61,12 @@ Displays all ZFS file systems currently mounted.
.Cm mount .Cm mount
.Op Fl Oflv .Op Fl Oflv
.Op Fl o Ar options .Op Fl o Ar options
.Fl a | Ar filesystem .Fl a Ns | Ns Ar filesystem
.Xc .Xc
Mount ZFS filesystem on a path described by its Mount ZFS filesystem on a path described by its
.Sy mountpoint .Sy mountpoint
property, if the path exists and is empty. If property, if the path exists and is empty.
If
.Sy mountpoint .Sy mountpoint
is set to is set to
.Em legacy , .Em legacy ,
@ -72,7 +74,8 @@ the filesystem should be instead mounted using
.Xr mount 8 . .Xr mount 8 .
.Bl -tag -width "-O" .Bl -tag -width "-O"
.It Fl O .It Fl O
Perform an overlay mount. Allows mounting in non-empty Perform an overlay mount.
Allows mounting in non-empty
.Sy mountpoint . .Sy mountpoint .
See See
.Xr mount 8 .Xr mount 8
@ -91,13 +94,12 @@ section of
.Xr zfsprops 8 .Xr zfsprops 8
for details. for details.
.It Fl l .It Fl l
Load keys for encrypted filesystems as they are being mounted. This is Load keys for encrypted filesystems as they are being mounted.
equivalent to executing This is equivalent to executing
.Nm zfs Cm load-key .Nm zfs Cm load-key
on each encryption root before mounting it. Note that if a filesystem has a on each encryption root before mounting it.
.Sy keylocation Note that if a filesystem has
of .Sy keylocation Ns = Ns Sy prompt ,
.Sy prompt
this will cause the terminal to interactively block after asking for the key. this will cause the terminal to interactively block after asking for the key.
.It Fl v .It Fl v
Report mount progress. Report mount progress.
@ -108,7 +110,7 @@ Attempt to force mounting of all filesystems, even those that couldn't normally
.Nm zfs .Nm zfs
.Cm unmount .Cm unmount
.Op Fl fu .Op Fl fu
.Fl a | Ar filesystem Ns | Ns Ar mountpoint .Fl a Ns | Ns Ar filesystem Ns | Ns Ar mountpoint
.Xc .Xc
Unmounts currently mounted ZFS file systems. Unmounts currently mounted ZFS file systems.
.Bl -tag -width "-a" .Bl -tag -width "-a"

View File

@ -1,3 +1,4 @@
.\"
.\" This file and its contents are supplied under the terms of the .\" This file and its contents are supplied under the terms of the
.\" Common Development and Distribution License ("CDDL"), version 1.0. .\" Common Development and Distribution License ("CDDL"), version 1.0.
.\" You may only use this file in accordance with the terms of version .\" You may only use this file in accordance with the terms of version
@ -7,17 +8,17 @@
.\" source. A copy of the CDDL is also available via the Internet at .\" source. A copy of the CDDL is also available via the Internet at
.\" http://www.illumos.org/license/CDDL. .\" http://www.illumos.org/license/CDDL.
.\" .\"
.\"
.\" Copyright (c) 2016, 2019 by Delphix. All Rights Reserved. .\" Copyright (c) 2016, 2019 by Delphix. All Rights Reserved.
.\" Copyright (c) 2019, 2020 by Christian Schwarz. All Rights Reserved. .\" Copyright (c) 2019, 2020 by Christian Schwarz. All Rights Reserved.
.\" Copyright 2020 Joyent, Inc. .\" Copyright 2020 Joyent, Inc.
.\" .\"
.Dd January 26, 2021 .Dd May 27, 2021
.Dt ZFS-PROGRAM 8 .Dt ZFS-PROGRAM 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zfs-program .Nm zfs-program
.Nd executes ZFS channel programs .Nd execute ZFS channel programs
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zfs .Nm zfs
.Cm program .Cm program
@ -26,7 +27,8 @@
.Op Fl m Ar memory-limit .Op Fl m Ar memory-limit
.Ar pool .Ar pool
.Ar script .Ar script
.\".Op Ar optional arguments to channel program .Op Ar script arguments
.
.Sh DESCRIPTION .Sh DESCRIPTION
The ZFS channel program interface allows ZFS administrative operations to be The ZFS channel program interface allows ZFS administrative operations to be
run programmatically as a Lua script. run programmatically as a Lua script.
@ -37,22 +39,22 @@ Channel programs may only be run with root privileges.
.Pp .Pp
A modified version of the Lua 5.2 interpreter is used to run channel program A modified version of the Lua 5.2 interpreter is used to run channel program
scripts. scripts.
The Lua 5.2 manual can be found at: The Lua 5.2 manual can be found at
.Bd -centered -offset indent
.Lk http://www.lua.org/manual/5.2/ .Lk http://www.lua.org/manual/5.2/
.Ed
.Pp .Pp
The channel program given by The channel program given by
.Ar script .Ar script
will be run on will be run on
.Ar pool , .Ar pool ,
and any attempts to access or modify other pools will cause an error. and any attempts to access or modify other pools will cause an error.
.
.Sh OPTIONS .Sh OPTIONS
.Bl -tag -width "-t" .Bl -tag -width "-t"
.It Fl j .It Fl j
Display channel program output in JSON format. When this flag is specified and Display channel program output in JSON format.
standard output is empty - channel program encountered an error. The details of When this flag is specified and standard output is empty -
such an error will be printed to standard error in plain text. channel program encountered an error.
The details of such an error will be printed to standard error in plain text.
.It Fl n .It Fl n
Executes a read-only channel program, which runs faster. Executes a read-only channel program, which runs faster.
The program cannot change on-disk state by calling functions from the The program cannot change on-disk state by calling functions from the
@ -78,15 +80,17 @@ All remaining argument strings will be passed directly to the Lua script as
described in the described in the
.Sx LUA INTERFACE .Sx LUA INTERFACE
section below. section below.
.
.Sh LUA INTERFACE .Sh LUA INTERFACE
A channel program can be invoked either from the command line, or via a library A channel program can be invoked either from the command line, or via a library
call to call to
.Fn lzc_channel_program . .Fn lzc_channel_program .
.
.Ss Arguments .Ss Arguments
Arguments passed to the channel program are converted to a Lua table. Arguments passed to the channel program are converted to a Lua table.
If invoked from the command line, extra arguments to the Lua script will be If invoked from the command line, extra arguments to the Lua script will be
accessible as an array stored in the argument table with the key 'argv': accessible as an array stored in the argument table with the key 'argv':
.Bd -literal -offset indent .Bd -literal -compact -offset indent
args = ... args = ...
argv = args["argv"] argv = args["argv"]
-- argv == {1="arg1", 2="arg2", ...} -- argv == {1="arg1", 2="arg2", ...}
@ -95,7 +99,7 @@ argv = args["argv"]
If invoked from the libZFS interface, an arbitrary argument list can be If invoked from the libZFS interface, an arbitrary argument list can be
passed to the channel program, which is accessible via the same passed to the channel program, which is accessible via the same
"..." syntax in Lua: "..." syntax in Lua:
.Bd -literal -offset indent .Bd -literal -compact -offset indent
args = ... args = ...
-- args == {"foo"="bar", "baz"={...}, ...} -- args == {"foo"="bar", "baz"={...}, ...}
.Ed .Ed
@ -108,37 +112,35 @@ in
in a C array passed to a channel program will be stored in in a C array passed to a channel program will be stored in
.Va arr[1] .Va arr[1]
when accessed from Lua. when accessed from Lua.
.
.Ss Return Values .Ss Return Values
Lua return statements take the form: Lua return statements take the form:
.Bd -literal -offset indent .Dl return ret0, ret1, ret2, ...
return ret0, ret1, ret2, ...
.Ed
.Pp .Pp
Return statements returning multiple values are permitted internally in a Return statements returning multiple values are permitted internally in a
channel program script, but attempting to return more than one value from the channel program script, but attempting to return more than one value from the
top level of the channel program is not permitted and will throw an error. top level of the channel program is not permitted and will throw an error.
However, tables containing multiple values can still be returned. However, tables containing multiple values can still be returned.
If invoked from the command line, a return statement: If invoked from the command line, a return statement:
.Bd -literal -offset indent .Bd -literal -compact -offset indent
a = {foo="bar", baz=2} a = {foo="bar", baz=2}
return a return a
.Ed .Ed
.Pp .Pp
Will be output formatted as: Will be output formatted as:
.Bd -literal -offset indent .Bd -literal -compact -offset indent
Channel program fully executed with return value: Channel program fully executed with return value:
return: return:
baz: 2 baz: 2
foo: 'bar' foo: 'bar'
.Ed .Ed
.
.Ss Fatal Errors .Ss Fatal Errors
If the channel program encounters a fatal error while running, a non-zero exit If the channel program encounters a fatal error while running, a non-zero exit
status will be returned. status will be returned.
If more information about the error is available, a singleton list will be If more information about the error is available, a singleton list will be
returned detailing the error: returned detailing the error:
.Bd -literal -offset indent .Dl error: \&"error string, including Lua stack trace"
error: "error string, including Lua stack trace"
.Ed
.Pp .Pp
If a fatal error is returned, the channel program may have not executed at all, If a fatal error is returned, the channel program may have not executed at all,
may have partially executed, or may have fully executed but failed to pass a may have partially executed, or may have fully executed but failed to pass a
@ -162,6 +164,7 @@ return an error code and the channel program continues executing.
See the See the
.Sx ZFS API .Sx ZFS API
section below for function-specific details on error return codes. section below for function-specific details on error return codes.
.
.Ss Lua to C Value Conversion .Ss Lua to C Value Conversion
When invoking a channel program via the libZFS interface, it is necessary to When invoking a channel program via the libZFS interface, it is necessary to
translate arguments and return values from Lua values to their C equivalents, translate arguments and return values from Lua values to their C equivalents,
@ -171,37 +174,37 @@ There is a correspondence between nvlist values in C and Lua tables.
A Lua table which is returned from the channel program will be recursively A Lua table which is returned from the channel program will be recursively
converted to an nvlist, with table values converted to their natural converted to an nvlist, with table values converted to their natural
equivalents: equivalents:
.Bd -literal -offset indent .TS
string -> string cw3 l c l .
number -> int64 string -> string
boolean -> boolean_value number -> int64
nil -> boolean (no value) boolean -> boolean_value
table -> nvlist nil -> boolean (no value)
.Ed table -> nvlist
.TE
.Pp .Pp
Likewise, table keys are replaced by string equivalents as follows: Likewise, table keys are replaced by string equivalents as follows:
.Bd -literal -offset indent .TS
string -> no change cw3 l c l .
number -> signed decimal string ("%lld") string -> no change
boolean -> "true" | "false" number -> signed decimal string ("%lld")
.Ed boolean -> "true" | "false"
.TE
.Pp .Pp
Any collision of table key strings (for example, the string "true" and a Any collision of table key strings (for example, the string "true" and a
true boolean value) will cause a fatal error. true boolean value) will cause a fatal error.
.Pp .Pp
Lua numbers are represented internally as signed 64-bit integers. Lua numbers are represented internally as signed 64-bit integers.
.
.Sh LUA STANDARD LIBRARY .Sh LUA STANDARD LIBRARY
The following Lua built-in base library functions are available: The following Lua built-in base library functions are available:
.Bd -literal -offset indent .TS
assert rawlen cw3 l l l l .
collectgarbage rawget assert rawlen collectgarbage rawget
error rawset error rawset getmetatable select
getmetatable select ipairs setmetatable next tonumber
ipairs setmetatable pairs tostring rawequal type
next tonumber .TE
pairs tostring
rawequal type
.Ed
.Pp .Pp
All functions in the All functions in the
.Em coroutine , .Em coroutine ,
@ -214,15 +217,13 @@ manual.
.Pp .Pp
The following functions base library functions have been disabled and are The following functions base library functions have been disabled and are
not available for use in channel programs: not available for use in channel programs:
.Bd -literal -offset indent .TS
dofile cw3 l l l l l l .
loadfile dofile loadfile load pcall print xpcall
load .TE
pcall .
print
xpcall
.Ed
.Sh ZFS API .Sh ZFS API
.
.Ss Function Arguments .Ss Function Arguments
Each API function takes a fixed set of required positional arguments and Each API function takes a fixed set of required positional arguments and
optional keyword arguments. optional keyword arguments.
@ -231,22 +232,17 @@ For example, the destroy function takes a single positional string argument
argument. argument.
When using parentheses to specify the arguments to a Lua function, only When using parentheses to specify the arguments to a Lua function, only
positional arguments can be used: positional arguments can be used:
.Bd -literal -offset indent .Dl Sy zfs.sync.destroy Ns Pq \&"rpool@snap"
zfs.sync.destroy("rpool@snap")
.Ed
.Pp .Pp
To use keyword arguments, functions must be called with a single argument that To use keyword arguments, functions must be called with a single argument that
is a Lua table containing entries mapping integers to positional arguments and is a Lua table containing entries mapping integers to positional arguments and
strings to keyword arguments: strings to keyword arguments:
.Bd -literal -offset indent .Dl Sy zfs.sync.destroy Ns Pq {1="rpool@snap", defer=true}
zfs.sync.destroy({1="rpool@snap", defer=true})
.Ed
.Pp .Pp
The Lua language allows curly braces to be used in place of parenthesis as The Lua language allows curly braces to be used in place of parenthesis as
syntactic sugar for this calling convention: syntactic sugar for this calling convention:
.Bd -literal -offset indent .Dl Sy zfs.sync.snapshot Ns {"rpool@snap", defer=true}
zfs.sync.snapshot{"rpool@snap", defer=true} .
.Ed
.Ss Function Return Values .Ss Function Return Values
If an API function succeeds, it returns 0. If an API function succeeds, it returns 0.
If it fails, it returns an error code and the channel program continues If it fails, it returns an error code and the channel program continues
@ -261,13 +257,11 @@ Lua table, or Nil if no error details were returned.
Different keys will exist in the error details table depending on the function Different keys will exist in the error details table depending on the function
and error case. and error case.
Any such function may be called expecting a single return value: Any such function may be called expecting a single return value:
.Bd -literal -offset indent .Dl errno = Sy zfs.sync.promote Ns Pq dataset
errno = zfs.sync.promote(dataset)
.Ed
.Pp .Pp
Or, the error details can be retrieved: Or, the error details can be retrieved:
.Bd -literal -offset indent .Bd -literal -compact -offset indent
errno, details = zfs.sync.promote(dataset) .No errno, details = Sy zfs.sync.promote Ns Pq dataset
if (errno == EEXIST) then if (errno == EEXIST) then
assert(details ~= Nil) assert(details ~= Nil)
list_of_conflicting_snapshots = details list_of_conflicting_snapshots = details
@ -276,48 +270,46 @@ end
.Pp .Pp
The following global aliases for API function error return codes are defined The following global aliases for API function error return codes are defined
for use in channel programs: for use in channel programs:
.Bd -literal -offset indent .TS
EPERM ECHILD ENODEV ENOSPC cw3 l l l l l l l .
ENOENT EAGAIN ENOTDIR ESPIPE EPERM ECHILD ENODEV ENOSPC ENOENT EAGAIN ENOTDIR
ESRCH ENOMEM EISDIR EROFS ESPIPE ESRCH ENOMEM EISDIR EROFS EINTR EACCES
EINTR EACCES EINVAL EMLINK EINVAL EMLINK EIO EFAULT ENFILE EPIPE ENXIO
EIO EFAULT ENFILE EPIPE ENOTBLK EMFILE EDOM E2BIG EBUSY ENOTTY ERANGE
ENXIO ENOTBLK EMFILE EDOM ENOEXEC EEXIST ETXTBSY EDQUOT EBADF EXDEV EFBIG
E2BIG EBUSY ENOTTY ERANGE .TE
ENOEXEC EEXIST ETXTBSY EDQUOT .
EBADF EXDEV EFBIG
.Ed
.Ss API Functions .Ss API Functions
For detailed descriptions of the exact behavior of any zfs administrative For detailed descriptions of the exact behavior of any ZFS administrative
operations, see the main operations, see the main
.Xr zfs 8 .Xr zfs 8
manual page. manual page.
.Bl -tag -width "xx" .Bl -tag -width "xx"
.It Em zfs.debug(msg) .It Fn zfs.debug msg
Record a debug message in the zfs_dbgmsg log. Record a debug message in the zfs_dbgmsg log.
A log of these messages can be printed via mdb's "::zfs_dbgmsg" command, or A log of these messages can be printed via mdb's "::zfs_dbgmsg" command, or
can be monitored live by running: can be monitored live by running
.Bd -literal -offset indent .Dl dtrace -n 'zfs-dbgmsg{trace(stringof(arg0))}'
dtrace -n 'zfs-dbgmsg{trace(stringof(arg0))}'
.Ed
.Pp .Pp
msg (string) .Bl -tag -compact -width "property (string)"
.Bd -ragged -compact -offset "xxxx" .It Ar msg Pq string
Debug message to be printed. Debug message to be printed.
.Ed .El
.It Em zfs.exists(dataset) .It Fn zfs.exists dataset
Returns true if the given dataset exists, or false if it doesn't. Returns true if the given dataset exists, or false if it doesn't.
A fatal error will be thrown if the dataset is not in the target pool. A fatal error will be thrown if the dataset is not in the target pool.
That is, in a channel program running on rpool, That is, in a channel program running on rpool,
zfs.exists("rpool/nonexistent_fs") returns false, but .Sy zfs.exists Ns Pq \&"rpool/nonexistent_fs"
zfs.exists("somepool/fs_that_may_exist") will error. returns false, but
.Sy zfs.exists Ns Pq \&"somepool/fs_that_may_exist"
will error.
.Pp .Pp
dataset (string) .Bl -tag -compact -width "property (string)"
.Bd -ragged -compact -offset "xxxx" .It Ar dataset Pq string
Dataset to check for existence. Dataset to check for existence.
Must be in the target pool. Must be in the target pool.
.Ed .El
.It Em zfs.get_prop(dataset, property) .It Fn zfs.get_prop dataset property
Returns two values. Returns two values.
First, a string, number or table containing the property value for the given First, a string, number or table containing the property value for the given
dataset. dataset.
@ -326,22 +318,25 @@ dataset in which it was set or nil if it is readonly).
Throws a Lua error if the dataset is invalid or the property doesn't exist. Throws a Lua error if the dataset is invalid or the property doesn't exist.
Note that Lua only supports int64 number types whereas ZFS number properties Note that Lua only supports int64 number types whereas ZFS number properties
are uint64. are uint64.
This means very large values (like guid) may wrap around and appear negative. This means very large values (like GUIDs) may wrap around and appear negative.
.Pp .Pp
dataset (string) .Bl -tag -compact -width "property (string)"
.Bd -ragged -compact -offset "xxxx" .It Ar dataset Pq string
Filesystem or snapshot path to retrieve properties from. Filesystem or snapshot path to retrieve properties from.
.Ed .It Ar property Pq string
.Pp
property (string)
.Bd -ragged -compact -offset "xxxx"
Name of property to retrieve. Name of property to retrieve.
All filesystem, snapshot and volume properties are supported except All filesystem, snapshot and volume properties are supported except for
for 'mounted' and 'iscsioptions.' .Sy mounted
Also supports the 'written@snap' and 'written#bookmark' properties and and
the '<user|group><quota|used>@id' properties, though the id must be in numeric .Sy iscsioptions .
form. Also supports the
.Ed .Sy written@ Ns Ar snap
and
.Sy written# Ns Ar bookmark
properties and the
.Ao Sy user Ns | Ns Sy group Ac Ns Ao Sy quota Ns | Ns Sy used Ac Ns Sy @ Ns Ar id
properties, though the id must be in numeric form.
.El
.El .El
.Bl -tag -width "xx" .Bl -tag -width "xx"
.It Sy zfs.sync submodule .It Sy zfs.sync submodule
@ -350,86 +345,73 @@ They are executed in "syncing context".
.Pp .Pp
The available sync submodule functions are as follows: The available sync submodule functions are as follows:
.Bl -tag -width "xx" .Bl -tag -width "xx"
.It Em zfs.sync.destroy(dataset, [defer=true|false]) .It Sy zfs.sync.destroy Ns Pq Ar dataset , Op Ar defer Ns = Ns Sy true Ns | Ns Sy false
Destroy the given dataset. Destroy the given dataset.
Returns 0 on successful destroy, or a nonzero error code if the dataset could Returns 0 on successful destroy, or a nonzero error code if the dataset could
not be destroyed (for example, if the dataset has any active children or not be destroyed (for example, if the dataset has any active children or
clones). clones).
.Pp .Pp
dataset (string) .Bl -tag -compact -width "newbookmark (string)"
.Bd -ragged -compact -offset "xxxx" .It Ar dataset Pq string
Filesystem or snapshot to be destroyed. Filesystem or snapshot to be destroyed.
.Ed .It Op Ar defer Pq boolean
.Pp
[optional] defer (boolean)
.Bd -ragged -compact -offset "xxxx"
Valid only for destroying snapshots. Valid only for destroying snapshots.
If set to true, and the snapshot has holds or clones, allows the snapshot to be If set to true, and the snapshot has holds or clones, allows the snapshot to be
marked for deferred deletion rather than failing. marked for deferred deletion rather than failing.
.Ed .El
.It Em zfs.sync.inherit(dataset, property) .It Fn zfs.sync.inherit dataset property
Clears the specified property in the given dataset, causing it to be inherited Clears the specified property in the given dataset, causing it to be inherited
from an ancestor, or restored to the default if no ancestor property is set. from an ancestor, or restored to the default if no ancestor property is set.
The The
.Ql zfs inherit -S .Nm zfs Cm inherit Fl S
option has not been implemented. option has not been implemented.
Returns 0 on success, or a nonzero error code if the property could not be Returns 0 on success, or a nonzero error code if the property could not be
cleared. cleared.
.Pp .Pp
dataset (string) .Bl -tag -compact -width "newbookmark (string)"
.Bd -ragged -compact -offset "xxxx" .It Ar dataset Pq string
Filesystem or snapshot containing the property to clear. Filesystem or snapshot containing the property to clear.
.Ed .It Ar property Pq string
.Pp
property (string)
.Bd -ragged -compact -offset "xxxx"
The property to clear. The property to clear.
Allowed properties are the same as those for the Allowed properties are the same as those for the
.Nm zfs Cm inherit .Nm zfs Cm inherit
command. command.
.Ed .El
.It Em zfs.sync.promote(dataset) .It Fn zfs.sync.promote dataset
Promote the given clone to a filesystem. Promote the given clone to a filesystem.
Returns 0 on successful promotion, or a nonzero error code otherwise. Returns 0 on successful promotion, or a nonzero error code otherwise.
If EEXIST is returned, the second return value will be an array of the clone's If EEXIST is returned, the second return value will be an array of the clone's
snapshots whose names collide with snapshots of the parent filesystem. snapshots whose names collide with snapshots of the parent filesystem.
.Pp .Pp
dataset (string) .Bl -tag -compact -width "newbookmark (string)"
.Bd -ragged -compact -offset "xxxx" .It Ar dataset Pq string
Clone to be promoted. Clone to be promoted.
.Ed .El
.It Em zfs.sync.rollback(filesystem) .It Fn zfs.sync.rollback filesystem
Rollback to the previous snapshot for a dataset. Rollback to the previous snapshot for a dataset.
Returns 0 on successful rollback, or a nonzero error code otherwise. Returns 0 on successful rollback, or a nonzero error code otherwise.
Rollbacks can be performed on filesystems or zvols, but not on snapshots Rollbacks can be performed on filesystems or zvols, but not on snapshots
or mounted datasets. or mounted datasets.
EBUSY is returned in the case where the filesystem is mounted. EBUSY is returned in the case where the filesystem is mounted.
.Pp .Pp
filesystem (string) .Bl -tag -compact -width "newbookmark (string)"
.Bd -ragged -compact -offset "xxxx" .It Ar filesystem Pq string
Filesystem to rollback. Filesystem to rollback.
.Ed .El
.It Em zfs.sync.set_prop(dataset, property, value) .It Fn zfs.sync.set_prop dataset property value
Sets the given property on a dataset. Sets the given property on a dataset.
Currently only user properties are supported. Currently only user properties are supported.
Returns 0 if the property was set, or a nonzero error code otherwise. Returns 0 if the property was set, or a nonzero error code otherwise.
.Pp .Pp
dataset (string) .Bl -tag -compact -width "newbookmark (string)"
.Bd -ragged -compact -offset "xxxx" .It Ar dataset Pq string
The dataset where the property will be set. The dataset where the property will be set.
.Ed .It Ar property Pq string
.Pp
property (string)
.Bd -ragged -compact -offset "xxxx"
The property to set. The property to set.
Only user properties are supported. .It Ar value Pq string
.Ed
.Pp
value (string)
.Bd -ragged -compact -offset "xxxx"
The value of the property to be set. The value of the property to be set.
.Ed .El
.It Em zfs.sync.snapshot(dataset) .It Fn zfs.sync.snapshot dataset
Create a snapshot of a filesystem. Create a snapshot of a filesystem.
Returns 0 if the snapshot was successfully created, Returns 0 if the snapshot was successfully created,
and a nonzero error code otherwise. and a nonzero error code otherwise.
@ -437,132 +419,142 @@ and a nonzero error code otherwise.
Note: Taking a snapshot will fail on any pool older than legacy version 27. Note: Taking a snapshot will fail on any pool older than legacy version 27.
To enable taking snapshots from ZCP scripts, the pool must be upgraded. To enable taking snapshots from ZCP scripts, the pool must be upgraded.
.Pp .Pp
dataset (string) .Bl -tag -compact -width "newbookmark (string)"
.Bd -ragged -compact -offset "xxxx" .It Ar dataset Pq string
Name of snapshot to create. Name of snapshot to create.
.Ed .El
.It Em zfs.sync.bookmark(source, newbookmark) .It Fn zfs.sync.bookmark source newbookmark
Create a bookmark of an existing source snapshot or bookmark. Create a bookmark of an existing source snapshot or bookmark.
Returns 0 if the new bookmark was successfully created, Returns 0 if the new bookmark was successfully created,
and a nonzero error code otherwise. and a nonzero error code otherwise.
.Pp .Pp
Note: Bookmarking requires the corresponding pool feature to be enabled. Note: Bookmarking requires the corresponding pool feature to be enabled.
.Pp .Pp
source (string) .Bl -tag -compact -width "newbookmark (string)"
.Bd -ragged -compact -offset "xxxx" .It Ar source Pq string
Full name of the existing snapshot or bookmark. Full name of the existing snapshot or bookmark.
.Ed .It Ar newbookmark Pq string
.Pp
newbookmark (string)
.Bd -ragged -compact -offset "xxxx"
Full name of the new bookmark. Full name of the new bookmark.
.El .El
.Ed .El
.It Sy zfs.check submodule .It Sy zfs.check submodule
For each function in the zfs.sync submodule, there is a corresponding zfs.check For each function in the
.Sy zfs.sync
submodule, there is a corresponding
.Sy zfs.check
function which performs a "dry run" of the same operation. function which performs a "dry run" of the same operation.
Each takes the same arguments as its zfs.sync counterpart and returns 0 if the Each takes the same arguments as its
operation would succeed, or a non-zero error code if it would fail, along with .Sy zfs.sync
any other error details. counterpart and returns 0 if the operation would succeed,
or a non-zero error code if it would fail, along with any other error details.
That is, each has the same behavior as the corresponding sync function except That is, each has the same behavior as the corresponding sync function except
for actually executing the requested change. for actually executing the requested change.
For example, For example,
.Em zfs.check.destroy("fs") .Fn zfs.check.destroy \&"fs"
returns 0 if returns 0 if
.Em zfs.sync.destroy("fs") .Fn zfs.sync.destroy \&"fs"
would successfully destroy the dataset. would successfully destroy the dataset.
.Pp .Pp
The available zfs.check functions are: The available
.Bl -tag -width "xx" .Sy zfs.check
.It Em zfs.check.destroy(dataset, [defer=true|false]) functions are:
.It Em zfs.check.promote(dataset) .Bl -tag -compact -width "xx"
.It Em zfs.check.rollback(filesystem) .It Sy zfs.check.destroy Ns Pq Ar dataset , Op Ar defer Ns = Ns Sy true Ns | Ns Sy false
.It Em zfs.check.set_property(dataset, property, value) .It Fn zfs.check.promote dataset
.It Em zfs.check.snapshot(dataset) .It Fn zfs.check.rollback filesystem
.It Fn zfs.check.set_property dataset property value
.It Fn zfs.check.snapshot dataset
.El .El
.It Sy zfs.list submodule .It Sy zfs.list submodule
The zfs.list submodule provides functions for iterating over datasets and The zfs.list submodule provides functions for iterating over datasets and
properties. properties.
Rather than returning tables, these functions act as Lua iterators, and are Rather than returning tables, these functions act as Lua iterators, and are
generally used as follows: generally used as follows:
.Bd -literal -offset indent .Bd -literal -compact -offset indent
for child in zfs.list.children("rpool") do .No for child in Fn zfs.list.children \&"rpool" No do
... ...
end end
.Ed .Ed
.Pp .Pp
The available zfs.list functions are: The available
.Sy zfs.list
functions are:
.Bl -tag -width "xx" .Bl -tag -width "xx"
.It Em zfs.list.clones(snapshot) .It Fn zfs.list.clones snapshot
Iterate through all clones of the given snapshot. Iterate through all clones of the given snapshot.
.Pp .Pp
snapshot (string) .Bl -tag -compact -width "snapshot (string)"
.Bd -ragged -compact -offset "xxxx" .It Ar snapshot Pq string
Must be a valid snapshot path in the current pool. Must be a valid snapshot path in the current pool.
.Ed .El
.It Em zfs.list.snapshots(dataset) .It Fn zfs.list.snapshots dataset
Iterate through all snapshots of the given dataset. Iterate through all snapshots of the given dataset.
Each snapshot is returned as a string containing the full dataset name, e.g. Each snapshot is returned as a string containing the full dataset name,
"pool/fs@snap". e.g. "pool/fs@snap".
.Pp .Pp
dataset (string) .Bl -tag -compact -width "snapshot (string)"
.Bd -ragged -compact -offset "xxxx" .It Ar dataset Pq string
Must be a valid filesystem or volume. Must be a valid filesystem or volume.
.Ed .El
.It Em zfs.list.children(dataset) .It Fn zfs.list.children dataset
Iterate through all direct children of the given dataset. Iterate through all direct children of the given dataset.
Each child is returned as a string containing the full dataset name, e.g. Each child is returned as a string containing the full dataset name,
"pool/fs/child". e.g. "pool/fs/child".
.Pp .Pp
dataset (string) .Bl -tag -compact -width "snapshot (string)"
.Bd -ragged -compact -offset "xxxx" .It Ar dataset Pq string
Must be a valid filesystem or volume. Must be a valid filesystem or volume.
.Ed .El
.It Em zfs.list.bookmarks(dataset) .It Fn zfs.list.bookmarks dataset
Iterate through all bookmarks of the given dataset. Each bookmark is returned Iterate through all bookmarks of the given dataset.
as a string containing the full dataset name, e.g. "pool/fs#bookmark". Each bookmark is returned as a string containing the full dataset name,
e.g. "pool/fs#bookmark".
.Pp .Pp
dataset (string) .Bl -tag -compact -width "snapshot (string)"
.Bd -ragged -compact -offset "xxxx" .It Ar dataset Pq string
Must be a valid filesystem or volume. Must be a valid filesystem or volume.
.Ed .El
.It Em zfs.list.holds(snapshot) .It Fn zfs.list.holds snapshot
Iterate through all user holds on the given snapshot. Each hold is returned Iterate through all user holds on the given snapshot.
Each hold is returned
as a pair of the hold's tag and the timestamp (in seconds since the epoch) at as a pair of the hold's tag and the timestamp (in seconds since the epoch) at
which it was created. which it was created.
.Pp .Pp
snapshot (string) .Bl -tag -compact -width "snapshot (string)"
.Bd -ragged -compact -offset "xxxx" .It Ar snapshot Pq string
Must be a valid snapshot. Must be a valid snapshot.
.Ed .El
.It Em zfs.list.properties(dataset) .It Fn zfs.list.properties dataset
An alias for zfs.list.user_properties (see relevant entry). An alias for zfs.list.user_properties (see relevant entry).
.Pp .Pp
dataset (string) .Bl -tag -compact -width "snapshot (string)"
.Bd -ragged -compact -offset "xxxx" .It Ar dataset Pq string
Must be a valid filesystem, snapshot, or volume. Must be a valid filesystem, snapshot, or volume.
.Ed .El
.It Em zfs.list.user_properties(dataset) .It Fn zfs.list.user_properties dataset
Iterate through all user properties for the given dataset. For each Iterate through all user properties for the given dataset.
step of the iteration, output the property name, its value, and its source. For each step of the iteration, output the property name, its value,
and its source.
Throws a Lua error if the dataset is invalid. Throws a Lua error if the dataset is invalid.
.Pp .Pp
dataset (string) .Bl -tag -compact -width "snapshot (string)"
.Bd -ragged -compact -offset "xxxx" .It Ar dataset Pq string
Must be a valid filesystem, snapshot, or volume. Must be a valid filesystem, snapshot, or volume.
.Ed .El
.It Em zfs.list.system_properties(dataset) .It Fn zfs.list.system_properties dataset
Returns an array of strings, the names of the valid system (non-user defined) Returns an array of strings, the names of the valid system (non-user defined)
properties for the given dataset. properties for the given dataset.
Throws a Lua error if the dataset is invalid. Throws a Lua error if the dataset is invalid.
.Pp .Pp
dataset (string) .Bl -tag -compact -width "snapshot (string)"
.Bd -ragged -compact -offset "xxxx" .It Ar dataset Pq string
Must be a valid filesystem, snapshot or volume. Must be a valid filesystem, snapshot or volume.
.Ed
.El .El
.El .El
.El
.
.Sh EXAMPLES .Sh EXAMPLES
.
.Ss Example 1 .Ss Example 1
The following channel program recursively destroys a filesystem and all its The following channel program recursively destroys a filesystem and all its
snapshots and children in a naive manner. snapshots and children in a naive manner.
@ -579,6 +571,7 @@ function destroy_recursive(root)
end end
destroy_recursive("pool/somefs") destroy_recursive("pool/somefs")
.Ed .Ed
.
.Ss Example 2 .Ss Example 2
A more verbose and robust version of the same channel program, which A more verbose and robust version of the same channel program, which
properly detects and reports errors, and also takes the dataset to destroy properly detects and reports errors, and also takes the dataset to destroy
@ -617,6 +610,7 @@ results["succeeded"] = succeeded
results["failed"] = failed results["failed"] = failed
return results return results
.Ed .Ed
.
.Ss Example 3 .Ss Example 3
The following function performs a forced promote operation by attempting to The following function performs a forced promote operation by attempting to
promote the given clone and destroying any conflicting snapshots. promote the given clone and destroying any conflicting snapshots.

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
@ -30,68 +29,65 @@
.\" Copyright 2018 Nexenta Systems, Inc. .\" Copyright 2018 Nexenta Systems, Inc.
.\" Copyright 2019 Joyent, Inc. .\" Copyright 2019 Joyent, Inc.
.\" .\"
.Dd June 30, 2019 .Dd May 27, 2021
.Dt ZFS-PROJECT 8 .Dt ZFS-PROJECT 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zfs-project .Nm zfs-project
.Nd List, set, or clear project ID and/or inherit flag on the file(s) or directories. .Nd manage projects in ZFS filesystem
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zfs .Nm zfs
.Cm project .Cm project
.Oo Fl d Ns | Ns Fl r Ns Oc .Oo Fl d Ns | Ns Fl r Ns Oc
.Ar file Ns | Ns Ar directory Ns ... .Ar file Ns | Ns Ar directory Ns
.Nm zfs .Nm zfs
.Cm project .Cm project
.Fl C .Fl C
.Oo Fl kr Ns Oc .Oo Fl kr Ns Oc
.Ar file Ns | Ns Ar directory Ns ... .Ar file Ns | Ns Ar directory Ns
.Nm zfs .Nm zfs
.Cm project .Cm project
.Fl c .Fl c
.Oo Fl 0 Ns Oc .Oo Fl 0 Ns Oc
.Oo Fl d Ns | Ns Fl r Ns Oc .Oo Fl d Ns | Ns Fl r Ns Oc
.Op Fl p Ar id .Op Fl p Ar id
.Ar file Ns | Ns Ar directory Ns ... .Ar file Ns | Ns Ar directory Ns
.Nm zfs .Nm zfs
.Cm project .Cm project
.Op Fl p Ar id .Op Fl p Ar id
.Oo Fl rs Ns Oc .Oo Fl rs Ns Oc
.Ar file Ns | Ns Ar directory Ns ... .Ar file Ns | Ns Ar directory Ns
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width "" .Bl -tag -width ""
.It Xo .It Xo
.Nm zfs .Nm zfs
.Cm project .Cm project
.Oo Fl d Ns | Ns Fl r Ns Oc .Oo Fl d Ns | Ns Fl r Ns Oc
.Ar file Ns | Ns Ar directory Ns ... .Ar file Ns | Ns Ar directory Ns
.Xc .Xc
List project identifier (ID) and inherit flag of file(s) or directories. List project identifier (ID) and inherit flag of files and directories.
.Bl -tag -width "-d" .Bl -tag -width "-d"
.It Fl d .It Fl d
Show the directory project ID and inherit flag, not its children. It will Show the directory project ID and inherit flag, not its children.
overwrite the former specified
.Fl r
option.
.It Fl r .It Fl r
Show on subdirectories recursively. It will overwrite the former specified List subdirectories recursively.
.Fl d
option.
.El .El
.It Xo .It Xo
.Nm zfs .Nm zfs
.Cm project .Cm project
.Fl C .Fl C
.Oo Fl kr Ns Oc .Oo Fl kr Ns Oc
.Ar file Ns | Ns Ar directory Ns ... .Ar file Ns | Ns Ar directory Ns
.Xc .Xc
Clear project inherit flag and/or ID on the file(s) or directories. Clear project inherit flag and/or ID on the files and directories.
.Bl -tag -width "-k" .Bl -tag -width "-k"
.It Fl k .It Fl k
Keep the project ID unchanged. If not specified, the project ID will be reset Keep the project ID unchanged.
as zero. If not specified, the project ID will be reset to zero.
.It Fl r .It Fl r
Clear on subdirectories recursively. Clear subdirectories' flags recursively.
.El .El
.It Xo .It Xo
.Nm zfs .Nm zfs
@ -100,54 +96,46 @@ Clear on subdirectories recursively.
.Oo Fl 0 Ns Oc .Oo Fl 0 Ns Oc
.Oo Fl d Ns | Ns Fl r Ns Oc .Oo Fl d Ns | Ns Fl r Ns Oc
.Op Fl p Ar id .Op Fl p Ar id
.Ar file Ns | Ns Ar directory Ns ... .Ar file Ns | Ns Ar directory Ns
.Xc .Xc
Check project ID and inherit flag on the file(s) or directories, report the Check project ID and inherit flag on the files and directories:
entries without project inherit flag or with different project IDs from the report entries without the project inherit flag, or with project IDs different from the
specified (via target directory's project ID or the one specified with
.Fl p .Fl p .
option) value or the target directory's project ID. .Bl -tag -width "-p id"
.Bl -tag -width "-0"
.It Fl 0 .It Fl 0
Print file name with a trailing NUL instead of newline (by default), like Delimit filenames with a NUL byte instead of newline.
"find -print0".
.It Fl d .It Fl d
Check the directory project ID and inherit flag, not its children. It will Check the directory project ID and inherit flag, not its children.
overwrite the former specified .It Fl p Ar id
.Fl r Compare to
option. .Ar id
.It Fl p instead of the target files and directories' project IDs.
Specify the referenced ID for comparing with the target file(s) or directories'
project IDs. If not specified, the target (top) directory's project ID will be
used as the referenced one.
.It Fl r .It Fl r
Check on subdirectories recursively. It will overwrite the former specified Check subdirectories recursively.
.Fl d
option.
.El .El
.It Xo .It Xo
.Nm zfs .Nm zfs
.Cm project .Cm project
.Op Fl p Ar id .Fl p Ar id
.Oo Fl rs Ns Oc .Oo Fl rs Ns Oc
.Ar file Ns | Ns Ar directory Ns ... .Ar file Ns | Ns Ar directory Ns
.Xc .Xc
Set project ID and/or inherit flag on the file(s) or directories. Set project ID and/or inherit flag on the files and directories.
.Bl -tag -width "-p" .Bl -tag -width "-p id"
.It Fl p .It Fl p Ar id
Set the file(s)' or directories' project ID with the given value. Set the project ID to the given value.
.It Fl r .It Fl r
Set on subdirectories recursively. Set on subdirectories recursively.
.It Fl s .It Fl s
Set project inherit flag on the given file(s) or directories. It is usually used Set project inherit flag on the given files and directories.
for setup tree quota on the directory target with This is usually used for setting up tree quotas with
.Fl r .Fl r .
option specified together. When setup tree quota, by default the directory's In that case, the directory's project ID
project ID will be set to all its descendants unless you specify the project will be set for all its descendants, unless specified explicitly with
ID via .Fl p .
.Fl p
option explicitly.
.El .El
.El .El
.
.Sh SEE ALSO .Sh SEE ALSO
.Xr zfs-projectspace 8 .Xr zfs-projectspace 8

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
@ -33,37 +32,33 @@
.Dd June 30, 2019 .Dd June 30, 2019
.Dt ZFS-PROMOTE 8 .Dt ZFS-PROMOTE 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zfs-promote .Nm zfs-promote
.Nd Promotes a clone file system to no longer be dependent on its origin snapshot. .Nd promote clone dataset to no longer depend on origin snapshot
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zfs .Nm zfs
.Cm promote .Cm promote
.Ar clone-filesystem .Ar clone
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width ""
.It Xo
.Nm zfs
.Cm promote
.Ar clone-filesystem
.Xc
The The
.Cm promote .Nm zfs Cm promote
command makes it possible to destroy the file system that the clone was created command makes it possible to destroy the dataset that the clone was created from.
from.
The clone parent-child dependency relationship is reversed, so that the origin The clone parent-child dependency relationship is reversed, so that the origin
file system becomes a clone of the specified file system. dataset becomes a clone of the specified dataset.
.Pp .Pp
The snapshot that was cloned, and any snapshots previous to this snapshot, are The snapshot that was cloned, and any snapshots previous to this snapshot, are
now owned by the promoted clone. now owned by the promoted clone.
The space they use moves from the origin file system to the promoted clone, so The space they use moves from the origin dataset to the promoted clone, so
enough space must be available to accommodate these snapshots. enough space must be available to accommodate these snapshots.
No new space is consumed by this operation, but the space accounting is No new space is consumed by this operation, but the space accounting is
adjusted. adjusted.
The promoted clone must not have any conflicting snapshot names of its own. The promoted clone must not have any conflicting snapshot names of its own.
The The
.Xr zfs-rename 8 .Nm zfs Cm rename
subcommand can be used to rename any conflicting snapshots. subcommand can be used to rename any conflicting snapshots.
.El .
.Sh SEE ALSO .Sh SEE ALSO
.Xr zfs-clone 8 .Xr zfs-clone 8 ,
.Xr zfs-rename 8

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
@ -33,9 +32,10 @@
.Dd February 16, 2020 .Dd February 16, 2020
.Dt ZFS-RECEIVE 8 .Dt ZFS-RECEIVE 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zfs-receive .Nm zfs-receive
.Nd Creates a snapshot whose contents are as specified in the stream provided on standard input. .Nd create snapshot from backup stream
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zfs .Nm zfs
.Cm receive .Cm receive
@ -56,6 +56,7 @@
.Cm receive .Cm receive
.Fl A .Fl A
.Ar filesystem Ns | Ns Ar volume .Ar filesystem Ns | Ns Ar volume
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width "" .Bl -tag -width ""
.It Xo .It Xo
@ -85,7 +86,7 @@ Streams are created using the
subcommand, which by default creates a full stream. subcommand, which by default creates a full stream.
.Nm zfs Cm recv .Nm zfs Cm recv
can be used as an alias for can be used as an alias for
.Nm zfs Cm receive. .Nm zfs Cm receive .
.Pp .Pp
If an incremental stream is received, then the destination file system must If an incremental stream is received, then the destination file system must
already exist, and its most recent snapshot must match the incremental stream's already exist, and its most recent snapshot must match the incremental stream's
@ -116,15 +117,17 @@ If
or or
.Fl x Em property .Fl x Em property
is specified, it applies to the effective value of the property throughout is specified, it applies to the effective value of the property throughout
the entire subtree of replicated datasets. Effective property values will be the entire subtree of replicated datasets.
set ( Effective property values will be set
.Fl o .Pq Fl o
) or inherited ( or inherited
.Fl x .Pq Fl x
) on the topmost in the replicated subtree. In descendant datasets, if the on the topmost in the replicated subtree.
In descendant datasets, if the
property is set by the send stream, it will be overridden by forcing the property is set by the send stream, it will be overridden by forcing the
property to be inherited from the topmost file system. Received properties property to be inherited from the topmost file system.
are retained in spite of being overridden and may be restored with Received properties are retained in spite of being overridden
and may be restored with
.Nm zfs Cm inherit Fl S . .Nm zfs Cm inherit Fl S .
Specifying Specifying
.Fl o Sy origin Ns = Ns Em snapshot .Fl o Sy origin Ns = Ns Em snapshot
@ -134,41 +137,51 @@ is a read-only property and cannot be set, it's allowed to receive the send
stream as a clone of the given snapshot. stream as a clone of the given snapshot.
.Pp .Pp
Raw encrypted send streams (created with Raw encrypted send streams (created with
.Nm zfs Cm send Fl w .Nm zfs Cm send Fl w )
) may only be received as is, and cannot be re-encrypted, decrypted, or may only be received as is, and cannot be re-encrypted, decrypted, or
recompressed by the receive process. Unencrypted streams can be received as recompressed by the receive process.
Unencrypted streams can be received as
encrypted datasets, either through inheritance or by specifying encryption encrypted datasets, either through inheritance or by specifying encryption
parameters with the parameters with the
.Fl o .Fl o
options. Note that the options.
Note that the
.Sy keylocation .Sy keylocation
property cannot be overridden to property cannot be overridden to
.Sy prompt .Sy prompt
during a receive. This is because the receive process itself is already using during a receive.
stdin for the send stream. Instead, the property can be overridden after the This is because the receive process itself is already using
receive completes. the standard input for the send stream.
Instead, the property can be overridden after the receive completes.
.Pp .Pp
The added security provided by raw sends adds some restrictions to the send The added security provided by raw sends adds some restrictions to the send
and receive process. ZFS will not allow a mix of raw receives and non-raw and receive process.
receives. Specifically, any raw incremental receives that are attempted after ZFS will not allow a mix of raw receives and non-raw receives.
a non-raw receive will fail. Non-raw receives do not have this restriction and, Specifically, any raw incremental receives that are attempted after
therefore, are always possible. Because of this, it is best practice to always a non-raw receive will fail.
Non-raw receives do not have this restriction and,
therefore, are always possible.
Because of this, it is best practice to always
use either raw sends for their security benefits or non-raw sends for their use either raw sends for their security benefits or non-raw sends for their
flexibility when working with encrypted datasets, but not a combination. flexibility when working with encrypted datasets, but not a combination.
.Pp .Pp
The reason for this restriction stems from the inherent restrictions of the The reason for this restriction stems from the inherent restrictions of the
AEAD ciphers that ZFS uses to encrypt data. When using ZFS native encryption, AEAD ciphers that ZFS uses to encrypt data.
When using ZFS native encryption,
each block of data is encrypted against a randomly generated number known as each block of data is encrypted against a randomly generated number known as
the "initialization vector" (IV), which is stored in the filesystem metadata. the "initialization vector" (IV), which is stored in the filesystem metadata.
This number is required by the encryption algorithms whenever the data is to This number is required by the encryption algorithms whenever the data is to
be decrypted. Together, all of the IVs provided for all of the blocks in a be decrypted.
given snapshot are collectively called an "IV set". When ZFS performs a raw Together, all of the IVs provided for all of the blocks in a
send, the IV set is transferred from the source to the destination in the send given snapshot are collectively called an "IV set".
stream. When ZFS performs a non-raw send, the data is decrypted by the source When ZFS performs a raw send, the IV set is transferred from the source
to the destination in the send stream.
When ZFS performs a non-raw send, the data is decrypted by the source
system and re-encrypted by the destination system, creating a snapshot with system and re-encrypted by the destination system, creating a snapshot with
effectively the same data, but a different IV set. In order for decryption to effectively the same data, but a different IV set.
work after a raw send, ZFS must ensure that the IV set used on both the source In order for decryption to work after a raw send, ZFS must ensure that
and destination side match. When an incremental raw receive is performed on the IV set used on both the source and destination side match.
When an incremental raw receive is performed on
top of an existing snapshot, ZFS will check to confirm that the "from" top of an existing snapshot, ZFS will check to confirm that the "from"
snapshot on both the source and destination were using the same IV set, snapshot on both the source and destination were using the same IV set,
ensuring the new IV set is consistent. ensuring the new IV set is consistent.
@ -234,7 +247,8 @@ Discard all but the last element of the sent snapshot's file system name, using
that element to determine the name of the target file system for the new that element to determine the name of the target file system for the new
snapshot as described in the paragraph above. snapshot as described in the paragraph above.
.It Fl h .It Fl h
Skip the receive of holds. There is no effect if holds are not sent. Skip the receive of holds.
There is no effect if holds are not sent.
.It Fl M .It Fl M
Force an unmount of the file system while receiving a snapshot. Force an unmount of the file system while receiving a snapshot.
This option is not supported on Linux. This option is not supported on Linux.
@ -254,7 +268,8 @@ performed.
.It Fl o Em property Ns = Ns Ar value .It Fl o Em property Ns = Ns Ar value
Sets the specified property as if the command Sets the specified property as if the command
.Nm zfs Cm set Em property Ns = Ns Ar value .Nm zfs Cm set Em property Ns = Ns Ar value
was invoked immediately before the receive. When receiving a stream from was invoked immediately before the receive.
When receiving a stream from
.Nm zfs Cm send Fl R , .Nm zfs Cm send Fl R ,
causes the property to be inherited by all descendant datasets, as through causes the property to be inherited by all descendant datasets, as through
.Nm zfs Cm inherit Em property .Nm zfs Cm inherit Em property
@ -267,11 +282,13 @@ then overriding the
.Sy compression .Sy compression
property will have no affect on received data but the property will have no affect on received data but the
.Sy compression .Sy compression
property will be set. To have the data recompressed on receive remove the property will be set.
To have the data recompressed on receive remove the
.Fl c .Fl c
flag from the send stream. flag from the send stream.
.Pp .Pp
Any editable property can be set at receive time. Set-once properties bound Any editable property can be set at receive time.
Set-once properties bound
to the received data, such as to the received data, such as
.Sy normalization .Sy normalization
and and
@ -286,8 +303,8 @@ cannot be set at receive time.
.Pp .Pp
The The
.Fl o .Fl o
option may be specified multiple times, for different properties. An error option may be specified multiple times, for different properties.
results if the same property is specified in multiple An error results if the same property is specified in multiple
.Fl o .Fl o
or or
.Fl x .Fl x
@ -295,30 +312,27 @@ options.
.Pp .Pp
The The
.Fl o .Fl o
option may also be used to override encryption properties upon initial option may also be used to override encryption properties upon initial receive.
receive. This allows unencrypted streams to be received as encrypted datasets. This allows unencrypted streams to be received as encrypted datasets.
To cause the received dataset (or root dataset of a recursive stream) to be To cause the received dataset (or root dataset of a recursive stream) to be
received as an encryption root, specify encryption properties in the same received as an encryption root, specify encryption properties in the same
manner as is required for manner as is required for
.Nm zfs .Nm zfs Cm create .
.Cm create .
For instance: For instance:
.Bd -literal .Dl # Nm zfs Cm send Pa tank/test@snap1 | Nm zfs Cm recv Fl o Sy encryption Ns = Ns Sy on Fl o keyformat=passphrase Fl o Sy keylocation Ns = Ns Pa file:///path/to/keyfile
# zfs send tank/test@snap1 | zfs recv -o encryption=on -o keyformat=passphrase -o keylocation=file:///path/to/keyfile
.Ed
.Pp .Pp
Note that Note that
.Op Fl o Ar keylocation Ns = Ns Ar prompt .Fl o Sy keylocation Ns = Ns Sy prompt
may not be specified here, since stdin is already being utilized for the send may not be specified here, since the standard input
stream. Once the receive has completed, you can use is already being utilized for the send stream.
.Nm zfs Once the receive has completed, you can use
.Cm set .Nm zfs Cm set
to change this setting after the fact. Similarly, you can receive a dataset as to change this setting after the fact.
an encrypted child by specifying Similarly, you can receive a dataset as an encrypted child by specifying
.Op Fl x Ar encryption .Op Fl x Ar encryption
to force the property to be inherited. Overriding encryption properties (except to force the property to be inherited.
for Overriding encryption properties (except for
.Sy keylocation Ns ) .Sy keylocation )
is not possible with raw send streams. is not possible with raw send streams.
.It Fl s .It Fl s
If the receive is interrupted, save the partially received state, rather If the receive is interrupted, save the partially received state, rather
@ -380,6 +394,7 @@ Abort an interrupted
.Nm zfs Cm receive Fl s , .Nm zfs Cm receive Fl s ,
deleting its saved partially received state. deleting its saved partially received state.
.El .El
.
.Sh SEE ALSO .Sh SEE ALSO
.Xr zfs-send 8 .Xr zfs-send 8 ,
.Xr zstream 8 .Xr zstream 8

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
@ -33,9 +32,10 @@
.Dd September 1, 2020 .Dd September 1, 2020
.Dt ZFS-RENAME 8 .Dt ZFS-RENAME 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zfs-rename .Nm zfs-rename
.Nd Renames the given dataset (filesystem or snapshot). .Nd rename ZFS dataset
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zfs .Nm zfs
.Cm rename .Cm rename
@ -57,6 +57,7 @@
.Cm rename .Cm rename
.Fl r .Fl r
.Ar snapshot Ar snapshot .Ar snapshot Ar snapshot
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width "" .Bl -tag -width ""
.It Xo .It Xo

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
@ -30,25 +29,20 @@
.\" Copyright 2018 Nexenta Systems, Inc. .\" Copyright 2018 Nexenta Systems, Inc.
.\" Copyright 2019 Joyent, Inc. .\" Copyright 2019 Joyent, Inc.
.\" .\"
.Dd June 30, 2019 .Dd May 27, 2021
.Dt ZFS-ROLLBACK 8 .Dt ZFS-ROLLBACK 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zfs-rollback .Nm zfs-rollback
.Nd Roll back the given dataset to a previous snapshot. .Nd roll ZFS dataset back to snapshot
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zfs .Nm zfs
.Cm rollback .Cm rollback
.Op Fl Rfr .Op Fl Rfr
.Ar snapshot .Ar snapshot
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width ""
.It Xo
.Nm zfs
.Cm rollback
.Op Fl Rfr
.Ar snapshot
.Xc
When a dataset is rolled back, all data that has changed since the snapshot is When a dataset is rolled back, all data that has changed since the snapshot is
discarded, and the dataset reverts to the state at the time of the snapshot. discarded, and the dataset reverts to the state at the time of the snapshot.
By default, the command refuses to roll back to a snapshot other than the most By default, the command refuses to roll back to a snapshot other than the most
@ -63,7 +57,7 @@ The
options do not recursively destroy the child snapshots of a recursive snapshot. options do not recursively destroy the child snapshots of a recursive snapshot.
Only direct snapshots of the specified filesystem are destroyed by either of Only direct snapshots of the specified filesystem are destroyed by either of
these options. these options.
To completely roll back a recursive snapshot, you must rollback the individual To completely roll back a recursive snapshot, you must roll back the individual
child snapshots. child snapshots.
.Bl -tag -width "-R" .Bl -tag -width "-R"
.It Fl R .It Fl R
@ -76,6 +70,6 @@ option to force an unmount of any clone file systems that are to be destroyed.
.It Fl r .It Fl r
Destroy any snapshots and bookmarks more recent than the one specified. Destroy any snapshots and bookmarks more recent than the one specified.
.El .El
.El .
.Sh SEE ALSO .Sh SEE ALSO
.Xr zfs-snapshot 8 .Xr zfs-snapshot 8

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
@ -33,9 +32,10 @@
.Dd April 15, 2021 .Dd April 15, 2021
.Dt ZFS-SEND 8 .Dt ZFS-SEND 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zfs-send .Nm zfs-send
.Nd Generate a send stream, which may be of a filesystem, and may be incremental from a bookmark. .Nd generate backup stream of ZFS dataset
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zfs .Nm zfs
.Cm send .Cm send
@ -51,7 +51,6 @@
.Cm send .Cm send
.Fl -redact Ar redaction_bookmark .Fl -redact Ar redaction_bookmark
.Op Fl DLPcenpv .Op Fl DLPcenpv
.br
.Op Fl i Ar snapshot Ns | Ns Ar bookmark .Op Fl i Ar snapshot Ns | Ns Ar bookmark
.Ar snapshot .Ar snapshot
.Nm zfs .Nm zfs
@ -66,7 +65,8 @@
.Nm zfs .Nm zfs
.Cm redact .Cm redact
.Ar snapshot redaction_bookmark .Ar snapshot redaction_bookmark
.Ar redaction_snapshot Ns ... .Ar redaction_snapshot Ns
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width "" .Bl -tag -width ""
.It Xo .It Xo
@ -85,7 +85,7 @@ The output can be redirected to a file or to a different system
.Pc . .Pc .
By default, a full stream is generated. By default, a full stream is generated.
.Bl -tag -width "-D" .Bl -tag -width "-D"
.It Fl D, -dedup .It Fl D , -dedup
Deduplicated send is no longer supported. Deduplicated send is no longer supported.
This flag is accepted for backwards compatibility, but a regular, This flag is accepted for backwards compatibility, but a regular,
non-deduplicated stream will be generated. non-deduplicated stream will be generated.
@ -99,7 +99,7 @@ is similar to
The incremental source may be specified as with the The incremental source may be specified as with the
.Fl i .Fl i
option. option.
.It Fl L, -large-block .It Fl L , -large-block
Generate a stream which may contain blocks larger than 128KB. Generate a stream which may contain blocks larger than 128KB.
This flag has no effect if the This flag has no effect if the
.Sy large_blocks .Sy large_blocks
@ -114,9 +114,9 @@ See
for details on ZFS feature flags and the for details on ZFS feature flags and the
.Sy large_blocks .Sy large_blocks
feature. feature.
.It Fl P, -parsable .It Fl P , -parsable
Print machine-parsable verbose information about the stream package generated. Print machine-parsable verbose information about the stream package generated.
.It Fl R, -replicate .It Fl R , -replicate
Generate a replication stream package, which will replicate the specified Generate a replication stream package, which will replicate the specified
file system, and all descendent file systems, up to the named snapshot. file system, and all descendent file systems, up to the named snapshot.
When received, all properties, snapshots, descendent file systems, and clones When received, all properties, snapshots, descendent file systems, and clones
@ -134,12 +134,13 @@ set when the stream is received.
If the If the
.Fl F .Fl F
flag is specified when this stream is received, snapshots and file systems that flag is specified when this stream is received, snapshots and file systems that
do not exist on the sending side are destroyed. If the do not exist on the sending side are destroyed.
If the
.Fl R .Fl R
flag is used to send encrypted datasets, then flag is used to send encrypted datasets, then
.Fl w .Fl w
must also be specified. must also be specified.
.It Fl e, -embed .It Fl e , -embed
Generate a more compact stream by using Generate a more compact stream by using
.Sy WRITE_EMBEDDED .Sy WRITE_EMBEDDED
records for blocks which are stored more compactly on disk by the records for blocks which are stored more compactly on disk by the
@ -154,7 +155,8 @@ feature enabled.
If the If the
.Sy lz4_compress .Sy lz4_compress
feature is active on the sending system, then the receiving system must have feature is active on the sending system, then the receiving system must have
that feature enabled as well. Datasets that are sent with this flag may not be that feature enabled as well.
Datasets that are sent with this flag may not be
received as an encrypted dataset, since encrypted datasets cannot use the received as an encrypted dataset, since encrypted datasets cannot use the
.Sy embedded_data .Sy embedded_data
feature. feature.
@ -163,15 +165,15 @@ See
for details on ZFS feature flags and the for details on ZFS feature flags and the
.Sy embedded_data .Sy embedded_data
feature. feature.
.It Fl b, -backup .It Fl b , -backup
Sends only received property values whether or not they are overridden by local Sends only received property values whether or not they are overridden by local
settings, but only if the dataset has ever been received. Use this option when settings, but only if the dataset has ever been received.
you want Use this option when you want
.Nm zfs Cm receive .Nm zfs Cm receive
to restore received properties backed up on the sent dataset and to avoid to restore received properties backed up on the sent dataset and to avoid
sending local settings that may have nothing to do with the source dataset, sending local settings that may have nothing to do with the source dataset,
but only with how the data is backed up. but only with how the data is backed up.
.It Fl c, -compressed .It Fl c , -compressed
Generate a more compact stream by using compressed WRITE records for blocks Generate a more compact stream by using compressed WRITE records for blocks
which are compressed on disk and in memory which are compressed on disk and in memory
.Po see the .Po see the
@ -189,34 +191,36 @@ feature is enabled on the sending system but the
option is not supplied in conjunction with option is not supplied in conjunction with
.Fl c , .Fl c ,
then the data will be decompressed before sending so it can be split into then the data will be decompressed before sending so it can be split into
smaller block sizes. Streams sent with smaller block sizes.
Streams sent with
.Fl c .Fl c
will not have their data recompressed on the receiver side using will not have their data recompressed on the receiver side using
.Fl o compress=value. .Fl o Sy compress Ns = Ar value .
The data will stay compressed as it was from the sender. The new compression The data will stay compressed as it was from the sender.
property will be set for future data. The new compression property will be set for future data.
.It Fl w, -raw .It Fl w , -raw
For encrypted datasets, send data exactly as it exists on disk. This allows For encrypted datasets, send data exactly as it exists on disk.
backups to be taken even if encryption keys are not currently loaded. The This allows backups to be taken even if encryption keys are not currently loaded.
backup may then be received on an untrusted machine since that machine will The backup may then be received on an untrusted machine since that machine will
not have the encryption keys to read the protected data or alter it without not have the encryption keys to read the protected data or alter it without
being detected. Upon being received, the dataset will have the same encryption being detected.
Upon being received, the dataset will have the same encryption
keys as it did on the send side, although the keys as it did on the send side, although the
.Sy keylocation .Sy keylocation
property will be defaulted to property will be defaulted to
.Sy prompt .Sy prompt
if not otherwise provided. For unencrypted datasets, this flag will be if not otherwise provided.
equivalent to For unencrypted datasets, this flag will be equivalent to
.Fl Lec . .Fl Lec .
Note that if you do not use this flag for sending encrypted datasets, data will Note that if you do not use this flag for sending encrypted datasets, data will
be sent unencrypted and may be re-encrypted with a different encryption key on be sent unencrypted and may be re-encrypted with a different encryption key on
the receiving system, which will disable the ability to do a raw send to that the receiving system, which will disable the ability to do a raw send to that
system for incrementals. system for incrementals.
.It Fl h, -holds .It Fl h , -holds
Generate a stream package that includes any snapshot holds (created with the Generate a stream package that includes any snapshot holds (created with the
.Sy zfs hold .Nm zfs Cm hold
command), and indicating to command), and indicating to
.Sy zfs receive .Nm zfs Cm receive
that the holds be applied to the dataset on the receiving system. that the holds be applied to the dataset on the receiving system.
.It Fl i Ar snapshot .It Fl i Ar snapshot
Generate an incremental stream from the first Generate an incremental stream from the first
@ -240,7 +244,7 @@ be fully specified
not just not just
.Em @origin .Em @origin
.Pc . .Pc .
.It Fl n, -dryrun .It Fl n , -dryrun
Do a dry-run Do a dry-run
.Pq Qq No-op .Pq Qq No-op
send. send.
@ -254,22 +258,24 @@ In this case, the verbose output will be written to standard output
.Po contrast with a non-dry-run, where the stream is written to standard output .Po contrast with a non-dry-run, where the stream is written to standard output
and the verbose output goes to standard error and the verbose output goes to standard error
.Pc . .Pc .
.It Fl p, -props .It Fl p , -props
Include the dataset's properties in the stream. Include the dataset's properties in the stream.
This flag is implicit when This flag is implicit when
.Fl R .Fl R
is specified. is specified.
The receiving system must also support this feature. Sends of encrypted datasets The receiving system must also support this feature.
must use Sends of encrypted datasets must use
.Fl w .Fl w
when using this flag. when using this flag.
.It Fl s, -skip-missing .It Fl s , -skip-missing
Allows sending a replication stream even when there are snapshots missing in the Allows sending a replication stream even when there are snapshots missing in the
hierarchy. When a snapshot is missing, instead of throwing an error and aborting hierarchy.
the send, a warning is printed to STDERR and the dataset to which it belongs When a snapshot is missing, instead of throwing an error and aborting the send,
and its descendents are skipped. This flag can only be used in conjunction with a warning is printed to the standard error stream and the dataset to which it belongs
and its descendents are skipped.
This flag can only be used in conjunction with
.Fl R . .Fl R .
.It Fl v, -verbose .It Fl v , -verbose
Print verbose information about the stream package generated. Print verbose information about the stream package generated.
This information includes a per-second report of how much data has been sent. This information includes a per-second report of how much data has been sent.
.Pp .Pp
@ -291,7 +297,7 @@ When the stream generated from a filesystem or volume is received, the default
snapshot name will be snapshot name will be
.Qq --head-- . .Qq --head-- .
.Bl -tag -width "-L" .Bl -tag -width "-L"
.It Fl L, -large-block .It Fl L , -large-block
Generate a stream which may contain blocks larger than 128KB. Generate a stream which may contain blocks larger than 128KB.
This flag has no effect if the This flag has no effect if the
.Sy large_blocks .Sy large_blocks
@ -306,9 +312,9 @@ See
for details on ZFS feature flags and the for details on ZFS feature flags and the
.Sy large_blocks .Sy large_blocks
feature. feature.
.It Fl P, -parsable .It Fl P , -parsable
Print machine-parsable verbose information about the stream package generated. Print machine-parsable verbose information about the stream package generated.
.It Fl c, -compressed .It Fl c , -compressed
Generate a more compact stream by using compressed WRITE records for blocks Generate a more compact stream by using compressed WRITE records for blocks
which are compressed on disk and in memory which are compressed on disk and in memory
.Po see the .Po see the
@ -327,24 +333,25 @@ option is not supplied in conjunction with
.Fl c , .Fl c ,
then the data will be decompressed before sending so it can be split into then the data will be decompressed before sending so it can be split into
smaller block sizes. smaller block sizes.
.It Fl w, -raw .It Fl w , -raw
For encrypted datasets, send data exactly as it exists on disk. This allows For encrypted datasets, send data exactly as it exists on disk.
backups to be taken even if encryption keys are not currently loaded. The This allows backups to be taken even if encryption keys are not currently loaded.
backup may then be received on an untrusted machine since that machine will The backup may then be received on an untrusted machine since that machine will
not have the encryption keys to read the protected data or alter it without not have the encryption keys to read the protected data or alter it without
being detected. Upon being received, the dataset will have the same encryption being detected.
Upon being received, the dataset will have the same encryption
keys as it did on the send side, although the keys as it did on the send side, although the
.Sy keylocation .Sy keylocation
property will be defaulted to property will be defaulted to
.Sy prompt .Sy prompt
if not otherwise provided. For unencrypted datasets, this flag will be if not otherwise provided.
equivalent to For unencrypted datasets, this flag will be equivalent to
.Fl Lec . .Fl Lec .
Note that if you do not use this flag for sending encrypted datasets, data will Note that if you do not use this flag for sending encrypted datasets, data will
be sent unencrypted and may be re-encrypted with a different encryption key on be sent unencrypted and may be re-encrypted with a different encryption key on
the receiving system, which will disable the ability to do a raw send to that the receiving system, which will disable the ability to do a raw send to that
system for incrementals. system for incrementals.
.It Fl e, -embed .It Fl e , -embed
Generate a more compact stream by using Generate a more compact stream by using
.Sy WRITE_EMBEDDED .Sy WRITE_EMBEDDED
records for blocks which are stored more compactly on disk by the records for blocks which are stored more compactly on disk by the
@ -359,8 +366,9 @@ feature enabled.
If the If the
.Sy lz4_compress .Sy lz4_compress
feature is active on the sending system, then the receiving system must have feature is active on the sending system, then the receiving system must have
that feature enabled as well. Datasets that are sent with this flag may not be that feature enabled as well.
received as an encrypted dataset, since encrypted datasets cannot use the Datasets that are sent with this flag may not be received as an encrypted dataset,
since encrypted datasets cannot use the
.Sy embedded_data .Sy embedded_data
feature. feature.
See See
@ -383,7 +391,7 @@ character and following
If the incremental target is a clone, the incremental source can be the origin If the incremental target is a clone, the incremental source can be the origin
snapshot, or an earlier snapshot in the origin's filesystem, or the origin's snapshot, or an earlier snapshot in the origin's filesystem, or the origin's
origin, etc. origin, etc.
.It Fl n, -dryrun .It Fl n , -dryrun
Do a dry-run Do a dry-run
.Pq Qq No-op .Pq Qq No-op
send. send.
@ -397,7 +405,7 @@ In this case, the verbose output will be written to standard output
.Po contrast with a non-dry-run, where the stream is written to standard output .Po contrast with a non-dry-run, where the stream is written to standard output
and the verbose output goes to standard error and the verbose output goes to standard error
.Pc . .Pc .
.It Fl v, -verbose .It Fl v , -verbose
Print verbose information about the stream package generated. Print verbose information about the stream package generated.
This information includes a per-second report of how much data has been sent. This information includes a per-second report of how much data has been sent.
.El .El
@ -406,7 +414,6 @@ This information includes a per-second report of how much data has been sent.
.Cm send .Cm send
.Fl -redact Ar redaction_bookmark .Fl -redact Ar redaction_bookmark
.Op Fl DLPcenpv .Op Fl DLPcenpv
.br
.Op Fl i Ar snapshot Ns | Ns Ar bookmark .Op Fl i Ar snapshot Ns | Ns Ar bookmark
.Ar snapshot .Ar snapshot
.Xc .Xc
@ -415,15 +422,15 @@ This send stream contains all blocks from the snapshot being sent that aren't
included in the redaction list contained in the bookmark specified by the included in the redaction list contained in the bookmark specified by the
.Fl -redact .Fl -redact
(or (or
.Fl -d .Fl d )
) flag. flag.
The resulting send stream is said to be redacted with respect to the snapshots The resulting send stream is said to be redacted with respect to the snapshots
the bookmark specified by the the bookmark specified by the
.Fl -redact No flag was created with. .Fl -redact No flag was created with.
The bookmark must have been created by running The bookmark must have been created by running
.Sy zfs redact .Nm zfs Cm redact
on the snapshot being sent. on the snapshot being sent.
.sp .Pp
This feature can be used to allow clones of a filesystem to be made available on This feature can be used to allow clones of a filesystem to be made available on
a remote system, in the case where their parent need not (or needs to not) be a remote system, in the case where their parent need not (or needs to not) be
usable. usable.
@ -439,21 +446,23 @@ parent, that block will not be sent; but if one or more snapshots have not
modified a block in the parent, they will still reference the parent's block, so modified a block in the parent, they will still reference the parent's block, so
that block will be sent. that block will be sent.
Note that only user data will be redacted. Note that only user data will be redacted.
.sp .Pp
When the redacted send stream is received, we will generate a redacted When the redacted send stream is received, we will generate a redacted
snapshot. snapshot.
Due to the nature of redaction, a redacted dataset can only be used in the Due to the nature of redaction, a redacted dataset can only be used in the
following ways: following ways:
.sp .Bl -enum -width "a."
1. To receive, as a clone, an incremental send from the original snapshot to one .It
To receive, as a clone, an incremental send from the original snapshot to one
of the snapshots it was redacted with respect to. of the snapshots it was redacted with respect to.
In this case, the stream will produce a valid dataset when received because all In this case, the stream will produce a valid dataset when received because all
blocks that were redacted in the parent are guaranteed to be present in the blocks that were redacted in the parent are guaranteed to be present in the
child's send stream. child's send stream.
This use case will produce a normal snapshot, which can be used just like other This use case will produce a normal snapshot, which can be used just like other
snapshots. snapshots.
.sp .
2. To receive an incremental send from the original snapshot to something .It
To receive an incremental send from the original snapshot to something
redacted with respect to a subset of the set of snapshots the initial snapshot redacted with respect to a subset of the set of snapshots the initial snapshot
was redacted with respect to. was redacted with respect to.
In this case, each block that was redacted in the original is still redacted In this case, each block that was redacted in the original is still redacted
@ -461,8 +470,8 @@ In this case, each block that was redacted in the original is still redacted
(because the snapshots define what is permitted, and everything else is (because the snapshots define what is permitted, and everything else is
redacted)). redacted)).
This use case will produce a new redacted snapshot. This use case will produce a new redacted snapshot.
.sp .It
3. To receive an incremental send from a redaction bookmark of the original To receive an incremental send from a redaction bookmark of the original
snapshot that was created when redacting with respect to a subset of the set of snapshot that was created when redacting with respect to a subset of the set of
snapshots the initial snapshot was created with respect to snapshots the initial snapshot was created with respect to
anything else. anything else.
@ -471,27 +480,30 @@ necessary to fill in any redacted data, should it be needed, because the sending
system is aware of what blocks were originally redacted. system is aware of what blocks were originally redacted.
This will either produce a normal snapshot or a redacted one, depending on This will either produce a normal snapshot or a redacted one, depending on
whether the new send stream is redacted. whether the new send stream is redacted.
.sp .It
4. To receive an incremental send from a redacted version of the initial To receive an incremental send from a redacted version of the initial
snapshot that is redacted with respect to a subject of the set of snapshots the snapshot that is redacted with respect to a subject of the set of snapshots the
initial snapshot was created with respect to. initial snapshot was created with respect to.
A send stream from a compatible redacted dataset will contain all of the blocks A send stream from a compatible redacted dataset will contain all of the blocks
necessary to fill in any redacted data. necessary to fill in any redacted data.
This will either produce a normal snapshot or a redacted one, depending on This will either produce a normal snapshot or a redacted one, depending on
whether the new send stream is redacted. whether the new send stream is redacted.
.sp .It
5. To receive a full send as a clone of the redacted snapshot. To receive a full send as a clone of the redacted snapshot.
Since the stream is a full send, it definitionally contains all the data needed Since the stream is a full send, it definitionally contains all the data needed
to create a new dataset. to create a new dataset.
This use case will either produce a normal snapshot or a redacted one, depending This use case will either produce a normal snapshot or a redacted one, depending
on whether the full send stream was redacted. on whether the full send stream was redacted.
.sp .El
These restrictions are detected and enforced by \fBzfs receive\fR; a .Pp
redacted send stream will contain the list of snapshots that the stream is These restrictions are detected and enforced by
.Nm zfs Cm receive ;
a redacted send stream will contain the list of snapshots that the stream is
redacted with respect to. redacted with respect to.
These are stored with the redacted snapshot, and are used to detect and These are stored with the redacted snapshot, and are used to detect and
correctly handle the cases above. Note that for technical reasons, raw sends correctly handle the cases above.
and redacted sends cannot be combined at this time. Note that for technical reasons,
raw sends and redacted sends cannot be combined at this time.
.It Xo .It Xo
.Nm zfs .Nm zfs
.Cm send .Cm send
@ -505,7 +517,7 @@ The
is the value of this property on the filesystem or volume that was being is the value of this property on the filesystem or volume that was being
received into. received into.
See the documentation for See the documentation for
.Sy zfs receive -s .Nm zfs Cm receive Fl s
for more details. for more details.
.It Xo .It Xo
.Nm zfs .Nm zfs
@ -517,18 +529,19 @@ for more details.
.Xc .Xc
Generate a send stream from a dataset that has been partially received. Generate a send stream from a dataset that has been partially received.
.Bl -tag -width "-L" .Bl -tag -width "-L"
.It Fl S, -saved .It Fl S , -saved
This flag requires that the specified filesystem previously received a resumable This flag requires that the specified filesystem previously received a resumable
send that did not finish and was interrupted. In such scenarios this flag send that did not finish and was interrupted.
enables the user to send this partially received state. Using this flag will In such scenarios this flag
always use the last fully received snapshot as the incremental source if it enables the user to send this partially received state.
exists. Using this flag will always use the last fully received snapshot
as the incremental source if it exists.
.El .El
.It Xo .It Xo
.Nm zfs .Nm zfs
.Cm redact .Cm redact
.Ar snapshot redaction_bookmark .Ar snapshot redaction_bookmark
.Ar redaction_snapshot Ns ... .Ar redaction_snapshot Ns
.Xc .Xc
Generate a new redaction bookmark. Generate a new redaction bookmark.
In addition to the typical bookmark information, a redaction bookmark contains In addition to the typical bookmark information, a redaction bookmark contains
@ -538,81 +551,96 @@ of the redaction snapshots.
These blocks are found by iterating over the metadata in each redaction snapshot These blocks are found by iterating over the metadata in each redaction snapshot
to determine what has been changed since the target snapshot. to determine what has been changed since the target snapshot.
Redaction is designed to support redacted zfs sends; see the entry for Redaction is designed to support redacted zfs sends; see the entry for
.Sy zfs send .Nm zfs Cm send
for more information on the purpose of this operation. for more information on the purpose of this operation.
If a redact operation fails partway through (due to an error or a system If a redact operation fails partway through (due to an error or a system
failure), the redaction can be resumed by rerunning the same command. failure), the redaction can be resumed by rerunning the same command.
.El .El
.Ss Redaction .Ss Redaction
ZFS has support for a limited version of data subsetting, in the form of ZFS has support for a limited version of data subsetting, in the form of
redaction. Using the redaction.
.Sy zfs redact Using the
.Nm zfs Cm redact
command, a command, a
.Sy redaction bookmark .Sy redaction bookmark
can be created that stores a list of blocks containing sensitive information. When can be created that stores a list of blocks containing sensitive information.
provided to When provided to
.Sy zfs .Nm zfs Cm send ,
.Sy send ,
this causes a this causes a
.Sy redacted send .Sy redacted send
to occur. Redacted sends omit the blocks containing sensitive information, to occur.
replacing them with REDACT records. When these send streams are received, a Redacted sends omit the blocks containing sensitive information,
replacing them with REDACT records.
When these send streams are received, a
.Sy redacted dataset .Sy redacted dataset
is created. A redacted dataset cannot be mounted by default, since it is is created.
incomplete. It can be used to receive other send streams. In this way datasets A redacted dataset cannot be mounted by default, since it is incomplete.
can be used for data backup and replication, with all the benefits that zfs send It can be used to receive other send streams.
and receive have to offer, while protecting sensitive information from being In this way datasets can be used for data backup and replication,
with all the benefits that zfs send and receive have to offer,
while protecting sensitive information from being
stored on less-trusted machines or services. stored on less-trusted machines or services.
.Pp .Pp
For the purposes of redaction, there are two steps to the process. A redact For the purposes of redaction, there are two steps to the process.
step, and a send/receive step. First, a redaction bookmark is created. This is A redact step, and a send/receive step.
done by providing the First, a redaction bookmark is created.
.Sy zfs redact This is done by providing the
.Nm zfs Cm redact
command with a parent snapshot, a bookmark to be created, and a number of command with a parent snapshot, a bookmark to be created, and a number of
redaction snapshots. These redaction snapshots must be descendants of the redaction snapshots.
parent snapshot, and they should modify data that is considered sensitive in These redaction snapshots must be descendants of the parent snapshot,
some way. Any blocks of data modified by all of the redaction snapshots will and they should modify data that is considered sensitive in some way.
Any blocks of data modified by all of the redaction snapshots will
be listed in the redaction bookmark, because it represents the truly sensitive be listed in the redaction bookmark, because it represents the truly sensitive
information. When it comes to the send step, the send process will not send information.
When it comes to the send step, the send process will not send
the blocks listed in the redaction bookmark, instead replacing them with the blocks listed in the redaction bookmark, instead replacing them with
REDACT records. When received on the target system, this will create a REDACT records.
When received on the target system, this will create a
redacted dataset, missing the data that corresponds to the blocks in the redacted dataset, missing the data that corresponds to the blocks in the
redaction bookmark on the sending system. The incremental send streams from redaction bookmark on the sending system.
The incremental send streams from
the original parent to the redaction snapshots can then also be received on the original parent to the redaction snapshots can then also be received on
the target system, and this will produce a complete snapshot that can be used the target system, and this will produce a complete snapshot that can be used
normally. Incrementals from one snapshot on the parent filesystem and another normally.
Incrementals from one snapshot on the parent filesystem and another
can also be done by sending from the redaction bookmark, rather than the can also be done by sending from the redaction bookmark, rather than the
snapshots themselves. snapshots themselves.
.Pp .Pp
In order to make the purpose of the feature more clear, an example is In order to make the purpose of the feature more clear, an example is provided.
provided. Consider a zfs filesystem containing four files. These files Consider a zfs filesystem containing four files.
represent information for an online shopping service. One file contains a list These files represent information for an online shopping service.
of usernames and passwords, another contains purchase histories, a third One file contains a list of usernames and passwords, another contains purchase histories,
contains click tracking data, and a fourth contains user preferences. The a third contains click tracking data, and a fourth contains user preferences.
owner of this data wants to make it available for their development teams to The owner of this data wants to make it available for their development teams to
test against, and their market research teams to do analysis on. The test against, and their market research teams to do analysis on.
development teams need information about user preferences and the click The development teams need information about user preferences and the click
tracking data, while the market research teams need information about purchase tracking data, while the market research teams need information about purchase
histories and user preferences. Neither needs access to the usernames and histories and user preferences.
passwords. However, because all of this data is stored in one ZFS filesystem, Neither needs access to the usernames and passwords.
it must all be sent and received together. In addition, the owner of the data However, because all of this data is stored in one ZFS filesystem,
it must all be sent and received together.
In addition, the owner of the data
wants to take advantage of features like compression, checksumming, and wants to take advantage of features like compression, checksumming, and
snapshots, so they do want to continue to use ZFS to store and transmit their snapshots, so they do want to continue to use ZFS to store and transmit their data.
data. Redaction can help them do so. First, they would make two clones of a Redaction can help them do so.
snapshot of the data on the source. In one clone, they create the setup they First, they would make two clones of a snapshot of the data on the source.
want their market research team to see; they delete the usernames and In one clone, they create the setup they want their market research team to see;
passwords file, and overwrite the click tracking data with dummy they delete the usernames and passwords file,
information. In another, they create the setup they want the development teams and overwrite the click tracking data with dummy information.
In another, they create the setup they want the development teams
to see, by replacing the passwords with fake information and replacing the to see, by replacing the passwords with fake information and replacing the
purchase histories with randomly generated ones. They would then create a purchase histories with randomly generated ones.
redaction bookmark on the parent snapshot, using snapshots on the two clones They would then create a redaction bookmark on the parent snapshot,
as redaction snapshots. The parent can then be sent, redacted, to the target using snapshots on the two clones as redaction snapshots.
server where the research and development teams have access. Finally, The parent can then be sent, redacted, to the target
incremental sends from the parent snapshot to each of the clones can be send server where the research and development teams have access.
Finally, incremental sends from the parent snapshot to each of the clones can be sent
to and received on the target server; these snapshots are identical to the to and received on the target server; these snapshots are identical to the
ones on the source, and are ready to be used, while the parent snapshot on the ones on the source, and are ready to be used, while the parent snapshot on the
target contains none of the username and password data present on the source, target contains none of the username and password data present on the source,
because it was removed by the redacted send operation. because it was removed by the redacted send operation.
.
.Sh SEE ALSO .Sh SEE ALSO
.Xr zfs-bookmark 8 , .Xr zfs-bookmark 8 ,
.Xr zfs-receive 8 , .Xr zfs-receive 8 ,

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
@ -30,37 +29,39 @@
.\" Copyright 2018 Nexenta Systems, Inc. .\" Copyright 2018 Nexenta Systems, Inc.
.\" Copyright 2019 Joyent, Inc. .\" Copyright 2019 Joyent, Inc.
.\" .\"
.Dd June 30, 2019 .Dd June 2, 2021
.Dt ZFS-SET 8 .Dt ZFS-SET 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zfs-set .Nm zfs-set
.Nd Sets the property or list of properties to the given value(s) for each dataset. .Nd set properties on ZFS datasets
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zfs .Nm zfs
.Cm set .Cm set
.Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ... .Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns
.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns
.Nm zfs .Nm zfs
.Cm get .Cm get
.Op Fl r Ns | Ns Fl d Ar depth .Op Fl r Ns | Ns Fl d Ar depth
.Op Fl Hp .Op Fl Hp
.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns Oc
.Oo Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... Oc .Oo Fl s Ar source Ns Oo , Ns Ar source Oc Ns Oc
.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns Oc
.Cm all | Ar property Ns Oo , Ns Ar property Oc Ns ... .Cm all Ns | Ns Ar property Ns Oo , Ns Ar property Oc Ns
.Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns | Ns Ar bookmark Oc Ns ... .Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns | Ns Ar bookmark Oc Ns
.Nm zfs .Nm zfs
.Cm inherit .Cm inherit
.Op Fl rS .Op Fl rS
.Ar property Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Ar property Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width "" .Bl -tag -width ""
.It Xo .It Xo
.Nm zfs .Nm zfs
.Cm set .Cm set
.Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns ... .Ar property Ns = Ns Ar value Oo Ar property Ns = Ns Ar value Oc Ns
.Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns
.Xc .Xc
Only some properties can be edited. Only some properties can be edited.
See See
@ -83,39 +84,43 @@ section of
.Cm get .Cm get
.Op Fl r Ns | Ns Fl d Ar depth .Op Fl r Ns | Ns Fl d Ar depth
.Op Fl Hp .Op Fl Hp
.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns Oc
.Oo Fl s Ar source Ns Oo , Ns Ar source Oc Ns ... Oc .Oo Fl s Ar source Ns Oo , Ns Ar source Oc Ns Oc
.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns Oc
.Cm all | Ar property Ns Oo , Ns Ar property Oc Ns ... .Cm all Ns | Ns Ar property Ns Oo , Ns Ar property Oc Ns
.Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns | Ns Ar bookmark Oc Ns ... .Oo Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns | Ns Ar bookmark Oc Ns
.Xc .Xc
Displays properties for the given datasets. Displays properties for the given datasets.
If no datasets are specified, then the command displays properties for all If no datasets are specified, then the command displays properties for all
datasets on the system. datasets on the system.
For each property, the following columns are displayed: For each property, the following columns are displayed:
.Bd -literal .Bl -tag -compact -offset 4n -width "property"
name Dataset name .It Sy name
property Property name Dataset name
value Property value .It Sy property
source Property source \fBlocal\fP, \fBdefault\fP, \fBinherited\fP, Property name
\fBtemporary\fP, \fBreceived\fP or none (\fB-\fP). .It Sy value
.Ed Property value
.It Sy source
Property source
.Sy local , default , inherited , temporary , received , No or Sy - Pq none .
.El
.Pp .Pp
All columns are displayed by default, though this can be controlled by using the All columns are displayed by default, though this can be controlled by using the
.Fl o .Fl o
option. option.
This command takes a comma-separated list of properties as described in the This command takes a comma-separated list of properties as described in the
.Em Native Properties .Sx Native Properties
and and
.Em User Properties .Sx User Properties
sections of sections of
.Xr zfsprops 8 . .Xr zfsprops 8 .
.Pp .Pp
The value The value
.Sy all .Sy all
can be used to display all properties that apply to the given dataset's type can be used to display all properties that apply to the given dataset's type
.Pq filesystem, volume, snapshot, or bookmark . .Pq Sy filesystem , volume , snapshot , No or Sy bookmark .
.Bl -tag -width "-H" .Bl -tag -width "-s source"
.It Fl H .It Fl H
Display output in a form more easily parsed by scripts. Display output in a form more easily parsed by scripts.
Any headers are omitted, and fields are explicitly separated by a single tab Any headers are omitted, and fields are explicitly separated by a single tab
@ -127,9 +132,8 @@ A depth of
.Sy 1 .Sy 1
will display only the dataset and its direct children. will display only the dataset and its direct children.
.It Fl o Ar field .It Fl o Ar field
A comma-separated list of columns to display. A comma-separated list of columns to display, defaults to
.Sy name Ns \&, Ns Sy property Ns \&, Ns Sy value Ns \&, Ns Sy source .Sy name , Ns Sy property , Ns Sy value , Ns Sy source .
is the default value.
.It Fl p .It Fl p
Display numbers in parsable Display numbers in parsable
.Pq exact .Pq exact
@ -140,30 +144,19 @@ Recursively display properties for any children.
A comma-separated list of sources to display. A comma-separated list of sources to display.
Those properties coming from a source other than those in this list are ignored. Those properties coming from a source other than those in this list are ignored.
Each source must be one of the following: Each source must be one of the following:
.Sy local , .Sy local , default , inherited , temporary , received , No or Sy none .
.Sy default ,
.Sy inherited ,
.Sy temporary ,
.Sy received ,
and
.Sy none .
The default value is all sources. The default value is all sources.
.It Fl t Ar type .It Fl t Ar type
A comma-separated list of types to display, where A comma-separated list of types to display, where
.Ar type .Ar type
is one of is one of
.Sy filesystem , .Sy filesystem , snapshot , volume , bookmark , No or Sy all .
.Sy snapshot ,
.Sy volume ,
.Sy bookmark ,
or
.Sy all .
.El .El
.It Xo .It Xo
.Nm zfs .Nm zfs
.Cm inherit .Cm inherit
.Op Fl rS .Op Fl rS
.Ar property Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns ... .Ar property Ar filesystem Ns | Ns Ar volume Ns | Ns Ar snapshot Ns
.Xc .Xc
Clears the specified property, causing it to be inherited from an ancestor, Clears the specified property, causing it to be inherited from an ancestor,
restored to default if no ancestor has the property set, or with the restored to default if no ancestor has the property set, or with the
@ -183,6 +176,7 @@ if the
option was not specified. option was not specified.
.El .El
.El .El
.
.Sh SEE ALSO .Sh SEE ALSO
.Xr zfs-list 8 , .Xr zfs-list 8 ,
.Xr zfsprops 8 .Xr zfsprops 8

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
@ -33,22 +32,24 @@
.Dd June 30, 2019 .Dd June 30, 2019
.Dt ZFS-SHARE 8 .Dt ZFS-SHARE 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zfs-share .Nm zfs-share
.Nd Shares and unshares available ZFS filesystems. .Nd share and unshare ZFS filesystems
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zfs .Nm zfs
.Cm share .Cm share
.Fl a | Ar filesystem .Fl a Ns | Ns Ar filesystem
.Nm zfs .Nm zfs
.Cm unshare .Cm unshare
.Fl a | Ar filesystem Ns | Ns Ar mountpoint .Fl a Ns | Ns Ar filesystem Ns | Ns Ar mountpoint
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width "" .Bl -tag -width ""
.It Xo .It Xo
.Nm zfs .Nm zfs
.Cm share .Cm share
.Fl a | Ar filesystem .Fl a Ns | Ns Ar filesystem
.Xc .Xc
Shares available ZFS file systems. Shares available ZFS file systems.
.Bl -tag -width "-a" .Bl -tag -width "-a"
@ -70,7 +71,7 @@ property is set.
.It Xo .It Xo
.Nm zfs .Nm zfs
.Cm unshare .Cm unshare
.Fl a | Ar filesystem Ns | Ns Ar mountpoint .Fl a Ns | Ns Ar filesystem Ns | Ns Ar mountpoint
.Xc .Xc
Unshares currently shared ZFS file systems. Unshares currently shared ZFS file systems.
.Bl -tag -width "-a" .Bl -tag -width "-a"
@ -82,6 +83,7 @@ Unshare the specified filesystem.
The command can also be given a path to a ZFS file system shared on the system. The command can also be given a path to a ZFS file system shared on the system.
.El .El
.El .El
.
.Sh SEE ALSO .Sh SEE ALSO
.Xr exports 5 , .Xr exports 5 ,
.Xr smb.conf 5 , .Xr smb.conf 5 ,

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
@ -30,48 +29,42 @@
.\" Copyright 2018 Nexenta Systems, Inc. .\" Copyright 2018 Nexenta Systems, Inc.
.\" Copyright 2019 Joyent, Inc. .\" Copyright 2019 Joyent, Inc.
.\" .\"
.Dd June 30, 2019 .Dd May 27, 2021
.Dt ZFS-SNAPSHOT 8 .Dt ZFS-SNAPSHOT 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zfs-snapshot .Nm zfs-snapshot
.Nd Creates snapshots with the given names. .Nd create snapshots of ZFS datasets
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zfs .Nm zfs
.Cm snapshot .Cm snapshot
.Op Fl r .Op Fl r
.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Oo Fl o Ar property Ns = Ns Ar value Oc Ns
.Ar filesystem Ns @ Ns Ar snapname Ns | Ns Ar volume Ns @ Ns Ar snapname Ns ... .Ar dataset Ns @ Ns Ar snapname Ns
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width ""
.It Xo
.Nm zfs
.Cm snapshot
.Op Fl r
.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
.Ar filesystem Ns @ Ns Ar snapname Ns | Ns Ar volume Ns @ Ns Ar snapname Ns ...
.Xc
All previous modifications by successful system calls to the file system are All previous modifications by successful system calls to the file system are
part of the snapshots. part of the snapshots.
Snapshots are taken atomically, so that all snapshots correspond to the same Snapshots are taken atomically, so that all snapshots correspond to the same
moment in time. moment in time.
.Nm zfs Cm snap .Nm zfs Cm snap
can be used as an alias for can be used as an alias for
.Nm zfs Cm snapshot. .Nm zfs Cm snapshot .
See the See the
.Em Snapshots .Sx Snapshots
section of section of
.Xr zfsconcepts 8 .Xr zfsconcepts 8
for details. for details.
.Bl -tag -width "-o" .Bl -tag -width "-o"
.It Fl o Ar property Ns = Ns Ar value .It Fl o Ar property Ns = Ns Ar value
Sets the specified property; see Set the specified property; see
.Nm zfs Cm create .Nm zfs Cm create
for details. for details.
.It Fl r .It Fl r
Recursively create snapshots of all descendent datasets Recursively create snapshots of all descendent datasets
.El .El
.El .
.Sh SEE ALSO .Sh SEE ALSO
.Xr zfs-bookmark 8 , .Xr zfs-bookmark 8 ,
.Xr zfs-clone 8 , .Xr zfs-clone 8 ,

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
@ -33,9 +32,10 @@
.Dd June 30, 2019 .Dd June 30, 2019
.Dt ZFS-UPGRADE 8 .Dt ZFS-UPGRADE 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zfs-upgrade .Nm zfs-upgrade
.Nd Manage upgrading the on-disk version of filesystems. .Nd manage on-disk version of ZFS filesystems
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zfs .Nm zfs
.Cm upgrade .Cm upgrade
@ -46,7 +46,8 @@
.Cm upgrade .Cm upgrade
.Op Fl r .Op Fl r
.Op Fl V Ar version .Op Fl V Ar version
.Fl a | Ar filesystem .Fl a Ns | Ns Ar filesystem
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width "" .Bl -tag -width ""
.It Xo .It Xo
@ -65,35 +66,31 @@ Displays a list of currently supported file system versions.
.Cm upgrade .Cm upgrade
.Op Fl r .Op Fl r
.Op Fl V Ar version .Op Fl V Ar version
.Fl a | Ar filesystem .Fl a Ns | Ns Ar filesystem
.Xc .Xc
Upgrades file systems to a new on-disk version. Upgrades file systems to a new on-disk version.
Once this is done, the file systems will no longer be accessible on systems Once this is done, the file systems will no longer be accessible on systems
running older versions of the software. running older versions of ZFS.
.Nm zfs Cm send .Nm zfs Cm send
streams generated from new snapshots of these file systems cannot be accessed on streams generated from new snapshots of these file systems cannot be accessed on
systems running older versions of the software. systems running older versions of ZFS.
.Pp .Pp
In general, the file system version is independent of the pool version. In general, the file system version is independent of the pool version.
See See
.Xr zpool 8 .Xr zpool-features 5
for information on the for information on features of ZFS storage pools.
.Nm zpool Cm upgrade
command.
.Pp .Pp
In some cases, the file system version and the pool version are interrelated and In some cases, the file system version and the pool version are interrelated and
the pool version must be upgraded before the file system version can be the pool version must be upgraded before the file system version can be
upgraded. upgraded.
.Bl -tag -width "-V" .Bl -tag -width "filesystem"
.It Fl V Ar version .It Fl V Ar version
Upgrade to the specified Upgrade to
.Ar version . .Ar version .
If the If not specified, upgrade to the most recent version.
.Fl V
flag is not specified, this command upgrades to the most recent version.
This This
option can only be used to increase the version number, and only up to the most option can only be used to increase the version number, and only up to the most
recent version supported by this software. recent version supported by this version of ZFS.
.It Fl a .It Fl a
Upgrade all file systems on all imported pools. Upgrade all file systems on all imported pools.
.It Ar filesystem .It Ar filesystem

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
@ -33,43 +32,45 @@
.Dd June 30, 2019 .Dd June 30, 2019
.Dt ZFS-USERSPACE 8 .Dt ZFS-USERSPACE 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zfs-userspace .Nm zfs-userspace
.Nd Displays space consumed by, and quotas on, each user or group in the specified filesystem or snapshot. .Nd display space and quotas of ZFS dataset
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zfs .Nm zfs
.Cm userspace .Cm userspace
.Op Fl Hinp .Op Fl Hinp
.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns Oc
.Oo Fl s Ar field Oc Ns ... .Oo Fl s Ar field Oc Ns
.Oo Fl S Ar field Oc Ns ... .Oo Fl S Ar field Oc Ns
.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns Oc
.Ar filesystem Ns | Ns Ar snapshot Ns | Ns Ar path .Ar filesystem Ns | Ns Ar snapshot Ns | Ns Ar path
.Nm zfs .Nm zfs
.Cm groupspace .Cm groupspace
.Op Fl Hinp .Op Fl Hinp
.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns Oc
.Oo Fl s Ar field Oc Ns ... .Oo Fl s Ar field Oc Ns
.Oo Fl S Ar field Oc Ns ... .Oo Fl S Ar field Oc Ns
.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns Oc
.Ar filesystem Ns | Ns Ar snapshot Ns | Ns Ar path .Ar filesystem Ns | Ns Ar snapshot Ns | Ns Ar path
.Nm zfs .Nm zfs
.Cm projectspace .Cm projectspace
.Op Fl Hp .Op Fl Hp
.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns Oc
.Oo Fl s Ar field Oc Ns ... .Oo Fl s Ar field Oc Ns
.Oo Fl S Ar field Oc Ns ... .Oo Fl S Ar field Oc Ns
.Ar filesystem Ns | Ns Ar snapshot Ns | Ns Ar path .Ar filesystem Ns | Ns Ar snapshot Ns | Ns Ar path
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width "" .Bl -tag -width ""
.It Xo .It Xo
.Nm zfs .Nm zfs
.Cm userspace .Cm userspace
.Op Fl Hinp .Op Fl Hinp
.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns Oc
.Oo Fl s Ar field Oc Ns ... .Oo Fl s Ar field Oc Ns
.Oo Fl S Ar field Oc Ns ... .Oo Fl S Ar field Oc Ns
.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns Oc
.Ar filesystem Ns | Ns Ar snapshot Ns | Ns Ar path .Ar filesystem Ns | Ns Ar snapshot Ns | Ns Ar path
.Xc .Xc
Displays space consumed by, and quotas on, each user in the specified filesystem, Displays space consumed by, and quotas on, each user in the specified filesystem,
@ -78,11 +79,11 @@ If a path is given, the filesystem that contains that path will be used.
This corresponds to the This corresponds to the
.Sy userused@ Ns Em user , .Sy userused@ Ns Em user ,
.Sy userobjused@ Ns Em user , .Sy userobjused@ Ns Em user ,
.Sy userquota@ Ns Em user, .Sy userquota@ Ns Em user ,
and and
.Sy userobjquota@ Ns Em user .Sy userobjquota@ Ns Em user
properties. properties.
.Bl -tag -width "-H" .Bl -tag -width "-S field"
.It Fl H .It Fl H
Do not print headers, use tab-delimited output. Do not print headers, use tab-delimited output.
.It Fl S Ar field .It Fl S Ar field
@ -93,10 +94,7 @@ See
Translate SID to POSIX ID. Translate SID to POSIX ID.
The POSIX ID may be ephemeral if no mapping exists. The POSIX ID may be ephemeral if no mapping exists.
Normal POSIX interfaces Normal POSIX interfaces
.Po for example, .Pq like Xr stat 2 , Nm ls Fl l
.Xr stat 2 ,
.Nm ls Fl l
.Pc
perform this translation, so the perform this translation, so the
.Fl i .Fl i
option allows the output from option allows the output from
@ -113,7 +111,7 @@ However, the
option will report that the POSIX entity has the total usage and quota for both. option will report that the POSIX entity has the total usage and quota for both.
.It Fl n .It Fl n
Print numeric ID instead of user/group name. Print numeric ID instead of user/group name.
.It Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... .It Fl o Ar field Ns Oo , Ns Ar field Oc Ns
Display only the specified fields from the following set: Display only the specified fields from the following set:
.Sy type , .Sy type ,
.Sy name , .Sy name ,
@ -134,7 +132,7 @@ flags may be specified multiple times to sort first by one field, then by
another. another.
The default is The default is
.Fl s Sy type Fl s Sy name . .Fl s Sy type Fl s Sy name .
.It Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... .It Fl t Ar type Ns Oo , Ns Ar type Oc Ns
Print only the specified types from the following set: Print only the specified types from the following set:
.Sy all , .Sy all ,
.Sy posixuser , .Sy posixuser ,
@ -142,17 +140,17 @@ Print only the specified types from the following set:
.Sy posixgroup , .Sy posixgroup ,
.Sy smbgroup . .Sy smbgroup .
The default is The default is
.Fl t Sy posixuser Ns \&, Ns Sy smbuser . .Fl t Sy posixuser , Ns Sy smbuser .
The default can be changed to include group types. The default can be changed to include group types.
.El .El
.It Xo .It Xo
.Nm zfs .Nm zfs
.Cm groupspace .Cm groupspace
.Op Fl Hinp .Op Fl Hinp
.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns Oc
.Oo Fl s Ar field Oc Ns ... .Oo Fl s Ar field Oc Ns
.Oo Fl S Ar field Oc Ns ... .Oo Fl S Ar field Oc Ns
.Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns ... Oc .Oo Fl t Ar type Ns Oo , Ns Ar type Oc Ns Oc
.Ar filesystem Ns | Ns Ar snapshot .Ar filesystem Ns | Ns Ar snapshot
.Xc .Xc
Displays space consumed by, and quotas on, each group in the specified Displays space consumed by, and quotas on, each group in the specified
@ -160,28 +158,30 @@ filesystem or snapshot.
This subcommand is identical to This subcommand is identical to
.Cm userspace , .Cm userspace ,
except that the default types to display are except that the default types to display are
.Fl t Sy posixgroup Ns \&, Ns Sy smbgroup . .Fl t Sy posixgroup , Ns Sy smbgroup .
.It Xo .It Xo
.Nm zfs .Nm zfs
.Cm projectspace .Cm projectspace
.Op Fl Hp .Op Fl Hp
.Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... Oc .Oo Fl o Ar field Ns Oo , Ns Ar field Oc Ns Oc
.Oo Fl s Ar field Oc Ns ... .Oo Fl s Ar field Oc Ns
.Oo Fl S Ar field Oc Ns ... .Oo Fl S Ar field Oc Ns
.Ar filesystem Ns | Ns Ar snapshot Ns | Ns Ar path .Ar filesystem Ns | Ns Ar snapshot Ns | Ns Ar path
.Xc .Xc
Displays space consumed by, and quotas on, each project in the specified Displays space consumed by, and quotas on, each project in the specified
filesystem or snapshot. This subcommand is identical to filesystem or snapshot.
This subcommand is identical to
.Cm userspace , .Cm userspace ,
except that the project identifier is numeral, not name. So need neither except that the project identifier is a numeral, not a name.
the option So need neither the option
.Sy -i .Fl i
for SID to POSIX ID nor for SID to POSIX ID nor
.Sy -n .Fl n
for numeric ID, nor for numeric ID, nor
.Sy -t .Fl t
for types. for types.
.El .El
.
.Sh SEE ALSO .Sh SEE ALSO
.Xr zfs-set 8 , .Xr zfs-set 8 ,
.Xr zfsprops 8 .Xr zfsprops 8

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
@ -40,17 +39,19 @@
.Dd June 30, 2019 .Dd June 30, 2019
.Dt ZFS 8 .Dt ZFS 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zfs .Nm zfs
.Nd configures ZFS file systems .Nd configure ZFS datasets
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm .Nm
.Fl ?V .Fl ?V
.Nm .Nm
.Cm version .Cm version
.Nm .Nm
.Cm <subcommand> .Cm subcommand
.Op Ar <args> .Op Ar arguments
.
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Nm .Nm
@ -58,23 +59,18 @@ command configures ZFS datasets within a ZFS storage pool, as described in
.Xr zpool 8 . .Xr zpool 8 .
A dataset is identified by a unique path within the ZFS namespace. A dataset is identified by a unique path within the ZFS namespace.
For example: For example:
.Bd -literal .Dl pool/{filesystem,volume,snapshot}
pool/{filesystem,volume,snapshot}
.Ed
.Pp .Pp
where the maximum length of a dataset name is where the maximum length of a dataset name is
.Dv MAXNAMELEN .Sy MAXNAMELEN Pq 256B
.Pq 256 bytes
and the maximum amount of nesting allowed in a path is 50 levels deep. and the maximum amount of nesting allowed in a path is 50 levels deep.
.Pp .Pp
A dataset can be one of the following: A dataset can be one of the following:
.Bl -tag -width "file system" .Bl -tag -offset Ds -width "file system"
.It Sy file system .It Sy file system
A ZFS dataset of type Can be mounted within the standard system namespace and behaves like other file
.Sy filesystem
can be mounted within the standard system namespace and behaves like other file
systems. systems.
While ZFS file systems are designed to be POSIX compliant, known issues exist While ZFS file systems are designed to be POSIX-compliant, known issues exist
that prevent compliance in some cases. that prevent compliance in some cases.
Applications that depend on standards conformance might fail due to non-standard Applications that depend on standards conformance might fail due to non-standard
behavior when checking file system free space. behavior when checking file system free space.
@ -92,38 +88,39 @@ or
Much like a Much like a
.Sy snapshot , .Sy snapshot ,
but without the hold on on-disk data. but without the hold on on-disk data.
It can be used as the source of a send (but not for a receive). It is specified as It can be used as the source of a send (but not for a receive).
It is specified as
.Ar filesystem Ns # Ns Ar name .Ar filesystem Ns # Ns Ar name
or or
.Ar volume Ns # Ns Ar name . .Ar volume Ns # Ns Ar name .
.El .El
.Pp .Pp
For details see See
.Xr zfsconcepts 8 . .Xr zfsconcepts 8
for details.
.
.Ss Properties .Ss Properties
Properties are divided into two types, native properties and user-defined Properties are divided into two types: native properties and user-defined
.Po or .Pq or Qq user
.Qq user
.Pc
properties. properties.
Native properties either export internal statistics or control ZFS behavior. Native properties either export internal statistics or control ZFS behavior.
In addition, native properties are either editable or read-only. In addition, native properties are either editable or read-only.
User properties have no effect on ZFS behavior, but you can use them to annotate User properties have no effect on ZFS behavior, but you can use them to annotate
datasets in a way that is meaningful in your environment. datasets in a way that is meaningful in your environment.
For more information about properties, see the For more information about properties, see
.Xr zfsprops 8 man page. .Xr zfsprops 8 .
.
.Ss Encryption .Ss Encryption
Enabling the Enabling the
.Sy encryption .Sy encryption
feature allows for the creation of encrypted filesystems and volumes. feature allows for the creation of encrypted filesystems and volumes.
ZFS will encrypt file and zvol data, file attributes, ACLs, permission bits, ZFS will encrypt file and zvol data, file attributes, ACLs, permission bits,
directory listings, FUID mappings, and directory listings, FUID mappings, and
.Sy userused .Sy userused Ns / Ns Sy groupused Ns / Ns Sy projectused
/
.Sy groupused
data. data.
For an overview of encryption see the For an overview of encryption, see
.Xr zfs-load-key 8 command manual. .Xr zfs-load-key 8 .
.
.Sh SUBCOMMANDS .Sh SUBCOMMANDS
All subcommands that modify state are logged persistently to the pool in their All subcommands that modify state are logged persistently to the pool in their
original form. original form.
@ -134,9 +131,6 @@ Displays a help message.
.Nm .Nm
.Fl V , -version .Fl V , -version
.Xc .Xc
An alias for the
.Nm zfs Cm version
subcommand.
.It Xo .It Xo
.Nm .Nm
.Cm version .Cm version
@ -145,6 +139,7 @@ Displays the software version of the
.Nm .Nm
userland utility and the zfs kernel module. userland utility and the zfs kernel module.
.El .El
.
.Ss Dataset Management .Ss Dataset Management
.Bl -tag -width "" .Bl -tag -width ""
.It Xr zfs-list 8 .It Xr zfs-list 8
@ -158,26 +153,25 @@ Renames the given dataset (filesystem or snapshot).
.It Xr zfs-upgrade 8 .It Xr zfs-upgrade 8
Manage upgrading the on-disk version of filesystems. Manage upgrading the on-disk version of filesystems.
.El .El
.
.Ss Snapshots .Ss Snapshots
.Bl -tag -width "" .Bl -tag -width ""
.It Xr zfs-snapshot 8 .It Xr zfs-snapshot 8
Creates snapshots with the given names. Creates snapshots with the given names.
.It Xr zfs-rollback 8 .It Xr zfs-rollback 8
Roll back the given dataset to a previous snapshot. Roll back the given dataset to a previous snapshot.
.It Xo .It Xr zfs-hold 8 Ns / Ns Xr zfs-release 8
.Xr zfs-hold 8 /
.Xr zfs-release 8
.Xc
Add or remove a hold reference to the specified snapshot or snapshots. Add or remove a hold reference to the specified snapshot or snapshots.
If a hold exists on a snapshot, attempts to destroy that snapshot by using the If a hold exists on a snapshot, attempts to destroy that snapshot by using the
.Nm zfs Cm destroy .Nm zfs Cm destroy
command return command return
.Er EBUSY . .Sy EBUSY .
.It Xr zfs-diff 8 .It Xr zfs-diff 8
Display the difference between a snapshot of a given filesystem and another Display the difference between a snapshot of a given filesystem and another
snapshot of that filesystem from a later time or the current contents of the snapshot of that filesystem from a later time or the current contents of the
filesystem. filesystem.
.El .El
.
.Ss Clones .Ss Clones
.Bl -tag -width "" .Bl -tag -width ""
.It Xr zfs-clone 8 .It Xr zfs-clone 8
@ -187,6 +181,7 @@ Promotes a clone file system to no longer be dependent on its
.Qq origin .Qq origin
snapshot. snapshot.
.El .El
.
.Ss Send & Receive .Ss Send & Receive
.Bl -tag -width "" .Bl -tag -width ""
.It Xr zfs-send 8 .It Xr zfs-send 8
@ -211,6 +206,7 @@ This feature can be used to allow clones of a filesystem to be made available on
a remote system, in the case where their parent need not (or needs to not) be a remote system, in the case where their parent need not (or needs to not) be
usable. usable.
.El .El
.
.Ss Properties .Ss Properties
.Bl -tag -width "" .Bl -tag -width ""
.It Xr zfs-get 8 .It Xr zfs-get 8
@ -223,18 +219,16 @@ restored to default if no ancestor has the property set, or with the
.Fl S .Fl S
option reverted to the received value if one exists. option reverted to the received value if one exists.
.El .El
.
.Ss Quotas .Ss Quotas
.Bl -tag -width "" .Bl -tag -width ""
.It Xo .It Xr zfs-userspace 8 Ns / Ns Xr zfs-groupspace 8 Ns / Ns Xr zfs-projectspace 8
.Xr zfs-userspace 8 /
.Xr zfs-groupspace 8 /
.Xr zfs-projectspace 8
.Xc
Displays space consumed by, and quotas on, each user, group, or project Displays space consumed by, and quotas on, each user, group, or project
in the specified filesystem or snapshot. in the specified filesystem or snapshot.
.It Xr zfs-project 8 .It Xr zfs-project 8
List, set, or clear project ID and/or inherit flag on the file(s) or directories. List, set, or clear project ID and/or inherit flag on the file(s) or directories.
.El .El
.
.Ss Mountpoints .Ss Mountpoints
.Bl -tag -width "" .Bl -tag -width ""
.It Xr zfs-mount 8 .It Xr zfs-mount 8
@ -245,6 +239,7 @@ property.
.It Xr zfs-unmount 8 .It Xr zfs-unmount 8
Unmounts currently mounted ZFS file systems. Unmounts currently mounted ZFS file systems.
.El .El
.
.Ss Shares .Ss Shares
.Bl -tag -width "" .Bl -tag -width ""
.It Xr zfs-share 8 .It Xr zfs-share 8
@ -252,6 +247,7 @@ Shares available ZFS file systems.
.It Xr zfs-unshare 8 .It Xr zfs-unshare 8
Unshares currently shared ZFS file systems. Unshares currently shared ZFS file systems.
.El .El
.
.Ss Delegated Administration .Ss Delegated Administration
.Bl -tag -width "" .Bl -tag -width ""
.It Xr zfs-allow 8 .It Xr zfs-allow 8
@ -259,6 +255,7 @@ Delegate permissions on the specified filesystem or volume.
.It Xr zfs-unallow 8 .It Xr zfs-unallow 8
Remove delegated permissions on the specified filesystem or volume. Remove delegated permissions on the specified filesystem or volume.
.El .El
.
.Ss Encryption .Ss Encryption
.Bl -tag -width "" .Bl -tag -width ""
.It Xr zfs-change-key 8 .It Xr zfs-change-key 8
@ -268,12 +265,14 @@ Load the key for the specified encrypted dataset, enabling access.
.It Xr zfs-unload-key 8 .It Xr zfs-unload-key 8
Unload a key for the specified dataset, removing the ability to access the dataset. Unload a key for the specified dataset, removing the ability to access the dataset.
.El .El
.
.Ss Channel Programs .Ss Channel Programs
.Bl -tag -width "" .Bl -tag -width ""
.It Xr zfs-program 8 .It Xr zfs-program 8
Execute ZFS administrative operations Execute ZFS administrative operations
programmatically via a Lua script-language channel program. programmatically via a Lua script-language channel program.
.El .El
.
.Ss Jails .Ss Jails
.Bl -tag -width "" .Bl -tag -width ""
.It Xr zfs-jail 8 .It Xr zfs-jail 8
@ -281,100 +280,101 @@ Attaches a filesystem to a jail.
.It Xr zfs-unjail 8 .It Xr zfs-unjail 8
Detaches a filesystem from a jail. Detaches a filesystem from a jail.
.El .El
.
.Ss Waiting .Ss Waiting
.Bl -tag -width "" .Bl -tag -width ""
.It Xr zfs-wait 8 .It Xr zfs-wait 8
Wait for background activity in a filesystem to complete. Wait for background activity in a filesystem to complete.
.El .El
.
.Sh EXIT STATUS .Sh EXIT STATUS
The The
.Nm .Nm
utility exits 0 on success, 1 if an error occurs, and 2 if invalid command line utility exits
options were specified. .Sy 0
on success,
.Sy 1
if an error occurs, and
.Sy 2
if invalid command line options were specified.
.
.Sh EXAMPLES .Sh EXAMPLES
.Bl -tag -width "" .Bl -tag -width ""
.It Sy Example 1 No Creating a ZFS File System Hierarchy .
.It Sy Example 1 : No Creating a ZFS File System Hierarchy
The following commands create a file system named The following commands create a file system named
.Em pool/home .Ar pool/home
and a file system named and a file system named
.Em pool/home/bob . .Ar pool/home/bob .
The mount point The mount point
.Pa /export/home .Pa /export/home
is set for the parent file system, and is automatically inherited by the child is set for the parent file system, and is automatically inherited by the child
file system. file system.
.Bd -literal .Dl # Nm zfs Cm create Ar pool/home
# zfs create pool/home .Dl # Nm zfs Cm set Sy mountpoint Ns = Ns Ar /export/home pool/home
# zfs set mountpoint=/export/home pool/home .Dl # Nm zfs Cm create Ar pool/home/bob
# zfs create pool/home/bob .
.Ed .It Sy Example 2 : No Creating a ZFS Snapshot
.It Sy Example 2 No Creating a ZFS Snapshot
The following command creates a snapshot named The following command creates a snapshot named
.Sy yesterday . .Ar yesterday .
This snapshot is mounted on demand in the This snapshot is mounted on demand in the
.Pa .zfs/snapshot .Pa .zfs/snapshot
directory at the root of the directory at the root of the
.Em pool/home/bob .Ar pool/home/bob
file system. file system.
.Bd -literal .Dl # Nm zfs Cm snapshot Ar pool/home/bob Ns @ Ns Ar yesterday
# zfs snapshot pool/home/bob@yesterday .
.Ed .It Sy Example 3 : No Creating and Destroying Multiple Snapshots
.It Sy Example 3 No Creating and Destroying Multiple Snapshots
The following command creates snapshots named The following command creates snapshots named
.Sy yesterday .Ar yesterday No of Ar pool/home
of
.Em pool/home
and all of its descendent file systems. and all of its descendent file systems.
Each snapshot is mounted on demand in the Each snapshot is mounted on demand in the
.Pa .zfs/snapshot .Pa .zfs/snapshot
directory at the root of its file system. directory at the root of its file system.
The second command destroys the newly created snapshots. The second command destroys the newly created snapshots.
.Bd -literal .Dl # Nm zfs Cm snapshot Fl r Ar pool/home Ns @ Ns Ar yesterday
# zfs snapshot -r pool/home@yesterday .Dl # Nm zfs Cm destroy Fl r Ar pool/home Ns @ Ns Ar yesterday
# zfs destroy -r pool/home@yesterday .
.Ed .It Sy Example 4 : No Disabling and Enabling File System Compression
.It Sy Example 4 No Disabling and Enabling File System Compression
The following command disables the The following command disables the
.Sy compression .Sy compression
property for all file systems under property for all file systems under
.Em pool/home . .Ar pool/home .
The next command explicitly enables The next command explicitly enables
.Sy compression .Sy compression
for for
.Em pool/home/anne . .Ar pool/home/anne .
.Bd -literal .Dl # Nm zfs Cm set Sy compression Ns = Ns Sy off Ar pool/home
# zfs set compression=off pool/home .Dl # Nm zfs Cm set Sy compression Ns = Ns Sy on Ar pool/home/anne
# zfs set compression=on pool/home/anne .
.Ed .It Sy Example 5 : No Listing ZFS Datasets
.It Sy Example 5 No Listing ZFS Datasets
The following command lists all active file systems and volumes in the system. The following command lists all active file systems and volumes in the system.
Snapshots are displayed if the Snapshots are displayed if
.Sy listsnaps .Sy listsnaps Ns = Ns Sy on .
property is
.Sy on .
The default is The default is
.Sy off . .Sy off .
See See
.Xr zpool 8 .Xr zpoolprops 8
for more information on pool properties. for more information on pool properties.
.Bd -literal .Bd -literal -compact -offset Ds
# zfs list .No # Nm zfs Cm list
NAME USED AVAIL REFER MOUNTPOINT NAME USED AVAIL REFER MOUNTPOINT
pool 450K 457G 18K /pool pool 450K 457G 18K /pool
pool/home 315K 457G 21K /export/home pool/home 315K 457G 21K /export/home
pool/home/anne 18K 457G 18K /export/home/anne pool/home/anne 18K 457G 18K /export/home/anne
pool/home/bob 276K 457G 276K /export/home/bob pool/home/bob 276K 457G 276K /export/home/bob
.Ed .Ed
.It Sy Example 6 No Setting a Quota on a ZFS File System .
.It Sy Example 6 : No Setting a Quota on a ZFS File System
The following command sets a quota of 50 Gbytes for The following command sets a quota of 50 Gbytes for
.Em pool/home/bob . .Ar pool/home/bob :
.Bd -literal .Dl # Nm zfs Cm set Sy quota Ns = Ns Ar 50G pool/home/bob
# zfs set quota=50G pool/home/bob .
.Ed .It Sy Example 7 : No Listing ZFS Properties
.It Sy Example 7 No Listing ZFS Properties
The following command lists all properties for The following command lists all properties for
.Em pool/home/bob . .Ar pool/home/bob :
.Bd -literal .Bd -literal -compact -offset Ds
# zfs get all pool/home/bob .No # Nm zfs Cm get Sy all Ar pool/home/bob
NAME PROPERTY VALUE SOURCE NAME PROPERTY VALUE SOURCE
pool/home/bob type filesystem - pool/home/bob type filesystem -
pool/home/bob creation Tue Jul 21 15:53 2009 - pool/home/bob creation Tue Jul 21 15:53 2009 -
@ -420,63 +420,61 @@ pool/home/bob usedbychildren 0 -
pool/home/bob usedbyrefreservation 0 - pool/home/bob usedbyrefreservation 0 -
.Ed .Ed
.Pp .Pp
The following command gets a single property value. The following command gets a single property value:
.Bd -literal .Bd -literal -compact -offset Ds
# zfs get -H -o value compression pool/home/bob .No # Nm zfs Cm get Fl H o Sy value compression Ar pool/home/bob
on on
.Ed .Ed
.Pp
The following command lists all properties with local settings for The following command lists all properties with local settings for
.Em pool/home/bob . .Ar pool/home/bob :
.Bd -literal .Bd -literal -compact -offset Ds
# zfs get -r -s local -o name,property,value all pool/home/bob .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
NAME PROPERTY VALUE NAME PROPERTY VALUE
pool/home/bob quota 20G pool/home/bob quota 20G
pool/home/bob compression on pool/home/bob compression on
.Ed .Ed
.It Sy Example 8 No Rolling Back a ZFS File System .
.It Sy Example 8 : No Rolling Back a ZFS File System
The following command reverts the contents of The following command reverts the contents of
.Em pool/home/anne .Ar pool/home/anne
to the snapshot named to the snapshot named
.Sy yesterday , .Ar yesterday ,
deleting all intermediate snapshots. deleting all intermediate snapshots:
.Bd -literal .Dl # Nm zfs Cm rollback Fl r Ar pool/home/anne Ns @ Ns Ar yesterday
# zfs rollback -r pool/home/anne@yesterday .
.Ed .It Sy Example 9 : No Creating a ZFS Clone
.It Sy Example 9 No Creating a ZFS Clone
The following command creates a writable file system whose initial contents are The following command creates a writable file system whose initial contents are
the same as the same as
.Em pool/home/bob@yesterday . .Ar pool/home/bob@yesterday .
.Bd -literal .Dl # Nm zfs Cm clone Ar pool/home/bob@yesterday pool/clone
# zfs clone pool/home/bob@yesterday pool/clone .
.Ed .It Sy Example 10 : No Promoting a ZFS Clone
.It Sy Example 10 No Promoting a ZFS Clone
The following commands illustrate how to test out changes to a file system, and The following commands illustrate how to test out changes to a file system, and
then replace the original file system with the changed one, using clones, clone then replace the original file system with the changed one, using clones, clone
promotion, and renaming: promotion, and renaming:
.Bd -literal .Bd -literal -compact -offset Ds
# zfs create pool/project/production .No # Nm zfs Cm create Ar pool/project/production
populate /pool/project/production with data populate /pool/project/production with data
# zfs snapshot pool/project/production@today .No # Nm zfs Cm snapshot Ar pool/project/production Ns @ Ns Ar today
# zfs clone pool/project/production@today pool/project/beta .No # Nm zfs Cm clone Ar pool/project/production@today pool/project/beta
make changes to /pool/project/beta and test them make changes to /pool/project/beta and test them
# zfs promote pool/project/beta .No # Nm zfs Cm promote Ar pool/project/beta
# zfs rename pool/project/production pool/project/legacy .No # Nm zfs Cm rename Ar pool/project/production pool/project/legacy
# zfs rename pool/project/beta pool/project/production .No # Nm zfs Cm rename Ar pool/project/beta pool/project/production
once the legacy version is no longer needed, it can be destroyed once the legacy version is no longer needed, it can be destroyed
# zfs destroy pool/project/legacy .No # Nm zfs Cm destroy Ar pool/project/legacy
.Ed .Ed
.It Sy Example 11 No Inheriting ZFS Properties .
.It Sy Example 11 : No Inheriting ZFS Properties
The following command causes The following command causes
.Em pool/home/bob .Ar pool/home/bob No and Ar pool/home/anne
and
.Em pool/home/anne
to inherit the to inherit the
.Sy checksum .Sy checksum
property from their parent. property from their parent.
.Bd -literal .Dl # Nm zfs Cm inherit Sy checksum Ar pool/home/bob pool/home/anne
# zfs inherit checksum pool/home/bob pool/home/anne .
.Ed .It Sy Example 12 : No Remotely Replicating ZFS Data
.It Sy Example 12 No Remotely Replicating ZFS Data
The following commands send a full stream and then an incremental stream to a The following commands send a full stream and then an incremental stream to a
remote machine, restoring them into remote machine, restoring them into
.Em poolB/received/fs@a .Em poolB/received/fs@a
@ -488,147 +486,145 @@ must contain the file system
.Em poolB/received , .Em poolB/received ,
and must not initially contain and must not initially contain
.Em poolB/received/fs . .Em poolB/received/fs .
.Bd -literal .Bd -literal -compact -offset Ds
# zfs send pool/fs@a | \e .No # Nm zfs Cm send Ar pool/fs@a |
ssh host zfs receive poolB/received/fs@a .No " " Nm ssh Ar host Nm zfs Cm receive Ar poolB/received/fs Ns @ Ns Ar a
# zfs send -i a pool/fs@b | \e .No # Nm zfs Cm send Fl i Ar a pool/fs@b |
ssh host zfs receive poolB/received/fs .No " " Nm ssh Ar host Nm zfs Cm receive Ar poolB/received/fs
.Ed .Ed
.It Sy Example 13 No Using the Nm zfs Cm receive Fl d No Option .
.It Sy Example 13 : No Using the Nm zfs Cm receive Fl d No Option
The following command sends a full stream of The following command sends a full stream of
.Em poolA/fsA/fsB@snap .Ar poolA/fsA/fsB@snap
to a remote machine, receiving it into to a remote machine, receiving it into
.Em poolB/received/fsA/fsB@snap . .Ar poolB/received/fsA/fsB@snap .
The The
.Em fsA/fsB@snap .Ar fsA/fsB@snap
portion of the received snapshot's name is determined from the name of the sent portion of the received snapshot's name is determined from the name of the sent
snapshot. snapshot.
.Em poolB .Ar poolB
must contain the file system must contain the file system
.Em poolB/received . .Ar poolB/received .
If If
.Em poolB/received/fsA .Ar poolB/received/fsA
does not exist, it is created as an empty file system. does not exist, it is created as an empty file system.
.Bd -literal .Bd -literal -compact -offset Ds
# zfs send poolA/fsA/fsB@snap | \e .No # Nm zfs Cm send Ar poolA/fsA/fsB@snap |
ssh host zfs receive -d poolB/received .No " " Nm ssh Ar host Nm zfs Cm receive Fl d Ar poolB/received
.Ed .Ed
.It Sy Example 14 No Setting User Properties .
.It Sy Example 14 : No Setting User Properties
The following example sets the user-defined The following example sets the user-defined
.Sy com.example:department .Ar com.example : Ns Ar department
property for a dataset. property for a dataset:
.Bd -literal .Dl # Nm zfs Cm set Ar com.example : Ns Ar department Ns = Ns Ar 12345 tank/accounting
# zfs set com.example:department=12345 tank/accounting .
.Ed .It Sy Example 15 : No Performing a Rolling Snapshot
.It Sy Example 15 No Performing a Rolling Snapshot
The following example shows how to maintain a history of snapshots with a The following example shows how to maintain a history of snapshots with a
consistent naming scheme. consistent naming scheme.
To keep a week's worth of snapshots, the user destroys the oldest snapshot, To keep a week's worth of snapshots, the user destroys the oldest snapshot,
renames the remaining snapshots, and then creates a new snapshot, as follows: renames the remaining snapshots, and then creates a new snapshot, as follows:
.Bd -literal .Bd -literal -compact -offset Ds
# zfs destroy -r pool/users@7daysago .No # Nm zfs Cm destroy Fl r Ar pool/users@7daysago
# zfs rename -r pool/users@6daysago @7daysago .No # Nm zfs Cm rename Fl r Ar pool/users@6daysago No @ Ns Ar 7daysago
# zfs rename -r pool/users@5daysago @6daysago .No # Nm zfs Cm rename Fl r Ar pool/users@5daysago No @ Ns Ar 6daysago
# zfs rename -r pool/users@4daysago @5daysago .No # Nm zfs Cm rename Fl r Ar pool/users@4daysago No @ Ns Ar 5daysago
# zfs rename -r pool/users@3daysago @4daysago .No # Nm zfs Cm rename Fl r Ar pool/users@3daysago No @ Ns Ar 4daysago
# zfs rename -r pool/users@2daysago @3daysago .No # Nm zfs Cm rename Fl r Ar pool/users@2daysago No @ Ns Ar 3daysago
# zfs rename -r pool/users@yesterday @2daysago .No # Nm zfs Cm rename Fl r Ar pool/users@yesterday No @ Ns Ar 2daysago
# zfs rename -r pool/users@today @yesterday .No # Nm zfs Cm rename Fl r Ar pool/users@today No @ Ns Ar yesterday
# zfs snapshot -r pool/users@today .No # Nm zfs Cm snapshot Fl r Ar pool/users Ns @ Ns Ar today
.Ed .Ed
.It Sy Example 16 No Setting sharenfs Property Options on a ZFS File System .
.It Sy Example 16 : No Setting sharenfs Property Options on a ZFS File System
The following commands show how to set The following commands show how to set
.Sy sharenfs .Sy sharenfs
property options to enable property options to enable read-write
.Sy rw access for a set of IP addresses and to enable root access for system
access for a set of .Qq neo
.Sy IP
addresses and to enable root access for system
.Sy neo
on the on the
.Em tank/home .Ar tank/home
file system. file system:
.Bd -literal .Dl # Nm zfs Cm set Sy sharenfs Ns = Ns ' Ns Ar rw Ns =@123.123.0.0/16,root= Ns Ar neo Ns ' tank/home
# zfs set sharenfs='rw=@123.123.0.0/16,root=neo' tank/home
.Ed
.Pp .Pp
If you are using If you are using DNS for host name resolution,
.Sy DNS specify the fully-qualified hostname.
for host name resolution, specify the fully qualified hostname. .
.It Sy Example 17 No Delegating ZFS Administration Permissions on a ZFS Dataset .It Sy Example 17 : No Delegating ZFS Administration Permissions on a ZFS Dataset
The following example shows how to set permissions so that user The following example shows how to set permissions so that user
.Sy cindys .Ar cindys
can create, destroy, mount, and take snapshots on can create, destroy, mount, and take snapshots on
.Em tank/cindys . .Ar tank/cindys .
The permissions on The permissions on
.Em tank/cindys .Ar tank/cindys
are also displayed. are also displayed.
.Bd -literal .Bd -literal -compact -offset Ds
# zfs allow cindys create,destroy,mount,snapshot tank/cindys .No # Nm zfs Cm allow Sy cindys create , Ns Sy destroy , Ns Sy mount , Ns Sy snapshot Ar tank/cindys
# zfs allow tank/cindys .No # Nm zfs Cm allow Ar tank/cindys
---- Permissions on tank/cindys -------------------------------------- ---- Permissions on tank/cindys --------------------------------------
Local+Descendent permissions: Local+Descendent permissions:
user cindys create,destroy,mount,snapshot user cindys create,destroy,mount,snapshot
.Ed .Ed
.Pp .Pp
Because the Because the
.Em tank/cindys .Ar tank/cindys
mount point permission is set to 755 by default, user mount point permission is set to 755 by default, user
.Sy cindys .Ar cindys
will be unable to mount file systems under will be unable to mount file systems under
.Em tank/cindys . .Ar tank/cindys .
Add an ACE similar to the following syntax to provide mount point access: Add an ACE similar to the following syntax to provide mount point access:
.Bd -literal .Dl # Cm chmod No A+user: Ns Ar cindys Ns :add_subdirectory:allow Ar /tank/cindys
# chmod A+user:cindys:add_subdirectory:allow /tank/cindys .
.Ed .It Sy Example 18 : No Delegating Create Time Permissions on a ZFS Dataset
.It Sy Example 18 No Delegating Create Time Permissions on a ZFS Dataset
The following example shows how to grant anyone in the group The following example shows how to grant anyone in the group
.Sy staff .Ar staff
to create file systems in to create file systems in
.Em tank/users . .Ar tank/users .
This syntax also allows staff members to destroy their own file systems, but not This syntax also allows staff members to destroy their own file systems, but not
destroy anyone else's file system. destroy anyone else's file system.
The permissions on The permissions on
.Em tank/users .Ar tank/users
are also displayed. are also displayed.
.Bd -literal .Bd -literal -compact -offset Ds
# zfs allow staff create,mount tank/users .No # Nm zfs Cm allow Ar staff Sy create , Ns Sy mount Ar tank/users
# zfs allow -c destroy tank/users .No # Nm zfs Cm allow Fl c Sy destroy Ar tank/users
# zfs allow tank/users .No # Nm zfs Cm allow Ar tank/users
---- Permissions on tank/users --------------------------------------- ---- Permissions on tank/users ---------------------------------------
Permission sets: Permission sets:
destroy destroy
Local+Descendent permissions: Local+Descendent permissions:
group staff create,mount group staff create,mount
.Ed .Ed
.It Sy Example 19 No Defining and Granting a Permission Set on a ZFS Dataset .
.It Sy Example 19 : No Defining and Granting a Permission Set on a ZFS Dataset
The following example shows how to define and grant a permission set on the The following example shows how to define and grant a permission set on the
.Em tank/users .Ar tank/users
file system. file system.
The permissions on The permissions on
.Em tank/users .Ar tank/users
are also displayed. are also displayed.
.Bd -literal .Bd -literal -compact -offset Ds
# zfs allow -s @pset create,destroy,snapshot,mount tank/users .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
# zfs allow staff @pset tank/users .No # Nm zfs Cm allow staff No @ Ns Ar pset tank/users
# zfs allow tank/users .No # Nm zfs Cm allow Ar tank/users
---- Permissions on tank/users --------------------------------------- ---- Permissions on tank/users ---------------------------------------
Permission sets: Permission sets:
@pset create,destroy,mount,snapshot @pset create,destroy,mount,snapshot
Local+Descendent permissions: Local+Descendent permissions:
group staff @pset group staff @pset
.Ed .Ed
.It Sy Example 20 No Delegating Property Permissions on a ZFS Dataset .
.It Sy Example 20 : No Delegating Property Permissions on a ZFS Dataset
The following example shows to grant the ability to set quotas and reservations The following example shows to grant the ability to set quotas and reservations
on the on the
.Em users/home .Ar users/home
file system. file system.
The permissions on The permissions on
.Em users/home .Ar users/home
are also displayed. are also displayed.
.Bd -literal .Bd -literal -compact -offset Ds
# zfs allow cindys quota,reservation users/home .No # Nm zfs Cm allow Ar cindys Sy quota , Ns Sy reservation Ar users/home
# zfs allow users/home .No # Nm zfs Cm allow Ar users/home
---- Permissions on users/home --------------------------------------- ---- Permissions on users/home ---------------------------------------
Local+Descendent permissions: Local+Descendent permissions:
user cindys quota,reservation user cindys quota,reservation
@ -637,32 +633,34 @@ cindys% zfs get quota users/home/marks
NAME PROPERTY VALUE SOURCE NAME PROPERTY VALUE SOURCE
users/home/marks quota 10G local users/home/marks quota 10G local
.Ed .Ed
.It Sy Example 21 No Removing ZFS Delegated Permissions on a ZFS Dataset .
.It Sy Example 21 : No Removing ZFS Delegated Permissions on a ZFS Dataset
The following example shows how to remove the snapshot permission from the The following example shows how to remove the snapshot permission from the
.Sy staff .Ar staff
group on the group on the
.Em tank/users .Sy tank/users
file system. file system.
The permissions on The permissions on
.Em tank/users .Sy tank/users
are also displayed. are also displayed.
.Bd -literal .Bd -literal -compact -offset Ds
# zfs unallow staff snapshot tank/users .No # Nm zfs Cm unallow Ar staff Sy snapshot Ar tank/users
# zfs allow tank/users .No # Nm zfs Cm allow Ar tank/users
---- Permissions on tank/users --------------------------------------- ---- Permissions on tank/users ---------------------------------------
Permission sets: Permission sets:
@pset create,destroy,mount,snapshot @pset create,destroy,mount,snapshot
Local+Descendent permissions: Local+Descendent permissions:
group staff @pset group staff @pset
.Ed .Ed
.It Sy Example 22 No Showing the differences between a snapshot and a ZFS Dataset .
.It Sy Example 22 : No Showing the differences between a snapshot and a ZFS Dataset
The following example shows how to see what has changed between a prior The following example shows how to see what has changed between a prior
snapshot of a ZFS dataset and its current state. snapshot of a ZFS dataset and its current state.
The The
.Fl F .Fl F
option is used to indicate type information for the files affected. option is used to indicate type information for the files affected.
.Bd -literal .Bd -literal -compact -offset Ds
# zfs diff -F tank/test@before tank/test .No # Nm zfs Cm diff Fl F Ar tank/test@before tank/test
M / /tank/test/ M / /tank/test/
M F /tank/test/linked (+1) M F /tank/test/linked (+1)
R F /tank/test/oldname -> /tank/test/newname R F /tank/test/oldname -> /tank/test/newname
@ -670,57 +668,55 @@ R F /tank/test/oldname -> /tank/test/newname
+ F /tank/test/created + F /tank/test/created
M F /tank/test/modified M F /tank/test/modified
.Ed .Ed
.It Sy Example 23 No Creating a bookmark .
.It Sy Example 23 : No Creating a bookmark
The following example create a bookmark to a snapshot. The following example create a bookmark to a snapshot.
This bookmark can then be used instead of snapshot in send streams. This bookmark can then be used instead of snapshot in send streams.
.Bd -literal .Dl # Nm zfs Cm bookmark Ar rpool Ns @ Ns Ar snapshot rpool Ns # Ns Ar bookmark
# zfs bookmark rpool@snapshot rpool#bookmark .
.Ed .It Sy Example 24 : No Setting Sy sharesmb No Property Options on a ZFS File System
.It Sy Example 24 No Setting sharesmb Property Options on a ZFS File System
The following example show how to share SMB filesystem through ZFS. The following example show how to share SMB filesystem through ZFS.
Note that a user and his/her password must be given. Note that a user and their password must be given.
.Bd -literal .Dl # Nm smbmount Ar //127.0.0.1/share_tmp /mnt/tmp Fl o No user=workgroup/turbo,password=obrut,uid=1000
# smbmount //127.0.0.1/share_tmp /mnt/tmp \\
-o user=workgroup/turbo,password=obrut,uid=1000
.Ed
.Pp .Pp
Minimal Minimal
.Em /etc/samba/smb.conf .Pa /etc/samba/smb.conf
configuration required: configuration is required, as follows.
.Pp .Pp
Samba will need to listen to 'localhost' (127.0.0.1) for the ZFS utilities to Samba will need to bind to the loopback interface for the ZFS utilities to
communicate with Samba. communicate with Samba.
This is the default behavior for most Linux distributions. This is the default behavior for most Linux distributions.
.Pp .Pp
Samba must be able to authenticate a user. Samba must be able to authenticate a user.
This can be done in a number of ways, depending on if using the system password file, LDAP or the Samba This can be done in a number of ways
specific smbpasswd file. .Pq Xr passwd 5 , LDAP , Xr smbpasswd 5 , &c.\& .
How to do this is outside the scope of this manual. How to do this is outside the scope of this document refer to
Please refer to the
.Xr smb.conf 5 .Xr smb.conf 5
man page for more information. for more information.
.Pp .Pp
See the See the
.Sy USERSHARE section .Sx USERSHARES
of the section for all configuration options,
.Xr smb.conf 5 in case you need to modify any options of the share afterwards.
man page for all configuration options in case you need to modify any options
to the share afterwards.
Do note that any changes done with the Do note that any changes done with the
.Xr net 8 .Xr net 8
command will be undone if the share is ever unshared (such as at a reboot etc). command will be undone if the share is ever unshared (like via a reboot).
.El .El
.
.Sh ENVIRONMENT VARIABLES .Sh ENVIRONMENT VARIABLES
.Bl -tag -width "ZFS_MOUNT_HELPER" .Bl -tag -width "ZFS_MOUNT_HELPER"
.It Ev ZFS_MOUNT_HELPER .It Sy ZFS_MOUNT_HELPER
Cause Cause
.Nm zfs mount .Nm zfs Cm mount
to use to use
.Em /bin/mount .Xr mount 8
to mount zfs datasets. This option is provided for backwards compatibility with older zfs versions. to mount ZFS datasets.
This option is provided for backwards compatibility with older ZFS versions.
.El .El
.
.Sh INTERFACE STABILITY .Sh INTERFACE STABILITY
.Sy Committed . .Sy Committed .
.
.Sh SEE ALSO .Sh SEE ALSO
.Xr attr 1 , .Xr attr 1 ,
.Xr gzip 1 , .Xr gzip 1 ,

View File

@ -18,11 +18,12 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2020 by Delphix. All rights reserved. .\" Copyright (c) 2020 by Delphix. All rights reserved.
.\"
.Dd April 17, 2020 .Dd April 17, 2020
.Dt ZFS_IDS_TO_PATH 8 .Dt ZFS_IDS_TO_PATH 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zfs_ids_to_path .Nm zfs_ids_to_path
.Nd convert objset and object ids to names and paths .Nd convert objset and object ids to names and paths
@ -30,21 +31,21 @@
.Nm .Nm
.Op Fl v .Op Fl v
.Ar pool .Ar pool
.Ar objset id .Ar objset-id
.Ar object id .Ar object-id
.Nm .
.Sh DESCRIPTION .Sh DESCRIPTION
.Pp
The The
.Sy zfs_ids_to_path .Sy zfs_ids_to_path
utility converts a provided objset and object id into a path to the file that utility converts a provided objset and object ids
those ids refer to. into a path to the file they refer to.
.Bl -tag -width "-D" .Bl -tag -width "-D"
.It Fl v .It Fl v
Verbose. Verbose.
Print the dataset name and the file path within the dataset separately. This Print the dataset name and the file path within the dataset separately.
will work correctly even if the dataset is not mounted. This will work correctly even if the dataset is not mounted.
.El .El
.
.Sh SEE ALSO .Sh SEE ALSO
.Xr zfs 8 , .Xr zdb 8 ,
.Xr zdb 8 .Xr zfs 8

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2009 Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org> .\" Copyright 2011 Joshua M. Clulow <josh@sysmgr.org>
.\" Copyright (c) 2011, 2019 by Delphix. All rights reserved. .\" Copyright (c) 2011, 2019 by Delphix. All rights reserved.
@ -33,9 +32,11 @@
.Dd June 30, 2019 .Dd June 30, 2019
.Dt ZFSCONCEPTS 8 .Dt ZFSCONCEPTS 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zfsconcepts .Nm zfsconcepts
.Nd An overview of ZFS concepts. .Nd overview of ZFS concepts
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Ss ZFS File System Hierarchy .Ss ZFS File System Hierarchy
A ZFS storage pool is a logical collection of devices that provide space for A ZFS storage pool is a logical collection of devices that provide space for
@ -77,15 +78,15 @@ property.
.Ss Bookmarks .Ss Bookmarks
A bookmark is like a snapshot, a read-only copy of a file system or volume. A bookmark is like a snapshot, a read-only copy of a file system or volume.
Bookmarks can be created extremely quickly, compared to snapshots, and they Bookmarks can be created extremely quickly, compared to snapshots, and they
consume no additional space within the pool. Bookmarks can also have arbitrary consume no additional space within the pool.
names, much like snapshots. Bookmarks can also have arbitrary names, much like snapshots.
.Pp .Pp
Unlike snapshots, bookmarks can not be accessed through the filesystem in any Unlike snapshots, bookmarks can not be accessed through the filesystem in any way.
way. From a storage standpoint a bookmark just provides a way to reference From a storage standpoint a bookmark just provides a way to reference
when a snapshot was created as a distinct object. Bookmarks are initially when a snapshot was created as a distinct object.
tied to a snapshot, not the filesystem or volume, and they will survive if the Bookmarks are initially tied to a snapshot, not the filesystem or volume,
snapshot itself is destroyed. Since they are very light weight there's little and they will survive if the snapshot itself is destroyed.
incentive to destroy them. Since they are very light weight there's little incentive to destroy them.
.Ss Clones .Ss Clones
A clone is a writable volume or file system whose initial contents are the same A clone is a writable volume or file system whose initial contents are the same
as another dataset. as another dataset.
@ -162,37 +163,44 @@ If needed, ZFS file systems can also be managed with traditional tools
If a file system's mount point is set to If a file system's mount point is set to
.Sy legacy , .Sy legacy ,
ZFS makes no attempt to manage the file system, and the administrator is ZFS makes no attempt to manage the file system, and the administrator is
responsible for mounting and unmounting the file system. Because pools must responsible for mounting and unmounting the file system.
Because pools must
be imported before a legacy mount can succeed, administrators should ensure be imported before a legacy mount can succeed, administrators should ensure
that legacy mounts are only attempted after the zpool import process that legacy mounts are only attempted after the zpool import process
finishes at boot time. For example, on machines using systemd, the mount finishes at boot time.
option For example, on machines using systemd, the mount option
.Pp .Pp
.Nm x-systemd.requires=zfs-import.target .Nm x-systemd.requires=zfs-import.target
.Pp .Pp
will ensure that the zfs-import completes before systemd attempts mounting will ensure that the zfs-import completes before systemd attempts mounting
the filesystem. See systemd.mount(5) for details. the filesystem.
See
.Xr systemd.mount 5
for details.
.Ss Deduplication .Ss Deduplication
Deduplication is the process for removing redundant data at the block level, Deduplication is the process for removing redundant data at the block level,
reducing the total amount of data stored. If a file system has the reducing the total amount of data stored.
If a file system has the
.Sy dedup .Sy dedup
property enabled, duplicate data blocks are removed synchronously. The result property enabled, duplicate data blocks are removed synchronously.
The result
is that only unique data is stored and common components are shared among files. is that only unique data is stored and common components are shared among files.
.Pp .Pp
Deduplicating data is a very resource-intensive operation. It is generally Deduplicating data is a very resource-intensive operation.
recommended that you have at least 1.25 GiB of RAM per 1 TiB of storage when It is generally recommended that you have at least 1.25 GiB of RAM
you enable deduplication. Calculating the exact requirement depends heavily per 1 TiB of storage when you enable deduplication.
Calculating the exact requirement depends heavily
on the type of data stored in the pool. on the type of data stored in the pool.
.Pp .Pp
Enabling deduplication on an improperly-designed system can result in Enabling deduplication on an improperly-designed system can result in
performance issues (slow IO and administrative operations). It can potentially performance issues (slow IO and administrative operations).
lead to problems importing a pool due to memory exhaustion. Deduplication It can potentially lead to problems importing a pool due to memory exhaustion.
can consume significant processing power (CPU) and memory as well as generate Deduplication can consume significant processing power (CPU) and memory as well
additional disk IO. as generate additional disk IO.
.Pp .Pp
Before creating a pool with deduplication enabled, ensure that you have planned Before creating a pool with deduplication enabled, ensure that you have planned
your hardware requirements appropriately and implemented appropriate recovery your hardware requirements appropriately and implemented appropriate recovery
practices, such as regular backups. As an alternative to deduplication practices, such as regular backups.
consider using Consider using the
.Sy compression=on , .Sy compression
as a less resource-intensive alternative. property as a less resource-intensive alternative.

File diff suppressed because it is too large Load Diff

View File

@ -17,7 +17,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
@ -26,34 +25,28 @@
.\" Copyright 2017 Nexenta Systems, Inc. .\" Copyright 2017 Nexenta Systems, Inc.
.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved. .\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
.\" .\"
.Dd August 9, 2019 .Dd May 27, 2021
.Dt ZPOOL-ADD 8 .Dt ZPOOL-ADD 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zpool-add .Nm zpool-add
.Nd Adds specified virtual devices to a ZFS storage pool .Nd add vdevs to ZFS storage pool
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zpool .Nm zpool
.Cm add .Cm add
.Op Fl fgLnP .Op Fl fgLnP
.Oo Fl o Ar property Ns = Ns Ar value Oc .Oo Fl o Ar property Ns = Ns Ar value Oc
.Ar pool vdev Ns ... .Ar pool vdev Ns
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width Ds
.It Xo
.Nm zpool
.Cm add
.Op Fl fgLnP
.Oo Fl o Ar property Ns = Ns Ar value Oc
.Ar pool vdev Ns ...
.Xc
Adds the specified virtual devices to the given pool. Adds the specified virtual devices to the given pool.
The The
.Ar vdev .Ar vdev
specification is described in the specification is described in the
.Em Virtual Devices .Em Virtual Devices
section of section of
.Xr zpoolconcepts 8. .Xr zpoolconcepts 8 .
The behavior of the The behavior of the
.Fl f .Fl f
option, and the device checks performed are described in the option, and the device checks performed are described in the
@ -68,13 +61,17 @@ Not all devices can be overridden in this manner.
.It Fl g .It Fl g
Display Display
.Ar vdev , .Ar vdev ,
GUIDs instead of the normal device names. These GUIDs can be used in place of GUIDs instead of the normal device names.
These GUIDs can be used in place of
device names for the zpool detach/offline/remove/replace commands. device names for the zpool detach/offline/remove/replace commands.
.It Fl L .It Fl L
Display real paths for Display real paths for
.Ar vdev Ns s .Ar vdev Ns s
resolving all symbolic links. This can be used to look up the current block resolving all symbolic links.
device name regardless of the /dev/disk/ path used to open it. This can be used to look up the current block
device name regardless of the
.Pa /dev/disk
path used to open it.
.It Fl n .It Fl n
Displays the configuration that would be used without actually adding the Displays the configuration that would be used without actually adding the
.Ar vdev Ns s . .Ar vdev Ns s .
@ -83,20 +80,22 @@ device sharing.
.It Fl P .It Fl P
Display real paths for Display real paths for
.Ar vdev Ns s .Ar vdev Ns s
instead of only the last component of the path. This can be used in instead of only the last component of the path.
conjunction with the This can be used in conjunction with the
.Fl L .Fl L
flag. flag.
.It Fl o Ar property Ns = Ns Ar value .It Fl o Ar property Ns = Ns Ar value
Sets the given pool properties. See the Sets the given pool properties.
See the
.Xr zpoolprops 8 .Xr zpoolprops 8
manual page for a list of valid properties that can be set. The only property manual page for a list of valid properties that can be set.
supported at the moment is ashift. The only property supported at the moment is
.El .Sy ashift .
.El .El
.
.Sh SEE ALSO .Sh SEE ALSO
.Xr zpool-remove 8 ,
.Xr zpool-attach 8 , .Xr zpool-attach 8 ,
.Xr zpool-import 8 , .Xr zpool-import 8 ,
.Xr zpool-initialize 8 , .Xr zpool-initialize 8 ,
.Xr zpool-online 8 .Xr zpool-online 8 ,
.Xr zpool-remove 8

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
@ -30,24 +29,18 @@
.Dd May 15, 2020 .Dd May 15, 2020
.Dt ZPOOL-ATTACH 8 .Dt ZPOOL-ATTACH 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zpool-attach .Nm zpool-attach
.Nd Attach a new device to an existing ZFS virtual device (vdev). .Nd attach new device to existing ZFS vdev
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zpool .Nm zpool
.Cm attach .Cm attach
.Op Fl fsw .Op Fl fsw
.Oo Fl o Ar property Ns = Ns Ar value Oc .Oo Fl o Ar property Ns = Ns Ar value Oc
.Ar pool device new_device .Ar pool device new_device
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width Ds
.It Xo
.Nm zpool
.Cm attach
.Op Fl fsw
.Oo Fl o Ar property Ns = Ns Ar value Oc
.Ar pool device new_device
.Xc
Attaches Attaches
.Ar new_device .Ar new_device
to the existing to the existing
@ -76,10 +69,12 @@ Forces use of
even if it appears to be in use. even if it appears to be in use.
Not all devices can be overridden in this manner. Not all devices can be overridden in this manner.
.It Fl o Ar property Ns = Ns Ar value .It Fl o Ar property Ns = Ns Ar value
Sets the given pool properties. See the Sets the given pool properties.
See the
.Xr zpoolprops 8 .Xr zpoolprops 8
manual page for a list of valid properties that can be set. The only property manual page for a list of valid properties that can be set.
supported at the moment is ashift. The only property supported at the moment is
.Sy ashift .
.It Fl s .It Fl s
The The
.Ar new_device .Ar new_device
@ -92,10 +87,10 @@ Waits until
.Ar new_device .Ar new_device
has finished resilvering before returning. has finished resilvering before returning.
.El .El
.El .
.Sh SEE ALSO .Sh SEE ALSO
.Xr zpool-detach 8 ,
.Xr zpool-add 8 , .Xr zpool-add 8 ,
.Xr zpool-detach 8 ,
.Xr zpool-import 8 , .Xr zpool-import 8 ,
.Xr zpool-initialize 8 , .Xr zpool-initialize 8 ,
.Xr zpool-online 8 , .Xr zpool-online 8 ,

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
@ -27,56 +26,47 @@
.\" Copyright 2017 Nexenta Systems, Inc. .\" Copyright 2017 Nexenta Systems, Inc.
.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved. .\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
.\" .\"
.Dd August 9, 2019 .Dd May 27, 2021
.Dt ZPOOL-CHECKPOINT 8 .Dt ZPOOL-CHECKPOINT 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zpool-checkpoint .Nm zpool-checkpoint
.Nd Checkpoints the current state of a ZFS storage pool .Nd check-point current ZFS storage pool state
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zpool .Nm zpool
.Cm checkpoint .Cm checkpoint
.Op Fl d, -discard Oo Fl w, -wait Oc .Op Fl d Op Fl w
.Ar pool .Ar pool
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width Ds
.It Xo
.Nm zpool
.Cm checkpoint
.Op Fl d, -discard Oo Fl w, -wait Oc
.Ar pool
.Xc
Checkpoints the current state of Checkpoints the current state of
.Ar pool .Ar pool
, which can be later restored by , which can be later restored by
.Nm zpool Cm import --rewind-to-checkpoint . .Nm zpool Cm import --rewind-to-checkpoint .
The existence of a checkpoint in a pool prohibits the following The existence of a checkpoint in a pool prohibits the following
.Nm zpool .Nm zpool
commands: subcommands:
.Cm remove , .Cm remove , attach , detach , split , No and Cm reguid .
.Cm attach ,
.Cm detach ,
.Cm split ,
and
.Cm reguid .
In addition, it may break reservation boundaries if the pool lacks free In addition, it may break reservation boundaries if the pool lacks free
space. space.
The The
.Nm zpool Cm status .Nm zpool Cm status
command indicates the existence of a checkpoint or the progress of discarding a command indicates the existence of a checkpoint or the progress of discarding a
checkpoint from a pool. checkpoint from a pool.
The
.Nm zpool Cm list .Nm zpool Cm list
command reports how much space the checkpoint takes from the pool. can be used to check how much space the checkpoint takes from the pool.
.
.Sh OPTIONS
.Bl -tag -width Ds .Bl -tag -width Ds
.It Fl d, -discard .It Fl d , -discard
Discards an existing checkpoint from Discards an existing checkpoint from
.Ar pool . .Ar pool .
.It Fl w, -wait .It Fl w , -wait
Waits until the checkpoint has finished being discarded before returning. Waits until the checkpoint has finished being discarded before returning.
.El .El
.El .
.Sh SEE ALSO .Sh SEE ALSO
.Xr zfs-snapshot 8 ,
.Xr zpool-import 8 , .Xr zpool-import 8 ,
.Xr zpool-status 8 , .Xr zpool-status 8
.Xr zfs-snapshot 8

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
@ -27,33 +26,30 @@
.\" Copyright 2017 Nexenta Systems, Inc. .\" Copyright 2017 Nexenta Systems, Inc.
.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved. .\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
.\" .\"
.Dd August 9, 2019 .Dd May 27, 2021
.Dt ZPOOL-CLEAR 8 .Dt ZPOOL-CLEAR 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zpool-clear .Nm zpool-clear
.Nd Clears device errors in a ZFS storage pool. .Nd clear device errors in ZFS storage pool
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zpool .Nm zpool
.Cm clear .Cm clear
.Ar pool .Ar pool
.Op Ar device .Oo Ar device Oc Ns
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width Ds
.It Xo
.Nm zpool
.Cm clear
.Ar pool
.Op Ar device
.Xc
Clears device errors in a pool. Clears device errors in a pool.
If no arguments are specified, all device errors within the pool are cleared. If no arguments are specified, all device errors within the pool are cleared.
If one or more devices is specified, only those errors associated with the If one or more devices is specified, only those errors associated with the
specified device or devices are cleared. specified device or devices are cleared.
If multihost is enabled, and the pool has been suspended, this will not If
resume I/O. While the pool was suspended, it may have been imported on .Sy multihost
is enabled and the pool has been suspended, this will not resume I/O.
While the pool was suspended, it may have been imported on
another host, and resuming I/O could result in pool damage. another host, and resuming I/O could result in pool damage.
.El .
.Sh SEE ALSO .Sh SEE ALSO
.Xr zdb 8 , .Xr zdb 8 ,
.Xr zpool-reopen 8 , .Xr zpool-reopen 8 ,

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
@ -28,42 +27,32 @@
.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved. .\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
.\" Copyright (c) 2021, Colm Buckley <colm@tuatha.org> .\" Copyright (c) 2021, Colm Buckley <colm@tuatha.org>
.\" .\"
.Dd August 9, 2019 .Dd June 2, 2021
.Dt ZPOOL-CREATE 8 .Dt ZPOOL-CREATE 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zpool-create .Nm zpool-create
.Nd Creates a new ZFS storage pool .Nd create ZFS storage pool
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zpool .Nm zpool
.Cm create .Cm create
.Op Fl dfn .Op Fl dfn
.Op Fl m Ar mountpoint .Op Fl m Ar mountpoint
.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Oo Fl o Ar property Ns = Ns Ar value Oc Ns
.Oo Fl o Ar feature@feature Ns = Ns Ar value Oc .Oo Fl o Sy feature@ Ns Ar feature Ns = Ns Ar value Oc
.Op Fl o Ar compatibility Ns = Ns Ar off | legacy | file Bq , Ns Ar file Ns ... .Op Fl o Ar compatibility Ns = Ns Sy off Ns | Ns Sy legacy Ns | Ns Ar file Ns Oo , Ns Ar file Oc Ns
.Oo Fl O Ar file-system-property Ns = Ns Ar value Oc Ns ... .Oo Fl O Ar file-system-property Ns = Ns Ar value Oc Ns
.Op Fl R Ar root
.Ar pool vdev Ns ...
.Sh DESCRIPTION
.Bl -tag -width Ds
.It Xo
.Nm zpool
.Cm create
.Op Fl dfn
.Op Fl m Ar mountpoint
.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
.Oo Fl o Ar feature@feature Ns = Ns Ar value Oc Ns ...
.Op Fl o Ar compatibility Ns = Ns Ar off | legacy | file Bq , Ns Ar file Ns ...
.Oo Fl O Ar file-system-property Ns = Ns Ar value Oc Ns ...
.Op Fl R Ar root .Op Fl R Ar root
.Op Fl t Ar tname .Op Fl t Ar tname
.Ar pool vdev Ns ... .Ar pool
.Xc .Ar vdev Ns
.
.Sh DESCRIPTION
Creates a new storage pool containing the virtual devices specified on the Creates a new storage pool containing the virtual devices specified on the
command line. command line.
The pool name must begin with a letter, and can only contain The pool name must begin with a letter, and can only contain
alphanumeric characters as well as underscore alphanumeric characters as well as the underscore
.Pq Qq Sy _ , .Pq Qq Sy _ ,
dash dash
.Pq Qq Sy \&- , .Pq Qq Sy \&- ,
@ -84,46 +73,41 @@ are reserved, as are names beginning with
.Sy mirror , .Sy mirror ,
.Sy raidz , .Sy raidz ,
.Sy draid , .Sy draid ,
.Sy spare , and
and the pattern .Sy spare .
.Sy c[0-9] .
The The
.Ar vdev .Ar vdev
specification is described in the specification is described in the
.Em Virtual Devices .Sx Virtual Devices
section of section of
.Xr zpoolconcepts 8 . .Xr zpoolconcepts 8 .
.Pp .Pp
The command attempts to verify that each device specified is accessible and not The command attempts to verify that each device specified is accessible and not
currently in use by another subsystem. However this check is not robust enough currently in use by another subsystem.
However this check is not robust enough
to detect simultaneous attempts to use a new device in different pools, even if to detect simultaneous attempts to use a new device in different pools, even if
.Sy multihost .Sy multihost Ns = Sy enabled .
is The administrator must ensure, that simultaneous invocations of any combination of
.Sy enabled. .Nm zpool Cm replace ,
The .Nm zpool Cm create ,
administrator must ensure that simultaneous invocations of any combination of .Nm zpool Cm add ,
.Sy zpool replace ,
.Sy zpool create ,
.Sy zpool add ,
or or
.Sy zpool labelclear , .Nm zpool Cm labelclear ,
do not refer to the same device. Using the same device in two pools will do not refer to the same device.
result in pool corruption. Using the same device in two pools will result in pool corruption.
.Pp .Pp
There are some uses, such as being currently mounted, or specified as the There are some uses, such as being currently mounted, or specified as the
dedicated dump device, that prevents a device from ever being used by ZFS. dedicated dump device, that prevents a device from ever being used by ZFS.
Other uses, such as having a preexisting UFS file system, can be overridden with Other uses, such as having a preexisting UFS file system, can be overridden with
the .Fl f .
.Fl f
option.
.Pp .Pp
The command also checks that the replication strategy for the pool is The command also checks that the replication strategy for the pool is
consistent. consistent.
An attempt to combine redundant and non-redundant storage in a single pool, or An attempt to combine redundant and non-redundant storage in a single pool,
to mix disks and files, results in an error unless or to mix disks and files, results in an error unless
.Fl f .Fl f
is specified. is specified.
The use of differently sized devices within a single raidz or mirror group is The use of differently-sized devices within a single raidz or mirror group is
also flagged as an error unless also flagged as an error unless
.Fl f .Fl f
is specified. is specified.
@ -133,27 +117,27 @@ Unless the
option is specified, the default mount point is option is specified, the default mount point is
.Pa / Ns Ar pool . .Pa / Ns Ar pool .
The mount point must not exist or must be empty, or else the root dataset The mount point must not exist or must be empty, or else the root dataset
cannot be mounted. will not be able to be be mounted.
This can be overridden with the This can be overridden with the
.Fl m .Fl m
option. option.
.Pp .Pp
By default all supported features are enabled on the new pool. The By default all supported features are enabled on the new pool.
The
.Fl d .Fl d
option or the option and the
.Fl o Ar compatibility .Fl o Ar compatibility
property (eg: property
.Fl o Ar compatibility=2020 .Pq e.g Fl o Sy compatibility Ns = Ns Ar 2020
) can be used to restrict the features that are enabled, so that the can be used to restrict the features that are enabled, so that the
pool can be imported on other releases of the ZFS software. pool can be imported on other releases of ZFS.
.Bl -tag -width Ds .Bl -tag -width "-t tname"
.It Fl d .It Fl d
Do not enable any features on the new pool. Do not enable any features on the new pool.
Individual features can be enabled by setting their corresponding properties to Individual features can be enabled by setting their corresponding properties to
.Sy enabled .Sy enabled
with the with
.Fl o .Fl o .
option.
See See
.Xr zpool-features 5 .Xr zpool-features 5
for details about feature properties. for details about feature properties.
@ -169,14 +153,14 @@ The default mount point is
or or
.Pa altroot/pool .Pa altroot/pool
if if
.Ar altroot .Sy altroot
is specified. is specified.
The mount point must be an absolute path, The mount point must be an absolute path,
.Sy legacy , .Sy legacy ,
or or
.Sy none . .Sy none .
For more information on dataset mount points, see For more information on dataset mount points, see
.Xr zfs 8 . .Xr zfsprops 8 .
.It Fl n .It Fl n
Displays the configuration that would be used without actually creating the Displays the configuration that would be used without actually creating the
pool. pool.
@ -184,37 +168,43 @@ The actual pool creation can still fail due to insufficient privileges or
device sharing. device sharing.
.It Fl o Ar property Ns = Ns Ar value .It Fl o Ar property Ns = Ns Ar value
Sets the given pool properties. Sets the given pool properties.
See the See
.Xr zpoolprops 8 .Xr zpoolprops 8
manual page for a list of valid properties that can be set. for a list of valid properties that can be set.
.It Fl o Ar compatibility Ns = Ns Ar off | legacy | file Bq , Ns Ar file Ns ... .It Fl o Ar compatibility Ns = Ns Sy off Ns | Ns Sy legacy Ns | Ns Ar file Ns Oo , Ns Ar file Oc Ns
Specifies compatibility feature sets. See Specifies compatibility feature sets.
See
.Xr zpool-features 5 .Xr zpool-features 5
for more information about compatibility feature sets. for more information about compatibility feature sets.
.It Fl o Ar feature@feature Ns = Ns Ar value .It Fl o Sy feature@ Ns Ar feature Ns = Ns Ar value
Sets the given pool feature. See the Sets the given pool feature.
See the
.Xr zpool-features 5 .Xr zpool-features 5
section for a list of valid features that can be set. section for a list of valid features that can be set.
Value can be either disabled or enabled. Value can be either disabled or enabled.
.It Fl O Ar file-system-property Ns = Ns Ar value .It Fl O Ar file-system-property Ns = Ns Ar value
Sets the given file system properties in the root file system of the pool. Sets the given file system properties in the root file system of the pool.
See the See
.Xr zfsprops 8 .Xr zfsprops 8
manual page for a list of valid properties that can be set. for a list of valid properties that can be set.
.It Fl R Ar root .It Fl R Ar root
Equivalent to Equivalent to
.Fl o Sy cachefile Ns = Ns Sy none Fl o Sy altroot Ns = Ns Ar root .Fl o Sy cachefile Ns = Ns Sy none Fl o Sy altroot Ns = Ns Ar root
.It Fl t Ar tname .It Fl t Ar tname
Sets the in-core pool name to Sets the in-core pool name to
.Sy tname .Ar tname
while the on-disk name will be the name specified as the pool name while the on-disk name will be the name specified as
.Sy pool . .Ar pool .
This will set the default cachefile property to none. This is intended This will set the default of the
.Sy cachefile
property to
.Sy none .
This is intended
to handle name space collisions when creating pools for other systems, to handle name space collisions when creating pools for other systems,
such as virtual machines or physical machines whose pools live on network such as virtual machines or physical machines whose pools live on network
block devices. block devices.
.El .El
.El .
.Sh SEE ALSO .Sh SEE ALSO
.Xr zpool-destroy 8 , .Xr zpool-destroy 8 ,
.Xr zpool-export 8 , .Xr zpool-export 8 ,

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
@ -30,32 +29,30 @@
.Dd August 9, 2019 .Dd August 9, 2019
.Dt ZPOOL-DETACH 8 .Dt ZPOOL-DETACH 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zpool-detach .Nm zpool-detach
.Nd Detaches a device from a ZFS mirror vdev (virtual device) .Nd detach device from ZFS mirror
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zpool .Nm zpool
.Cm detach .Cm detach
.Ar pool device .Ar pool device
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width Ds
.It Xo
.Nm zpool
.Cm detach
.Ar pool device
.Xc
Detaches Detaches
.Ar device .Ar device
from a mirror. from a mirror.
The operation is refused if there are no other valid replicas of the data. The operation is refused if there are no other valid replicas of the data.
If device may be re-added to the pool later on then consider the If
.Sy zpool offline .Ar device
may be re-added to the pool later on then consider the
.Nm zpool Cm offline
command instead. command instead.
.El .
.Sh SEE ALSO .Sh SEE ALSO
.Xr zpool-attach 8 , .Xr zpool-attach 8 ,
.Xr zpool-offline 8 ,
.Xr zpool-labelclear 8 , .Xr zpool-labelclear 8 ,
.Xr zpool-offline 8 ,
.Xr zpool-remove 8 , .Xr zpool-remove 8 ,
.Xr zpool-replace 8 , .Xr zpool-replace 8 ,
.Xr zpool-split 8 .Xr zpool-split 8

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
@ -27,45 +26,48 @@
.\" Copyright 2017 Nexenta Systems, Inc. .\" Copyright 2017 Nexenta Systems, Inc.
.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved. .\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
.\" .\"
.Dd August 9, 2019 .Dd May 27, 2021
.Dt ZPOOL-EVENTS 8 .Dt ZPOOL-EVENTS 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zpool-events .Nm zpool-events
.Nd Lists all recent events generated by the ZFS kernel modules .Nd list recent events generated by kernel
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zpool .Nm zpool
.Cm events .Cm events
.Op Fl vHf Oo Ar pool Oc | Fl c .Op Fl vHf
.Sh DESCRIPTION .Op Ar pool
.Bl -tag -width Ds
.It Xo
.Nm zpool .Nm zpool
.Cm events .Cm events
.Op Fl vHf Oo Ar pool Oc | Fl c .Fl c
.Xc .
Lists all recent events generated by the ZFS kernel modules. These events .Sh DESCRIPTION
are consumed by the Lists all recent events generated by the ZFS kernel modules.
These events are consumed by the
.Xr zed 8 .Xr zed 8
and used to automate administrative tasks such as replacing a failed device and used to automate administrative tasks such as replacing a failed device
with a hot spare. For more information about the subclasses and event payloads with a hot spare.
For more information about the subclasses and event payloads
that can be generated see the that can be generated see the
.Xr zfs-events 5 .Xr zfs-events 5
man page. man page.
.Bl -tag -width Ds .Pp
.Bl -tag -compact -width Ds
.It Fl c .It Fl c
Clear all previous events. Clear all previous events.
.It Fl f .It Fl f
Follow mode. Follow mode.
.It Fl H .It Fl H
Scripted mode. Do not display headers, and separate fields by a Scripted mode.
Do not display headers, and separate fields by a
single tab instead of arbitrary space. single tab instead of arbitrary space.
.It Fl v .It Fl v
Print the entire payload for each event. Print the entire payload for each event.
.El .El
.El .
.Sh SEE ALSO .Sh SEE ALSO
.Xr zed 8 ,
.Xr zpool-wait 8 ,
.Xr zfs-events 5 , .Xr zfs-events 5 ,
.Xr zfs-module-parameters 5 .Xr zfs-module-parameters 5 ,
.Xr zed 8 ,
.Xr zpool-wait 8

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
@ -30,29 +29,31 @@
.Dd August 9, 2019 .Dd August 9, 2019
.Dt ZPOOL-GET 8 .Dt ZPOOL-GET 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zpool-get .Nm zpool-get
.Nd Retrieves properties for the specified ZFS storage pool(s) .Nd retrieve properties of ZFS storage pools
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zpool .Nm zpool
.Cm get .Cm get
.Op Fl Hp .Op Fl Hp
.Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... .Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns
.Sy all Ns | Ns Ar property Ns Oo , Ns Ar property Oc Ns ... .Sy all Ns | Ns Ar property Ns Oo , Ns Ar property Oc Ns
.Oo Ar pool Oc Ns ... .Oo Ar pool Oc Ns
.Nm zpool .Nm zpool
.Cm set .Cm set
.Ar property Ns = Ns Ar value .Ar property Ns = Ns Ar value
.Ar pool .Ar pool
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width Ds .Bl -tag -width Ds
.It Xo .It Xo
.Nm zpool .Nm zpool
.Cm get .Cm get
.Op Fl Hp .Op Fl Hp
.Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns ... .Op Fl o Ar field Ns Oo , Ns Ar field Oc Ns
.Sy all Ns | Ns Ar property Ns Oo , Ns Ar property Oc Ns ... .Sy all Ns | Ns Ar property Ns Oo , Ns Ar property Oc Ns
.Oo Ar pool Oc Ns ... .Oo Ar pool Oc Ns
.Xc .Xc
Retrieves the given list of properties Retrieves the given list of properties
.Po .Po
@ -62,25 +63,29 @@ is used
.Pc .Pc
for the specified storage pool(s). for the specified storage pool(s).
These properties are displayed with the following fields: These properties are displayed with the following fields:
.Bd -literal .Bl -tag -compact -offset Ds -width "property"
name Name of storage pool .It Sy name
property Property name Name of storage pool.
value Property value .It Sy property
source Property source, either 'default' or 'local'. Property name.
.Ed .It Sy value
Property value.
.It Sy source
Property source, either
.Sy default No or Sy local .
.El
.Pp .Pp
See the See the
.Xr zpoolprops 8 .Xr zpoolprops 8
manual page for more information on the available pool properties. manual page for more information on the available pool properties.
.Bl -tag -width Ds .Bl -tag -compact -offset Ds -width "-o field"
.It Fl H .It Fl H
Scripted mode. Scripted mode.
Do not display headers, and separate fields by a single tab instead of arbitrary Do not display headers, and separate fields by a single tab instead of arbitrary
space. space.
.It Fl o Ar field .It Fl o Ar field
A comma-separated list of columns to display. A comma-separated list of columns to display, defaults to
.Sy name Ns \&, Ns Sy property Ns \&, Ns Sy value Ns \&, Ns Sy source .Sy name , Ns Sy property , Ns Sy value , Ns Sy source .
is the default value.
.It Fl p .It Fl p
Display numbers in parsable (exact) values. Display numbers in parsable (exact) values.
.El .El
@ -96,7 +101,8 @@ See the
manual page for more information on what properties can be set and acceptable manual page for more information on what properties can be set and acceptable
values. values.
.El .El
.
.Sh SEE ALSO .Sh SEE ALSO
.Xr zpoolprops 8 , .Xr zpool-features 5 ,
.Xr zpool-list 8 , .Xr zpool-list 8 ,
.Xr zpool-features 5 .Xr zpoolprops 8

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
@ -30,50 +29,53 @@
.Dd August 9, 2019 .Dd August 9, 2019
.Dt ZPOOL-IMPORT 8 .Dt ZPOOL-IMPORT 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zpool-import .Nm zpool-import
.Nd Lists ZFS storage pools available to import or import the specified pools .Nd import ZFS storage pools or list available pools
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zpool .Nm zpool
.Cm import .Cm import
.Op Fl D .Op Fl D
.Op Fl d Ar dir Ns | Ns device .Oo Fl d Ar dir Ns | Ns Ar device Oc Ns
.Nm zpool .Nm zpool
.Cm import .Cm import
.Fl a .Fl a
.Op Fl DflmN .Op Fl DflmN
.Op Fl F Oo Fl n Oc Oo Fl T Oc Oo Fl X Oc .Op Fl F Op Fl nTX
.Op Fl -rewind-to-checkpoint .Op Fl -rewind-to-checkpoint
.Op Fl c Ar cachefile Ns | Ns Fl d Ar dir Ns | Ns device .Op Fl c Ar cachefile Ns | Ns Fl d Ar dir Ns | Ns Ar device
.Op Fl o Ar mntopts .Op Fl o Ar mntopts
.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Oo Fl o Ar property Ns = Ns Ar value Oc Ns
.Op Fl R Ar root .Op Fl R Ar root
.Nm zpool .Nm zpool
.Cm import .Cm import
.Op Fl Dflm .Op Fl Dflmt
.Op Fl F Oo Fl n Oc Oo Fl T Oc Oo Fl X Oc .Op Fl F Op Fl nTX
.Op Fl -rewind-to-checkpoint .Op Fl -rewind-to-checkpoint
.Op Fl c Ar cachefile Ns | Ns Fl d Ar dir Ns | Ns device .Op Fl c Ar cachefile Ns | Ns Fl d Ar dir Ns | Ns Ar device
.Op Fl o Ar mntopts .Op Fl o Ar mntopts
.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Oo Fl o Ar property Ns = Ns Ar value Oc Ns
.Op Fl R Ar root .Op Fl R Ar root
.Op Fl s .Op Fl s
.Ar pool Ns | Ns Ar id .Ar pool Ns | Ns Ar id
.Op Ar newpool Oo Fl t Oc .Op Ar newpool
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width Ds .Bl -tag -width Ds
.It Xo .It Xo
.Nm zpool .Nm zpool
.Cm import .Cm import
.Op Fl D .Op Fl D
.Op Fl d Ar dir Ns | Ns device .Oo Fl d Ar dir Ns | Ns Ar device Oc Ns
.Xc .Xc
Lists pools available to import. Lists pools available to import.
If the If the
.Fl d or .Fl d or
.Fl c .Fl c
options are not specified, this command searches for devices using libblkid options are not specified, this command searches for devices using libblkid
on Linux and geom on FreeBSD. on Linux and geom on
.Fx .
The The
.Fl d .Fl d
option can be specified multiple times, and all directories are searched. option can be specified multiple times, and all directories are searched.
@ -114,10 +116,10 @@ Lists destroyed pools only.
.Cm import .Cm import
.Fl a .Fl a
.Op Fl DflmN .Op Fl DflmN
.Op Fl F Oo Fl n Oc Oo Fl T Oc Oo Fl X Oc .Op Fl F Op Fl nTX
.Op Fl c Ar cachefile Ns | Ns Fl d Ar dir Ns | Ns device .Op Fl c Ar cachefile Ns | Ns Fl d Ar dir Ns | Ns Ar device
.Op Fl o Ar mntopts .Op Fl o Ar mntopts
.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Oo Fl o Ar property Ns = Ns Ar value Oc Ns
.Op Fl R Ar root .Op Fl R Ar root
.Op Fl s .Op Fl s
.Xc .Xc
@ -168,12 +170,13 @@ If successful, the data from the discarded transactions is irretrievably lost.
This option is ignored if the pool is importable or already imported. This option is ignored if the pool is importable or already imported.
.It Fl l .It Fl l
Indicates that this command will request encryption keys for all encrypted Indicates that this command will request encryption keys for all encrypted
datasets it attempts to mount as it is bringing the pool online. Note that if datasets it attempts to mount as it is bringing the pool online.
any datasets have a Note that if any datasets have a
.Sy keylocation .Sy keylocation
of of
.Sy prompt .Sy prompt
this command will block waiting for the keys to be entered. Without this flag this command will block waiting for the keys to be entered.
Without this flag
encrypted datasets will be left unavailable until the keys are loaded. encrypted datasets will be left unavailable until the keys are loaded.
.It Fl m .It Fl m
Allows a pool to import when there is a missing log device. Allows a pool to import when there is a missing log device.
@ -221,36 +224,42 @@ administrator can see how the pool would look like if they were
to fully rewind. to fully rewind.
.It Fl s .It Fl s
Scan using the default search path, the libblkid cache will not be Scan using the default search path, the libblkid cache will not be
consulted. A custom search path may be specified by setting the consulted.
ZPOOL_IMPORT_PATH environment variable. A custom search path may be specified by setting the
.Sy ZPOOL_IMPORT_PATH
environment variable.
.It Fl X .It Fl X
Used with the Used with the
.Fl F .Fl F
recovery option. Determines whether extreme recovery option.
measures to find a valid txg should take place. This allows the pool to Determines whether extreme measures to find a valid txg should take place.
This allows the pool to
be rolled back to a txg which is no longer guaranteed to be consistent. be rolled back to a txg which is no longer guaranteed to be consistent.
Pools imported at an inconsistent txg may contain uncorrectable Pools imported at an inconsistent txg may contain uncorrectable checksum errors.
checksum errors. For more details about pool recovery mode, see the For more details about pool recovery mode, see the
.Fl F .Fl F
option, above. WARNING: This option can be extremely hazardous to the option, above.
WARNING: This option can be extremely hazardous to the
health of your pool and should only be used as a last resort. health of your pool and should only be used as a last resort.
.It Fl T .It Fl T
Specify the txg to use for rollback. Implies Specify the txg to use for rollback.
Implies
.Fl FX . .Fl FX .
For more details For more details
about pool recovery mode, see the about pool recovery mode, see the
.Fl X .Fl X
option, above. WARNING: This option can be extremely hazardous to the option, above.
WARNING: This option can be extremely hazardous to the
health of your pool and should only be used as a last resort. health of your pool and should only be used as a last resort.
.El .El
.It Xo .It Xo
.Nm zpool .Nm zpool
.Cm import .Cm import
.Op Fl Dflm .Op Fl Dflmt
.Op Fl F Oo Fl n Oc Oo Fl t Oc Oo Fl T Oc Oo Fl X Oc .Op Fl F Op Fl nTX
.Op Fl c Ar cachefile Ns | Ns Fl d Ar dir Ns | Ns device .Op Fl c Ar cachefile Ns | Ns Fl d Ar dir Ns | Ns Ar device
.Op Fl o Ar mntopts .Op Fl o Ar mntopts
.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Oo Fl o Ar property Ns = Ns Ar value Oc Ns
.Op Fl R Ar root .Op Fl R Ar root
.Op Fl s .Op Fl s
.Ar pool Ns | Ns Ar id .Ar pool Ns | Ns Ar id
@ -309,12 +318,13 @@ If successful, the data from the discarded transactions is irretrievably lost.
This option is ignored if the pool is importable or already imported. This option is ignored if the pool is importable or already imported.
.It Fl l .It Fl l
Indicates that this command will request encryption keys for all encrypted Indicates that this command will request encryption keys for all encrypted
datasets it attempts to mount as it is bringing the pool online. Note that if datasets it attempts to mount as it is bringing the pool online.
any datasets have a Note that if any datasets have a
.Sy keylocation .Sy keylocation
of of
.Sy prompt .Sy prompt
this command will block waiting for the keys to be entered. Without this flag this command will block waiting for the keys to be entered.
Without this flag
encrypted datasets will be left unavailable until the keys are loaded. encrypted datasets will be left unavailable until the keys are loaded.
.It Fl m .It Fl m
Allows a pool to import when there is a missing log device. Allows a pool to import when there is a missing log device.
@ -350,38 +360,49 @@ property to
.Ar root . .Ar root .
.It Fl s .It Fl s
Scan using the default search path, the libblkid cache will not be Scan using the default search path, the libblkid cache will not be
consulted. A custom search path may be specified by setting the consulted.
ZPOOL_IMPORT_PATH environment variable. A custom search path may be specified by setting the
.Sy ZPOOL_IMPORT_PATH
environment variable.
.It Fl X .It Fl X
Used with the Used with the
.Fl F .Fl F
recovery option. Determines whether extreme recovery option.
measures to find a valid txg should take place. This allows the pool to Determines whether extreme measures to find a valid txg should take place.
This allows the pool to
be rolled back to a txg which is no longer guaranteed to be consistent. be rolled back to a txg which is no longer guaranteed to be consistent.
Pools imported at an inconsistent txg may contain uncorrectable Pools imported at an inconsistent txg may contain uncorrectable
checksum errors. For more details about pool recovery mode, see the checksum errors.
For more details about pool recovery mode, see the
.Fl F .Fl F
option, above. WARNING: This option can be extremely hazardous to the option, above.
WARNING: This option can be extremely hazardous to the
health of your pool and should only be used as a last resort. health of your pool and should only be used as a last resort.
.It Fl T .It Fl T
Specify the txg to use for rollback. Implies Specify the txg to use for rollback.
Implies
.Fl FX . .Fl FX .
For more details For more details
about pool recovery mode, see the about pool recovery mode, see the
.Fl X .Fl X
option, above. WARNING: This option can be extremely hazardous to the option, above.
WARNING: This option can be extremely hazardous to the
health of your pool and should only be used as a last resort. health of your pool and should only be used as a last resort.
.It Fl t .It Fl t
Used with Used with
.Sy newpool . .Sy newpool .
Specifies that Specifies that
.Sy newpool .Sy newpool
is temporary. Temporary pool names last until export. Ensures that is temporary.
the original pool name will be used in all label updates and therefore Temporary pool names last until export.
is retained upon export. Ensures that the original pool name will be used
Will also set -o cachefile=none when not explicitly specified. in all label updates and therefore is retained upon export.
Will also set
.Fl o Sy cachefile Ns = Ns Sy none
when not explicitly specified.
.El .El
.El .El
.
.Sh SEE ALSO .Sh SEE ALSO
.Xr zpool-export 8 , .Xr zpool-export 8 ,
.Xr zpool-list 8 , .Xr zpool-list 8 ,

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
@ -27,40 +26,33 @@
.\" Copyright 2017 Nexenta Systems, Inc. .\" Copyright 2017 Nexenta Systems, Inc.
.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved. .\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
.\" .\"
.Dd August 9, 2019 .Dd May 27, 2021
.Dt ZPOOL-INITIALIZE 8 .Dt ZPOOL-INITIALIZE 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zpool-initialize .Nm zpool-initialize
.Nd Write to all unallocated regions of eligible devices in a ZFS storage pool .Nd write to unallocated regions of ZFS storage pool
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zpool .Nm zpool
.Cm initialize .Cm initialize
.Op Fl c | Fl s .Op Fl c Ns | Ns Fl s
.Op Fl w .Op Fl w
.Ar pool .Ar pool
.Op Ar device Ns ... .Oo Ar device Oc Ns
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width Ds
.It Xo
.Nm zpool
.Cm initialize
.Op Fl c | Fl s
.Op Fl w
.Ar pool
.Op Ar device Ns ...
.Xc
Begins initializing by writing to all unallocated regions on the specified Begins initializing by writing to all unallocated regions on the specified
devices, or all eligible devices in the pool if no individual devices are devices, or all eligible devices in the pool if no individual devices are
specified. specified.
Only leaf data or log devices may be initialized. Only leaf data or log devices may be initialized.
.Bl -tag -width Ds .Bl -tag -width Ds
.It Fl c, -cancel .It Fl c , -cancel
Cancel initializing on the specified devices, or all eligible devices if none Cancel initializing on the specified devices, or all eligible devices if none
are specified. are specified.
If one or more target devices are invalid or are not currently being If one or more target devices are invalid or are not currently being
initialized, the command will fail and no cancellation will occur on any device. initialized, the command will fail and no cancellation will occur on any device.
.It Fl s -suspend .It Fl s , -suspend
Suspend initializing on the specified devices, or all eligible devices if none Suspend initializing on the specified devices, or all eligible devices if none
are specified. are specified.
If one or more target devices are invalid or are not currently being If one or more target devices are invalid or are not currently being
@ -68,10 +60,10 @@ initialized, the command will fail and no suspension will occur on any device.
Initializing can then be resumed by running Initializing can then be resumed by running
.Nm zpool Cm initialize .Nm zpool Cm initialize
with no flags on the relevant target devices. with no flags on the relevant target devices.
.It Fl w, -wait .It Fl w , -wait
Wait until the devices have finished initializing before returning. Wait until the devices have finished initializing before returning.
.El .El
.El .
.Sh SEE ALSO .Sh SEE ALSO
.Xr zpool-add 8 , .Xr zpool-add 8 ,
.Xr zpool-attach 8 , .Xr zpool-attach 8 ,

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
@ -27,79 +26,85 @@
.\" Copyright 2017 Nexenta Systems, Inc. .\" Copyright 2017 Nexenta Systems, Inc.
.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved. .\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
.\" .\"
.Dd August 9, 2019 .Dd May 27, 2021
.Dt ZPOOL-IOSTAT 8 .Dt ZPOOL-IOSTAT 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zpool-iostat .Nm zpool-iostat
.Nd Display logical I/O statistics for the given ZFS storage pools/vdevs .Nd display logical I/O statistics for ZFS storage pools
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zpool .Nm zpool
.Cm iostat .Cm iostat
.Op Oo Oo Fl c Ar SCRIPT Oc Oo Fl lq Oc Oc Ns | Ns Fl rw .Op Oo Oo Fl c Ar SCRIPT Oc Oo Fl lq Oc Oc Ns | Ns Fl rw
.Op Fl T Sy u Ns | Ns Sy d .Op Fl T Sy u Ns | Ns Sy d
.Op Fl ghHLnpPvy .Op Fl ghHLnpPvy
.Oo Oo Ar pool Ns ... Oc Ns | Ns Oo Ar pool vdev Ns ... Oc Ns | Ns Oo Ar vdev Ns ... Oc Oc .Oo Ar pool Ns Ns | Ns Oo Ar pool vdev Ns Oc Ns | Ns Ar vdev Ns Oc
.Op Ar interval Op Ar count .Op Ar interval Op Ar count
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width Ds Displays logical I/O statistics for the given pools/vdevs.
.It Xo Physical I/O statistics may be observed via
.Nm zpool
.Cm iostat
.Op Oo Oo Fl c Ar SCRIPT Oc Oo Fl lq Oc Oc Ns | Ns Fl rw
.Op Fl T Sy u Ns | Ns Sy d
.Op Fl ghHLnpPvy
.Oo Oo Ar pool Ns ... Oc Ns | Ns Oo Ar pool vdev Ns ... Oc Ns | Ns Oo Ar vdev Ns ... Oc Oc
.Op Ar interval Op Ar count
.Xc
Displays logical I/O statistics for the given pools/vdevs. Physical I/Os may
be observed via
.Xr iostat 1 . .Xr iostat 1 .
If writes are located nearby, they may be merged into a single If writes are located nearby, they may be merged into a single
larger operation. Additional I/O may be generated depending on the level of larger operation.
vdev redundancy. Additional I/O may be generated depending on the level of vdev redundancy.
To filter output, you may pass in a list of pools, a pool and list of vdevs To filter output, you may pass in a list of pools, a pool and list of vdevs
in that pool, or a list of any vdevs from any pool. If no items are specified, in that pool, or a list of any vdevs from any pool.
statistics for every pool in the system are shown. If no items are specified, statistics for every pool in the system are shown.
When given an When given an
.Ar interval , .Ar interval ,
the statistics are printed every the statistics are printed every
.Ar interval .Ar interval
seconds until ^C is pressed. If seconds until killed.
If
.Fl n .Fl n
flag is specified the headers are displayed only once, otherwise they are flag is specified the headers are displayed only once, otherwise they are
displayed periodically. If count is specified, the command exits displayed periodically.
after count reports are printed. The first report printed is always If
the statistics since boot regardless of whether .Ar count
is specified, the command exits after
.Ar count
reports are printed.
The first report printed is always the statistics since boot regardless of whether
.Ar interval .Ar interval
and and
.Ar count .Ar count
are passed. However, this behavior can be suppressed with the are passed.
However, this behavior can be suppressed with the
.Fl y .Fl y
flag. Also note that the units of flag.
Also note that the units of
.Sy K , .Sy K ,
.Sy M , .Sy M ,
.Sy G ... .Sy G Ns
that are printed in the report are in base 1024. To get the raw that are printed in the report are in base 1024.
values, use the To get the raw values, use the
.Fl p .Fl p
flag. flag.
.Bl -tag -width Ds .Bl -tag -width Ds
.It Fl c Op Ar SCRIPT1 Ns Oo , Ns Ar SCRIPT2 Oc Ns ... .It Fl c Op Ar SCRIPT1 Ns Oo , Ns Ar SCRIPT2 Oc Ns
Run a script (or scripts) on each vdev and include the output as a new column Run a script (or scripts) on each vdev and include the output as a new column
in the in the
.Nm zpool Cm iostat .Nm zpool Cm iostat
output. Users can run any script found in their output.
Users can run any script found in their
.Pa ~/.zpool.d .Pa ~/.zpool.d
directory or from the system directory or from the system
.Pa /etc/zfs/zpool.d .Pa /etc/zfs/zpool.d
directory. Script names containing the slash (/) character are not allowed. directory.
Script names containing the slash
.Pq Sy /
character are not allowed.
The default search path can be overridden by setting the The default search path can be overridden by setting the
ZPOOL_SCRIPTS_PATH environment variable. A privileged user can run .Sy ZPOOL_SCRIPTS_PATH
environment variable.
A privileged user can only run
.Fl c .Fl c
if they have the ZPOOL_SCRIPTS_AS_ROOT if they have the
environment variable set. If a script requires the use of a privileged .Sy ZPOOL_SCRIPTS_AS_ROOT
command, like environment variable set.
If a script requires the use of a privileged command, like
.Xr smartctl 8 , .Xr smartctl 8 ,
then it's recommended you allow the user access to it in then it's recommended you allow the user access to it in
.Pa /etc/sudoers .Pa /etc/sudoers
@ -114,25 +119,23 @@ is passed without a script name, it prints a list of all scripts.
also sets verbose mode also sets verbose mode
.No \&( Ns Fl v Ns No \&). .No \&( Ns Fl v Ns No \&).
.Pp .Pp
Script output should be in the form of "name=value". The column name is Script output should be in the form of "name=value".
set to "name" and the value is set to "value". Multiple lines can be The column name is set to "name" and the value is set to "value".
used to output multiple columns. The first line of output not in the Multiple lines can be used to output multiple columns.
"name=value" format is displayed without a column title, and no more The first line of output not in the
output after that is displayed. This can be useful for printing error "name=value" format is displayed without a column title,
messages. Blank or NULL values are printed as a '-' to make output and no more output after that is displayed.
awk-able. This can be useful for printing error messages.
Blank or NULL values are printed as a '-' to make output AWKable.
.Pp .Pp
The following environment variables are set before running each script: The following environment variables are set before running each script:
.Bl -tag -width "VDEV_PATH" .Bl -tag -compact -width "VDEV_ENC_SYSFS_PATH"
.It Sy VDEV_PATH .It Sy VDEV_PATH
Full path to the vdev Full path to the vdev
.El
.Bl -tag -width "VDEV_UPATH"
.It Sy VDEV_UPATH .It Sy VDEV_UPATH
Underlying path to the vdev (/dev/sd*). For use with device mapper, Underlying path to the vdev
multipath, or partitioned vdevs. .Pq Pa /dev/sd* .
.El For use with device mapper, multipath, or partitioned vdevs.
.Bl -tag -width "VDEV_ENC_SYSFS_PATH"
.It Sy VDEV_ENC_SYSFS_PATH .It Sy VDEV_ENC_SYSFS_PATH
The sysfs path to the enclosure for the vdev (if any). The sysfs path to the enclosure for the vdev (if any).
.El .El
@ -149,99 +152,106 @@ for standard date format.
See See
.Xr date 1 . .Xr date 1 .
.It Fl g .It Fl g
Display vdev GUIDs instead of the normal device names. These GUIDs Display vdev GUIDs instead of the normal device names.
can be used in place of device names for the zpool These GUIDs can be used in place of device names for the zpool
detach/offline/remove/replace commands. detach/offline/remove/replace commands.
.It Fl H .It Fl H
Scripted mode. Do not display headers, and separate fields by a Scripted mode.
Do not display headers, and separate fields by a
single tab instead of arbitrary space. single tab instead of arbitrary space.
.It Fl L .It Fl L
Display real paths for vdevs resolving all symbolic links. This can Display real paths for vdevs resolving all symbolic links.
be used to look up the current block device name regardless of the This can be used to look up the current block device name regardless of the
.Pa /dev/disk/ .Pa /dev/disk/
path used to open it. path used to open it.
.It Fl n .It Fl n
Print headers only once when passed Print headers only once when passed
.It Fl p .It Fl p
Display numbers in parsable (exact) values. Time values are in Display numbers in parsable (exact) values.
nanoseconds. Time values are in nanoseconds.
.It Fl P .It Fl P
Display full paths for vdevs instead of only the last component of Display full paths for vdevs instead of only the last component of the path.
the path. This can be used in conjunction with the This can be used in conjunction with the
.Fl L .Fl L
flag. flag.
.It Fl r .It Fl r
Print request size histograms for the leaf vdev's IO. This includes Print request size histograms for the leaf vdev's I/O.
histograms of individual IOs (ind) and aggregate IOs (agg). These stats This includes histograms of individual I/O (ind) and aggregate I/O (agg).
can be useful for observing how well IO aggregation is working. Note These stats can be useful for observing how well I/O aggregation is working.
that TRIM IOs may exceed 16M, but will be counted as 16M. Note that TRIM I/O may exceed 16M, but will be counted as 16M.
.It Fl v .It Fl v
Verbose statistics Reports usage statistics for individual vdevs within the Verbose statistics Reports usage statistics for individual vdevs within the
pool, in addition to the pool-wide statistics. pool, in addition to the pool-wide statistics.
.It Fl y .It Fl y
Omit statistics since boot. Normally the first line of output reports the statistics since boot:
Normally the first line of output reports the statistics since boot. suppress it.
This option suppresses that first line of output.
.Ar interval
.It Fl w .It Fl w
Display latency histograms: Display latency histograms:
.Pp .Bl -tag -compact -width "asyncq_read/write"
.Ar total_wait : .It Sy total_wait
Total IO time (queuing + disk IO time). Total I/O time (queuing + disk I/O time).
.Ar disk_wait : .It Sy disk_wait
Disk IO time (time reading/writing the disk). Disk I/O time (time reading/writing the disk).
.Ar syncq_wait : .It Sy syncq_wait
Amount of time IO spent in synchronous priority queues. Does not include Amount of time I/O spent in synchronous priority queues.
disk time. Does not include disk time.
.Ar asyncq_wait : .It Sy asyncq_wait
Amount of time IO spent in asynchronous priority queues. Does not include Amount of time I/O spent in asynchronous priority queues.
disk time. Does not include disk time.
.Ar scrub : .It Sy scrub
Amount of time IO spent in scrub queue. Does not include disk time. Amount of time I/O spent in scrub queue.
Does not include disk time.
.El
.It Fl l .It Fl l
Include average latency statistics: Include average latency statistics:
.Pp .Bl -tag -compact -width "asyncq_read/write"
.Ar total_wait : .It Sy total_wait
Average total IO time (queuing + disk IO time). Average total I/O time (queuing + disk I/O time).
.Ar disk_wait : .It Sy disk_wait
Average disk IO time (time reading/writing the disk). Average disk I/O time (time reading/writing the disk).
.Ar syncq_wait : .It Sy syncq_wait
Average amount of time IO spent in synchronous priority queues. Does Average amount of time I/O spent in synchronous priority queues.
not include disk time.
.Ar asyncq_wait :
Average amount of time IO spent in asynchronous priority queues.
Does not include disk time. Does not include disk time.
.Ar scrub : .It Sy asyncq_wait
Average queuing time in scrub queue. Does not include disk time. Average amount of time I/O spent in asynchronous priority queues.
.Ar trim : Does not include disk time.
Average queuing time in trim queue. Does not include disk time. .It Sy scrub
Average queuing time in scrub queue.
Does not include disk time.
.It Sy trim
Average queuing time in trim queue.
Does not include disk time.
.El
.It Fl q .It Fl q
Include active queue statistics. Each priority queue has both Include active queue statistics.
pending ( Each priority queue has both pending
.Ar pend ) .Sy ( pend )
and active ( and active
.Ar activ ) .Sy ( activ )
IOs. Pending IOs are waiting to I/O requests.
be issued to the disk, and active IOs have been issued to disk and are Pending requests are waiting to be issued to the disk,
waiting for completion. These stats are broken out by priority queue: and active requests have been issued to disk and are waiting for completion.
.Pp These stats are broken out by priority queue:
.Ar syncq_read/write : .Bl -tag -compact -width "asyncq_read/write"
.It Sy syncq_read/write
Current number of entries in synchronous priority Current number of entries in synchronous priority
queues. queues.
.Ar asyncq_read/write : .It Sy asyncq_read/write
Current number of entries in asynchronous priority queues. Current number of entries in asynchronous priority queues.
.Ar scrubq_read : .It Sy scrubq_read
Current number of entries in scrub queue. Current number of entries in scrub queue.
.Ar trimq_write : .It Sy trimq_write
Current number of entries in trim queue. Current number of entries in trim queue.
.El
.Pp .Pp
All queue statistics are instantaneous measurements of the number of All queue statistics are instantaneous measurements of the number of
entries in the queues. If you specify an interval, the measurements entries in the queues.
will be sampled from the end of the interval. If you specify an interval,
.El the measurements will be sampled from the end of the interval.
.El .El
.
.Sh SEE ALSO .Sh SEE ALSO
.Xr zpool-list 8 ,
.Xr zpool-status 8 ,
.Xr iostat 1 , .Xr iostat 1 ,
.Xr smartctl 8 .Xr smartctl 8 ,
.Xr zpool-list 8 ,
.Xr zpool-status 8

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
@ -30,28 +29,20 @@
.Dd August 9, 2019 .Dd August 9, 2019
.Dt ZPOOL-LIST 8 .Dt ZPOOL-LIST 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zpool-list .Nm zpool-list
.Nd Lists ZFS storage pools along with a health status and space usage .Nd list information about ZFS storage pools
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zpool .Nm zpool
.Cm list .Cm list
.Op Fl HgLpPv .Op Fl HgLpPv
.Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ... .Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns
.Op Fl T Sy u Ns | Ns Sy d .Op Fl T Sy u Ns | Ns Sy d
.Oo Ar pool Oc Ns ... .Oo Ar pool Oc Ns
.Op Ar interval Op Ar count .Op Ar interval Op Ar count
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width Ds
.It Xo
.Nm zpool
.Cm list
.Op Fl HgLpPv
.Op Fl o Ar property Ns Oo , Ns Ar property Oc Ns ...
.Op Fl T Sy u Ns | Ns Sy d
.Oo Ar pool Oc Ns ...
.Op Ar interval Op Ar count
.Xc
Lists the given pools along with a health status and space usage. Lists the given pools along with a health status and space usage.
If no If no
.Ar pool Ns s .Ar pool Ns s
@ -60,7 +51,7 @@ When given an
.Ar interval , .Ar interval ,
the information is printed every the information is printed every
.Ar interval .Ar interval
seconds until ^C is pressed. seconds until killed.
If If
.Ar count .Ar count
is specified, the command exits after is specified, the command exits after
@ -68,8 +59,8 @@ is specified, the command exits after
reports are printed. reports are printed.
.Bl -tag -width Ds .Bl -tag -width Ds
.It Fl g .It Fl g
Display vdev GUIDs instead of the normal device names. These GUIDs Display vdev GUIDs instead of the normal device names.
can be used in place of device names for the zpool These GUIDs can be used in place of device names for the zpool
detach/offline/remove/replace commands. detach/offline/remove/replace commands.
.It Fl H .It Fl H
Scripted mode. Scripted mode.
@ -81,19 +72,21 @@ See the
.Xr zpoolprops 8 .Xr zpoolprops 8
manual page for a list of valid properties. manual page for a list of valid properties.
The default list is The default list is
.Cm name , size , allocated , free , checkpoint, expandsize , fragmentation , .Sy name , size , allocated , free , checkpoint, expandsize , fragmentation ,
.Cm capacity , dedupratio , health , altroot . .Sy capacity , dedupratio , health , altroot .
.It Fl L .It Fl L
Display real paths for vdevs resolving all symbolic links. This can Display real paths for vdevs resolving all symbolic links.
be used to look up the current block device name regardless of the This can be used to look up the current block device name regardless of the
/dev/disk/ path used to open it. .Pa /dev/disk
path used to open it.
.It Fl p .It Fl p
Display numbers in parsable Display numbers in parsable
.Pq exact .Pq exact
values. values.
.It Fl P .It Fl P
Display full paths for vdevs instead of only the last component of Display full paths for vdevs instead of only the last component of
the path. This can be used in conjunction with the the path.
This can be used in conjunction with the
.Fl L .Fl L
flag. flag.
.It Fl T Sy u Ns | Ns Sy d .It Fl T Sy u Ns | Ns Sy d
@ -113,7 +106,7 @@ Verbose statistics.
Reports usage statistics for individual vdevs within the pool, in addition to Reports usage statistics for individual vdevs within the pool, in addition to
the pool-wide statistics. the pool-wide statistics.
.El .El
.El .
.Sh SEE ALSO .Sh SEE ALSO
.Xr zpool-import 8 , .Xr zpool-import 8 ,
.Xr zpool-status 8 .Xr zpool-status 8

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
@ -30,27 +29,30 @@
.Dd August 9, 2019 .Dd August 9, 2019
.Dt ZPOOL-OFFLINE 8 .Dt ZPOOL-OFFLINE 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zpool-offline .Nm zpool-offline
.Nd Take a physical device in a ZFS storage pool offline .Nd take physical devices offline in ZFS storage pool
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zpool .Nm zpool
.Cm offline .Cm offline
.Op Fl f .Op Fl ft
.Op Fl t .Ar pool
.Ar pool Ar device Ns ... .Ar device Ns
.Nm zpool .Nm zpool
.Cm online .Cm online
.Op Fl e .Op Fl e
.Ar pool Ar device Ns ... .Ar pool
.Ar device Ns
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width Ds .Bl -tag -width Ds
.It Xo .It Xo
.Nm zpool .Nm zpool
.Cm offline .Cm offline
.Op Fl f .Op Fl ft
.Op Fl t .Ar pool
.Ar pool Ar device Ns ... .Ar device Ns
.Xc .Xc
Takes the specified physical device offline. Takes the specified physical device offline.
While the While the
@ -59,8 +61,9 @@ is offline, no attempt is made to read or write to the device.
This command is not applicable to spares. This command is not applicable to spares.
.Bl -tag -width Ds .Bl -tag -width Ds
.It Fl f .It Fl f
Force fault. Instead of offlining the disk, put it into a faulted Force fault.
state. The fault will persist across imports unless the Instead of offlining the disk, put it into a faulted state.
The fault will persist across imports unless the
.Fl t .Fl t
flag was specified. flag was specified.
.It Fl t .It Fl t
@ -71,7 +74,8 @@ Upon reboot, the specified physical device reverts to its previous state.
.Nm zpool .Nm zpool
.Cm online .Cm online
.Op Fl e .Op Fl e
.Ar pool Ar device Ns ... .Ar pool
.Ar device Ns
.Xc .Xc
Brings the specified physical device online. Brings the specified physical device online.
This command is not applicable to spares. This command is not applicable to spares.
@ -82,6 +86,7 @@ If the device is part of a mirror or raidz then all devices must be expanded
before the new space will become available to the pool. before the new space will become available to the pool.
.El .El
.El .El
.
.Sh SEE ALSO .Sh SEE ALSO
.Xr zpool-detach 8 , .Xr zpool-detach 8 ,
.Xr zpool-remove 8 , .Xr zpool-remove 8 ,

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
@ -32,12 +31,12 @@
.Os .Os
.Sh NAME .Sh NAME
.Nm zpool-remove .Nm zpool-remove
.Nd Remove a device from a ZFS storage pool .Nd remove devices from ZFS storage pool
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zpool .Nm zpool
.Cm remove .Cm remove
.Op Fl npw .Op Fl npw
.Ar pool Ar device Ns ... .Ar pool Ar device Ns
.Nm zpool .Nm zpool
.Cm remove .Cm remove
.Fl s .Fl s
@ -48,7 +47,7 @@
.Nm zpool .Nm zpool
.Cm remove .Cm remove
.Op Fl npw .Op Fl npw
.Ar pool Ar device Ns ... .Ar pool Ar device Ns
.Xc .Xc
Removes the specified device from the pool. Removes the specified device from the pool.
This command supports removing hot spare, cache, log, and both mirrored and This command supports removing hot spare, cache, log, and both mirrored and
@ -57,7 +56,7 @@ When the primary pool storage includes a top-level raidz vdev only hot spare,
cache, and log devices can be removed. cache, and log devices can be removed.
Note that keys for all encrypted datasets must be loaded for top-level vdevs Note that keys for all encrypted datasets must be loaded for top-level vdevs
to be removed. to be removed.
.sp .Pp
Removing a top-level vdev reduces the total amount of space in the storage pool. Removing a top-level vdev reduces the total amount of space in the storage pool.
The specified device will be evacuated by copying all allocated space from it to The specified device will be evacuated by copying all allocated space from it to
the other devices in the pool. the other devices in the pool.
@ -67,8 +66,8 @@ command initiates the removal and returns, while the evacuation continues in
the background. the background.
The removal progress can be monitored with The removal progress can be monitored with
.Nm zpool Cm status . .Nm zpool Cm status .
If an IO error is encountered during the removal process it will be If an IO error is encountered during the removal process it will be cancelled.
cancelled. The The
.Sy device_removal .Sy device_removal
feature flag must be enabled to remove a top-level vdev, see feature flag must be enabled to remove a top-level vdev, see
.Xr zpool-features 5 . .Xr zpool-features 5 .
@ -81,7 +80,8 @@ the
command. command.
.Bl -tag -width Ds .Bl -tag -width Ds
.It Fl n .It Fl n
Do not actually perform the removal ("no-op"). Do not actually perform the removal
.Pq Qq No-op .
Instead, print the estimated amount of memory that will be used by the Instead, print the estimated amount of memory that will be used by the
mapping table after the removal completes. mapping table after the removal completes.
This is nonzero only for top-level vdevs. This is nonzero only for top-level vdevs.
@ -105,7 +105,7 @@ Stops and cancels an in-progress removal of a top-level vdev.
.Sh SEE ALSO .Sh SEE ALSO
.Xr zpool-add 8 , .Xr zpool-add 8 ,
.Xr zpool-detach 8 , .Xr zpool-detach 8 ,
.Xr zpool-offline 8 ,
.Xr zpool-labelclear 8 , .Xr zpool-labelclear 8 ,
.Xr zpool-offline 8 ,
.Xr zpool-replace 8 , .Xr zpool-replace 8 ,
.Xr zpool-split 8 .Xr zpool-split 8

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
@ -27,29 +26,27 @@
.\" Copyright 2017 Nexenta Systems, Inc. .\" Copyright 2017 Nexenta Systems, Inc.
.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved. .\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
.\" .\"
.Dd August 9, 2019 .Dd June 2, 2021
.Dt ZPOOL-REOPEN 8 .Dt ZPOOL-REOPEN 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zpool-reopen .Nm zpool-reopen
.Nd Reopen all virtual devices (vdevs) associated with a ZFS storage pool .Nd reopen vdevs associated with ZFS storage pools
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zpool .Nm zpool
.Cm reopen .Cm reopen
.Op Fl n .Op Fl n
.Ar pool .Oo Ar pool Oc Ns
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width Ds Reopen all vdevs associated with the specified pools,
.It Xo or all pools if none specified.
.Nm zpool .
.Cm reopen .Sh OPTIONS
.Op Fl n .Bl -tag -width "-n"
.Ar pool
.Xc
Reopen all the vdevs associated with the pool.
.Bl -tag -width Ds
.It Fl n .It Fl n
Do not restart an in-progress scrub operation. This is not recommended and can Do not restart an in-progress scrub operation.
This is not recommended and can
result in partially resilvered devices unless a second scrub is performed. result in partially resilvered devices unless a second scrub is performed.
.El .El
.El

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
@ -27,48 +26,42 @@
.\" Copyright 2017 Nexenta Systems, Inc. .\" Copyright 2017 Nexenta Systems, Inc.
.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved. .\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
.\" .\"
.Dd May 15, 2020 .Dd May 29, 2021
.Dt ZPOOL-REPLACE 8 .Dt ZPOOL-REPLACE 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zpool-replace .Nm zpool-replace
.Nd Replace one device with another in a ZFS storage pool .Nd replace one device with another in ZFS storage pool
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zpool .Nm zpool
.Cm replace .Cm replace
.Op Fl fsw .Op Fl fsw
.Oo Fl o Ar property Ns = Ns Ar value Oc .Oo Fl o Ar property Ns = Ns Ar value Oc
.Ar pool Ar device Op Ar new_device .Ar pool Ar device Op Ar new-device
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width Ds
.It Xo
.Nm zpool
.Cm replace
.Op Fl fsw
.Op Fl o Ar property Ns = Ns Ar value
.Ar pool Ar device Op Ar new_device
.Xc
Replaces Replaces
.Ar old_device .Ar device
with with
.Ar new_device . .Ar new-device .
This is equivalent to attaching This is equivalent to attaching
.Ar new_device , .Ar new-device ,
waiting for it to resilver, and then detaching waiting for it to resilver, and then detaching
.Ar old_device . .Ar device .
Any in progress scrub will be cancelled. Any in progress scrub will be cancelled.
.Pp .Pp
The size of The size of
.Ar new_device .Ar new-device
must be greater than or equal to the minimum size of all the devices in a mirror must be greater than or equal to the minimum size of all the devices in a mirror
or raidz configuration. or raidz configuration.
.Pp .Pp
.Ar new_device .Ar new-device
is required if the pool is not redundant. is required if the pool is not redundant.
If If
.Ar new_device .Ar new-device
is not specified, it defaults to is not specified, it defaults to
.Ar old_device . .Ar device .
This form of replacement is useful after an existing disk has failed and has This form of replacement is useful after an existing disk has failed and has
been physically replaced. been physically replaced.
In this case, the new disk may have the same In this case, the new disk may have the same
@ -78,18 +71,19 @@ ZFS recognizes this.
.Bl -tag -width Ds .Bl -tag -width Ds
.It Fl f .It Fl f
Forces use of Forces use of
.Ar new_device , .Ar new-device ,
even if it appears to be in use. even if it appears to be in use.
Not all devices can be overridden in this manner. Not all devices can be overridden in this manner.
.It Fl o Ar property Ns = Ns Ar value .It Fl o Ar property Ns = Ns Ar value
Sets the given pool properties. See the Sets the given pool properties.
See the
.Xr zpoolprops 8 .Xr zpoolprops 8
manual page for a list of valid properties that can be set. manual page for a list of valid properties that can be set.
The only property supported at the moment is The only property supported at the moment is
.Sy ashift . .Sy ashift .
.It Fl s .It Fl s
The The
.Ar new_device .Ar new-device
is reconstructed sequentially to restore redundancy as quickly as possible. is reconstructed sequentially to restore redundancy as quickly as possible.
Checksums are not verfied during sequential reconstruction so a scrub is Checksums are not verfied during sequential reconstruction so a scrub is
started when the resilver completes. started when the resilver completes.
@ -97,7 +91,7 @@ Sequential reconstruction is not supported for raidz configurations.
.It Fl w .It Fl w
Waits until the replacement has completed before returning. Waits until the replacement has completed before returning.
.El .El
.El .
.Sh SEE ALSO .Sh SEE ALSO
.Xr zpool-detach 8 , .Xr zpool-detach 8 ,
.Xr zpool-initialize 8 , .Xr zpool-initialize 8 ,

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
@ -27,29 +26,27 @@
.\" Copyright 2017 Nexenta Systems, Inc. .\" Copyright 2017 Nexenta Systems, Inc.
.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved. .\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
.\" .\"
.Dd August 9, 2019 .Dd May 27, 2021
.Dt ZPOOL-RESILVER 8 .Dt ZPOOL-RESILVER 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zpool-resilver .Nm zpool-resilver
.Nd Start a resilver of a device in a ZFS storage pool .Nd resilver devices in ZFS storage pools
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zpool .Nm zpool
.Cm resilver .Cm resilver
.Ar pool Ns ... .Ar pool Ns
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width Ds Starts a resilver of the specified pools.
.It Xo If an existing resilver is already running it will be restarted from the beginning.
.Nm zpool Any drives that were scheduled for a deferred
.Cm resilver resilver will be added to the new one.
.Ar pool Ns ... This requires the
.Xc
Starts a resilver. If an existing resilver is already running it will be
restarted from the beginning. Any drives that were scheduled for a deferred
resilver will be added to the new one. This requires the
.Sy resilver_defer .Sy resilver_defer
feature. pool feature.
.El .
.Sh SEE ALSO .Sh SEE ALSO
.Xr zpool-iostat 8 , .Xr zpool-iostat 8 ,
.Xr zpool-online 8 , .Xr zpool-online 8 ,

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
@ -27,27 +26,21 @@
.\" Copyright 2017 Nexenta Systems, Inc. .\" Copyright 2017 Nexenta Systems, Inc.
.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved. .\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
.\" .\"
.Dd August 9, 2019 .Dd May 27, 2021
.Dt ZPOOL-SCRUB 8 .Dt ZPOOL-SCRUB 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zpool-scrub .Nm zpool-scrub
.Nd Begin a scrub or resume a paused scrub of a ZFS storage pool .Nd begin or resume scrub of ZFS storage pools
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zpool .Nm zpool
.Cm scrub .Cm scrub
.Op Fl s | Fl p .Op Fl s Ns | Ns Fl p
.Op Fl w .Op Fl w
.Ar pool Ns ... .Ar pool Ns
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width Ds
.It Xo
.Nm zpool
.Cm scrub
.Op Fl s | Fl p
.Op Fl w
.Ar pool Ns ...
.Xc
Begins a scrub or resumes a paused scrub. Begins a scrub or resumes a paused scrub.
The scrub examines all data in the specified pools to verify that it checksums The scrub examines all data in the specified pools to verify that it checksums
correctly. correctly.
@ -78,13 +71,13 @@ If a resilver is in progress, ZFS does not allow a scrub to be started until the
resilver completes. resilver completes.
.Pp .Pp
Note that, due to changes in pool data on a live system, it is possible for Note that, due to changes in pool data on a live system, it is possible for
scrubs to progress slightly beyond 100% completion. During this period, no scrubs to progress slightly beyond 100% completion.
completion time estimate will be provided. During this period, no completion time estimate will be provided.
.Bl -tag -width Ds .
.Sh OPTIONS
.Bl -tag -width "-s"
.It Fl s .It Fl s
Stop scrubbing. Stop scrubbing.
.El
.Bl -tag -width Ds
.It Fl p .It Fl p
Pause scrubbing. Pause scrubbing.
Scrub pause state and progress are periodically synced to disk. Scrub pause state and progress are periodically synced to disk.
@ -98,7 +91,7 @@ again.
.It Fl w .It Fl w
Wait until scrub has completed before returning. Wait until scrub has completed before returning.
.El .El
.El .
.Sh SEE ALSO .Sh SEE ALSO
.Xr zpool-iostat 8 , .Xr zpool-iostat 8 ,
.Xr zpool-resilver 8 , .Xr zpool-resilver 8 ,

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
@ -27,31 +26,23 @@
.\" Copyright 2017 Nexenta Systems, Inc. .\" Copyright 2017 Nexenta Systems, Inc.
.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved. .\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
.\" .\"
.Dd August 9, 2019 .Dd June 2, 2021
.Dt ZPOOL-SPLIT 8 .Dt ZPOOL-SPLIT 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zpool-split .Nm zpool-split
.Nd Split devices off a ZFS storage pool creating a new pool .Nd split devices off ZFS storage pool, creating new pool
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zpool .Nm zpool
.Cm split .Cm split
.Op Fl gLlnP .Op Fl gLlnP
.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ... .Oo Fl o Ar property Ns = Ns Ar value Oc Ns
.Op Fl R Ar root .Op Fl R Ar root
.Ar pool newpool .Ar pool newpool
.Oo Ar device Oc Ns ... .Oo Ar device Oc Ns
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width Ds
.It Xo
.Nm zpool
.Cm split
.Op Fl gLlnP
.Oo Fl o Ar property Ns = Ns Ar value Oc Ns ...
.Op Fl R Ar root
.Ar pool newpool
.Op Ar device ...
.Xc
Splits devices off Splits devices off
.Ar pool .Ar pool
creating creating
@ -76,30 +67,31 @@ and, should any devices remain unspecified,
the last device in each mirror is used as would be by default. the last device in each mirror is used as would be by default.
.Bl -tag -width Ds .Bl -tag -width Ds
.It Fl g .It Fl g
Display vdev GUIDs instead of the normal device names. These GUIDs Display vdev GUIDs instead of the normal device names.
can be used in place of device names for the zpool These GUIDs can be used in place of device names for the zpool
detach/offline/remove/replace commands. detach/offline/remove/replace commands.
.It Fl L .It Fl L
Display real paths for vdevs resolving all symbolic links. This can Display real paths for vdevs resolving all symbolic links.
be used to look up the current block device name regardless of the This can be used to look up the current block device name regardless of the
.Pa /dev/disk/ .Pa /dev/disk/
path used to open it. path used to open it.
.It Fl l .It Fl l
Indicates that this command will request encryption keys for all encrypted Indicates that this command will request encryption keys for all encrypted
datasets it attempts to mount as it is bringing the new pool online. Note that datasets it attempts to mount as it is bringing the new pool online.
if any datasets have a Note that if any datasets have
.Sy keylocation .Sy keylocation Ns = Ns Sy prompt ,
of this command will block waiting for the keys to be entered.
.Sy prompt Without this flag, encrypted datasets will be left unavailable until the keys are loaded.
this command will block waiting for the keys to be entered. Without this flag
encrypted datasets will be left unavailable until the keys are loaded.
.It Fl n .It Fl n
Do dry run, do not actually perform the split. Do a dry-run
.Pq Qq No-op
split: do not actually perform it.
Print out the expected configuration of Print out the expected configuration of
.Ar newpool . .Ar newpool .
.It Fl P .It Fl P
Display full paths for vdevs instead of only the last component of Display full paths for vdevs instead of only the last component of
the path. This can be used in conjunction with the the path.
This can be used in conjunction with the
.Fl L .Fl L
flag. flag.
.It Fl o Ar property Ns = Ns Ar value .It Fl o Ar property Ns = Ns Ar value
@ -117,7 +109,7 @@ to
.Ar root .Ar root
and automatically import it. and automatically import it.
.El .El
.El .
.Sh SEE ALSO .Sh SEE ALSO
.Xr zpool-import 8 , .Xr zpool-import 8 ,
.Xr zpool-list 8 , .Xr zpool-list 8 ,

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
@ -27,37 +26,29 @@
.\" Copyright 2017 Nexenta Systems, Inc. .\" Copyright 2017 Nexenta Systems, Inc.
.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved. .\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
.\" .\"
.Dd May 15, 2020 .Dd June 2, 2021
.Dt ZPOOL-STATUS 8 .Dt ZPOOL-STATUS 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zpool-status .Nm zpool-status
.Nd Display detailed health status for the given ZFS storage pools .Nd show detailed health status for ZFS storage pools
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zpool .Nm zpool
.Cm status .Cm status
.Oo Fl c Ar SCRIPT Oc
.Op Fl DigLpPstvx .Op Fl DigLpPstvx
.Op Fl T Sy u Ns | Ns Sy d .Op Fl T Sy u Ns | Ns Sy d
.Oo Ar pool Oc Ns ... .Op Fl c Op Ar SCRIPT1 Ns Oo , Ns Ar SCRIPT2 Oc Ns
.Oo Ar pool Oc Ns
.Op Ar interval Op Ar count .Op Ar interval Op Ar count
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width Ds
.It Xo
.Nm zpool
.Cm status
.Op Fl c Op Ar SCRIPT1 Ns Oo , Ns Ar SCRIPT2 Oc Ns ...
.Op Fl DigLpPstvx
.Op Fl T Sy u Ns | Ns Sy d
.Oo Ar pool Oc Ns ...
.Op Ar interval Op Ar count
.Xc
Displays the detailed health status for the given pools. Displays the detailed health status for the given pools.
If no If no
.Ar pool .Ar pool
is specified, then the status of each pool in the system is displayed. is specified, then the status of each pool in the system is displayed.
For more information on pool and device health, see the For more information on pool and device health, see the
.Em Device Failure and Recovery .Sx Device Failure and Recovery
section of section of
.Xr zpoolconcepts 8 . .Xr zpoolconcepts 8 .
.Pp .Pp
@ -66,11 +57,12 @@ and the estimated time to completion.
Both of these are only approximate, because the amount of data in the pool and Both of these are only approximate, because the amount of data in the pool and
the other workloads on the system can change. the other workloads on the system can change.
.Bl -tag -width Ds .Bl -tag -width Ds
.It Fl c Op Ar SCRIPT1 Ns Oo , Ns Ar SCRIPT2 Oc Ns ... .It Fl c Op Ar SCRIPT1 Ns Oo , Ns Ar SCRIPT2 Oc Ns
Run a script (or scripts) on each vdev and include the output as a new column Run a script (or scripts) on each vdev and include the output as a new column
in the in the
.Nm zpool Cm status .Nm zpool Cm status
output. See the output.
See the
.Fl c .Fl c
option of option of
.Nm zpool Cm iostat .Nm zpool Cm iostat
@ -78,19 +70,20 @@ for complete details.
.It Fl i .It Fl i
Display vdev initialization status. Display vdev initialization status.
.It Fl g .It Fl g
Display vdev GUIDs instead of the normal device names. These GUIDs Display vdev GUIDs instead of the normal device names
can be used in place of device names for the zpool These GUIDs can be used in place of device names for the zpool
detach/offline/remove/replace commands. detach/offline/remove/replace commands.
.It Fl L .It Fl L
Display real paths for vdevs resolving all symbolic links. This can Display real paths for vdevs resolving all symbolic links.
be used to look up the current block device name regardless of the This can be used to look up the current block device name regardless of the
.Pa /dev/disk/ .Pa /dev/disk/
path used to open it. path used to open it.
.It Fl p .It Fl p
Display numbers in parsable (exact) values. Display numbers in parsable (exact) values.
.It Fl P .It Fl P
Display full paths for vdevs instead of only the last component of Display full paths for vdevs instead of only the last component of
the path. This can be used in conjunction with the the path.
This can be used in conjunction with the
.Fl L .Fl L
flag. flag.
.It Fl D .It Fl D
@ -100,11 +93,14 @@ and referenced
.Pq logically referenced in the pool .Pq logically referenced in the pool
block counts and sizes by reference count. block counts and sizes by reference count.
.It Fl s .It Fl s
Display the number of leaf VDEV slow IOs. This is the number of IOs that Display the number of leaf VDEV slow IOs.
didn't complete in \fBzio_slow_io_ms\fR milliseconds (default 30 seconds). This is the number of IOs that
didn't complete in
.Sy zio_slow_io_ms
milliseconds (default 30 seconds).
This does not necessarily mean the IOs failed to complete, just took an This does not necessarily mean the IOs failed to complete, just took an
unreasonably long amount of time. This may indicate a problem with the unreasonably long amount of time.
underlying storage. This may indicate a problem with the underlying storage.
.It Fl t .It Fl t
Display vdev TRIM status. Display vdev TRIM status.
.It Fl T Sy u Ns | Ns Sy d .It Fl T Sy u Ns | Ns Sy d
@ -127,7 +123,7 @@ Only display status for pools that are exhibiting errors or are otherwise
unavailable. unavailable.
Warnings about pools not using the latest on-disk format will not be included. Warnings about pools not using the latest on-disk format will not be included.
.El .El
.El .
.Sh SEE ALSO .Sh SEE ALSO
.Xr zpool-events 8 , .Xr zpool-events 8 ,
.Xr zpool-history 8 , .Xr zpool-history 8 ,

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
@ -30,28 +29,25 @@
.Dd August 9, 2019 .Dd August 9, 2019
.Dt ZPOOL-SYNC 8 .Dt ZPOOL-SYNC 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zpool-sync .Nm zpool-sync
.Nd Force data to be written to primary storage of a ZFS storage pool and update reporting data .Nd flush data to primary storage of ZFS storage pools
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zpool .Nm zpool
.Cm sync .Cm sync
.Oo Ar pool Oc Ns ... .Oo Ar pool Oc Ns
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width Ds
.It Xo
.Nm zpool
.Cm sync
.Op Ar pool ...
.Xc
This command forces all in-core dirty data to be written to the primary This command forces all in-core dirty data to be written to the primary
pool storage and not the ZIL. It will also update administrative pool storage and not the ZIL.
information including quota reporting. Without arguments, It will also update administrative information including quota reporting.
.Sy zpool sync Without arguments,
will sync all pools on the system. Otherwise, it will sync only the .Nm zpool Cm sync
specified pool(s). will sync all pools on the system.
.El Otherwise, it will sync only the specified pools.
.
.Sh SEE ALSO .Sh SEE ALSO
.Xr zpoolconcepts 8 ,
.Xr zpool-export 8 , .Xr zpool-export 8 ,
.Xr zpool-iostat 8 .Xr zpool-iostat 8 ,
.Xr zpoolconcepts 8

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
@ -27,56 +26,54 @@
.\" Copyright 2017 Nexenta Systems, Inc. .\" Copyright 2017 Nexenta Systems, Inc.
.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved. .\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
.\" .\"
.Dd February 25, 2020 .Dd May 27, 2021
.Dt ZPOOL-TRIM 8 .Dt ZPOOL-TRIM 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zpool-trim .Nm zpool-trim
.Nd Initiate immediate TRIM operations for all free space in a ZFS storage pool .Nd initiate TRIM of free space in ZFS storage pool
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zpool .Nm zpool
.Cm trim .Cm trim
.Op Fl dw .Op Fl dw
.Op Fl r Ar rate .Op Fl r Ar rate
.Op Fl c | Fl s .Op Fl c Ns | Ns Fl s
.Ar pool .Ar pool
.Op Ar device Ns ... .Oo Ar device Ns Oc Ns
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width Ds
.It Xo
.Nm zpool
.Cm trim
.Op Fl dw
.Op Fl c | Fl s
.Ar pool
.Op Ar device Ns ...
.Xc
Initiates an immediate on-demand TRIM operation for all of the free space in Initiates an immediate on-demand TRIM operation for all of the free space in
a pool. This operation informs the underlying storage devices of all blocks a pool.
This operation informs the underlying storage devices of all blocks
in the pool which are no longer allocated and allows thinly provisioned in the pool which are no longer allocated and allows thinly provisioned
devices to reclaim the space. devices to reclaim the space.
.Pp .Pp
A manual on-demand TRIM operation can be initiated irrespective of the A manual on-demand TRIM operation can be initiated irrespective of the
.Sy autotrim .Sy autotrim
pool property setting. See the documentation for the pool property setting.
See the documentation for the
.Sy autotrim .Sy autotrim
property above for the types of vdev devices which can be trimmed. property above for the types of vdev devices which can be trimmed.
.Bl -tag -width Ds .Bl -tag -width Ds
.It Fl d -secure .It Fl d , -secure
Causes a secure TRIM to be initiated. When performing a secure TRIM, the Causes a secure TRIM to be initiated.
When performing a secure TRIM, the
device guarantees that data stored on the trimmed blocks has been erased. device guarantees that data stored on the trimmed blocks has been erased.
This requires support from the device and is not supported by all SSDs. This requires support from the device and is not supported by all SSDs.
.It Fl r -rate Ar rate .It Fl r , -rate Ar rate
Controls the rate at which the TRIM operation progresses. Without this Controls the rate at which the TRIM operation progresses.
option TRIM is executed as quickly as possible. The rate, expressed in bytes Without this
option TRIM is executed as quickly as possible.
The rate, expressed in bytes
per second, is applied on a per-vdev basis and may be set differently for per second, is applied on a per-vdev basis and may be set differently for
each leaf vdev. each leaf vdev.
.It Fl c, -cancel .It Fl c , -cancel
Cancel trimming on the specified devices, or all eligible devices if none Cancel trimming on the specified devices, or all eligible devices if none
are specified. are specified.
If one or more target devices are invalid or are not currently being If one or more target devices are invalid or are not currently being
trimmed, the command will fail and no cancellation will occur on any device. trimmed, the command will fail and no cancellation will occur on any device.
.It Fl s -suspend .It Fl s , -suspend
Suspend trimming on the specified devices, or all eligible devices if none Suspend trimming on the specified devices, or all eligible devices if none
are specified. are specified.
If one or more target devices are invalid or are not currently being If one or more target devices are invalid or are not currently being
@ -84,10 +81,10 @@ trimmed, the command will fail and no suspension will occur on any device.
Trimming can then be resumed by running Trimming can then be resumed by running
.Nm zpool Cm trim .Nm zpool Cm trim
with no flags on the relevant target devices. with no flags on the relevant target devices.
.It Fl w -wait .It Fl w , -wait
Wait until the devices are done being trimmed before returning. Wait until the devices are done being trimmed before returning.
.El .El
.El .
.Sh SEE ALSO .Sh SEE ALSO
.Xr zpool-initialize 8 , .Xr zpool-initialize 8 ,
.Xr zpool-wait 8 , .Xr zpool-wait 8 ,

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
@ -31,9 +30,10 @@
.Dd August 9, 2019 .Dd August 9, 2019
.Dt ZPOOL-UPGRADE 8 .Dt ZPOOL-UPGRADE 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zpool-upgrade .Nm zpool-upgrade
.Nd Manage version and feature flags of ZFS storage pools .Nd manage version and feature flags of ZFS storage pools
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zpool .Nm zpool
.Cm upgrade .Cm upgrade
@ -43,7 +43,8 @@
.Nm zpool .Nm zpool
.Cm upgrade .Cm upgrade
.Op Fl V Ar version .Op Fl V Ar version
.Fl a Ns | Ns Ar pool Ns ... .Fl a Ns | Ns Ar pool Ns
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width Ds .Bl -tag -width Ds
.It Xo .It Xo
@ -56,29 +57,30 @@ These pools can continue to be used, but some features may not be available.
Use Use
.Nm zpool Cm upgrade Fl a .Nm zpool Cm upgrade Fl a
to enable all features on all pools (subject to the to enable all features on all pools (subject to the
.Fl o Ar compatibility .Fl o Sy compatibility
property). property).
.It Xo .It Xo
.Nm zpool .Nm zpool
.Cm upgrade .Cm upgrade
.Fl v .Fl v
.Xc .Xc
Displays legacy ZFS versions supported by the current software. Displays legacy ZFS versions supported by the this version of ZFS.
See See
.Xr zpool-features 5 .Xr zpool-features 5
for a description of feature flags features supported by the current software. for a description of feature flags features supported by this version of ZFS.
.It Xo .It Xo
.Nm zpool .Nm zpool
.Cm upgrade .Cm upgrade
.Op Fl V Ar version .Op Fl V Ar version
.Fl a Ns | Ns Ar pool Ns ... .Fl a Ns | Ns Ar pool Ns
.Xc .Xc
Enables all supported features on the given pool. Enables all supported features on the given pool.
.Pp .Pp
If the pool has specified compatibility feature sets using the If the pool has specified compatibility feature sets using the
.Fl o Ar compatibility .Fl o Sy compatibility
property, only the features present in all requested compatibility sets will be property, only the features present in all requested compatibility sets will be
enabled. If this property is set to enabled.
If this property is set to
.Ar legacy .Ar legacy
then no upgrade will take place. then no upgrade will take place.
.Pp .Pp
@ -94,15 +96,14 @@ Enables all supported features (from specified compatibility sets, if any) on al
pools. pools.
.It Fl V Ar version .It Fl V Ar version
Upgrade to the specified legacy version. Upgrade to the specified legacy version.
If the If specified, no features will be enabled on the pool.
.Fl V
flag is specified, no features will be enabled on the pool.
This option can only be used to increase the version number up to the last This option can only be used to increase the version number up to the last
supported legacy version number. supported legacy version number.
.El .El
.El .El
.
.Sh SEE ALSO .Sh SEE ALSO
.Xr zpool-features 5 , .Xr zpool-features 5 ,
.Xr zpool-history 8 ,
.Xr zpoolconcepts 8 , .Xr zpoolconcepts 8 ,
.Xr zpoolprops 8 , .Xr zpoolprops 8
.Xr zpool-history 8

View File

@ -27,31 +27,23 @@
.\" Copyright 2017 Nexenta Systems, Inc. .\" Copyright 2017 Nexenta Systems, Inc.
.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved. .\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
.\" .\"
.Dd February 25, 2020 .Dd May 27, 2021
.Dt ZPOOL-WAIT 8 .Dt ZPOOL-WAIT 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zpool-wait .Nm zpool-wait
.Nd Wait for background activity to stop in a ZFS storage pool .Nd wait for activity to stop in a ZFS storage pool
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm zpool .Nm zpool
.Cm wait .Cm wait
.Op Fl Hp .Op Fl Hp
.Op Fl T Sy u Ns | Ns Sy d .Op Fl T Sy u Ns | Ns Sy d
.Op Fl t Ar activity Ns Oo , Ns Ar activity Ns Oc Ns ... .Op Fl t Ar activity Ns Oo , Ns Ar activity Ns Oc Ns
.Ar pool .Ar pool
.Op Ar interval .Op Ar interval
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Bl -tag -width Ds
.It Xo
.Nm zpool
.Cm wait
.Op Fl Hp
.Op Fl T Sy u Ns | Ns Sy d
.Op Fl t Ar activity Ns Oo , Ns Ar activity Ns Oc Ns ...
.Ar pool
.Op Ar interval
.Xc
Waits until all background activity of the given types has ceased in the given Waits until all background activity of the given types has ceased in the given
pool. pool.
The activity could cease because it has completed, or because it has been The activity could cease because it has completed, or because it has been
@ -65,16 +57,26 @@ immediately.
These are the possible values for These are the possible values for
.Ar activity , .Ar activity ,
along with what each one waits for: along with what each one waits for:
.Bd -literal .Bl -tag -compact -offset Ds -width "initialize"
discard Checkpoint to be discarded .It Sy discard
free 'freeing' property to become 0 Checkpoint to be discarded
initialize All initializations to cease .It Sy free
replace All device replacements to cease .Sy freeing
remove Device removal to cease property to become
resilver Resilver to cease .Sy 0
scrub Scrub to cease .It Sy initialize
trim Manual trim to cease All initializations to cease
.Ed .It Sy replace
All device replacements to cease
.It Sy remove
Device removal to cease
.It Sy resilver
Resilver to cease
.It Sy scrub
Scrub to cease
.It Sy trim
Manual trim to cease
.El
.Pp .Pp
If an If an
.Ar interval .Ar interval
@ -102,13 +104,13 @@ for standard date format.
See See
.Xr date 1 . .Xr date 1 .
.El .El
.El .
.Sh SEE ALSO .Sh SEE ALSO
.Xr zpool-status 8 ,
.Xr zpool-checkpoint 8 , .Xr zpool-checkpoint 8 ,
.Xr zpool-initialize 8 , .Xr zpool-initialize 8 ,
.Xr zpool-replace 8 ,
.Xr zpool-remove 8 , .Xr zpool-remove 8 ,
.Xr zpool-replace 8 ,
.Xr zpool-resilver 8 , .Xr zpool-resilver 8 ,
.Xr zpool-scrub 8 , .Xr zpool-scrub 8 ,
.Xr zpool-status 8 ,
.Xr zpool-trim 8 .Xr zpool-trim 8

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
@ -27,9 +26,10 @@
.\" Copyright 2017 Nexenta Systems, Inc. .\" Copyright 2017 Nexenta Systems, Inc.
.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved. .\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
.\" .\"
.Dd August 9, 2019 .Dd June 2, 2021
.Dt ZPOOL 8 .Dt ZPOOL 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zpool .Nm zpool
.Nd configure ZFS storage pools .Nd configure ZFS storage pools
@ -39,8 +39,9 @@
.Nm .Nm
.Cm version .Cm version
.Nm .Nm
.Cm <subcommand> .Cm subcommand
.Op Ar <args> .Op Ar argumentss
.
.Sh DESCRIPTION .Sh DESCRIPTION
The The
.Nm .Nm
@ -55,6 +56,7 @@ for information on managing datasets.
For an overview of creating and managing ZFS storage pools see the For an overview of creating and managing ZFS storage pools see the
.Xr zpoolconcepts 8 .Xr zpoolconcepts 8
manual page. manual page.
.
.Sh SUBCOMMANDS .Sh SUBCOMMANDS
All subcommands that modify state are logged persistently to the pool in their All subcommands that modify state are logged persistently to the pool in their
original form. original form.
@ -67,24 +69,22 @@ The following subcommands are supported:
.Bl -tag -width Ds .Bl -tag -width Ds
.It Xo .It Xo
.Nm .Nm
.Fl ? .Fl ?\&
.Xc .Xc
Displays a help message. Displays a help message.
.It Xo .It Xo
.Nm .Nm
.Fl V, -version .Fl V , -version
.Xc .Xc
An alias for the
.Nm zpool Cm version
subcommand.
.It Xo .It Xo
.Nm .Nm
.Cm version .Cm version
.Xc .Xc
Displays the software version of the Displays the software version of the
.Nm .Nm
userland utility and the zfs kernel module. userland utility and the ZFS kernel module.
.El .El
.
.Ss Creation .Ss Creation
.Bl -tag -width Ds .Bl -tag -width Ds
.It Xr zpool-create 8 .It Xr zpool-create 8
@ -95,6 +95,7 @@ Begins initializing by writing to all unallocated regions on the specified
devices, or all eligible devices in the pool if no individual devices are devices, or all eligible devices in the pool if no individual devices are
specified. specified.
.El .El
.
.Ss Destruction .Ss Destruction
.Bl -tag -width Ds .Bl -tag -width Ds
.It Xr zpool-destroy 8 .It Xr zpool-destroy 8
@ -103,18 +104,17 @@ Destroys the given pool, freeing up any devices for other use.
Removes ZFS label information from the specified Removes ZFS label information from the specified
.Ar device . .Ar device .
.El .El
.
.Ss Virtual Devices .Ss Virtual Devices
.Bl -tag -width Ds .Bl -tag -width Ds
.It Xo .It Xo
.Xr zpool-attach 8 / .Xr zpool-attach 8 Ns / Ns Xr zpool-detach 8
.Xr zpool-detach 8
.Xc .Xc
Increases or decreases redundancy by Increases or decreases redundancy by
.Cm attach Ns -ing or .Cm attach Ns ing or
.Cm detach Ns -ing a device on an existing vdev (virtual device). .Cm detach Ns ing a device on an existing vdev (virtual device).
.It Xo .It Xo
.Xr zpool-add 8 / .Xr zpool-add 8 Ns / Ns Xr zpool-remove 8
.Xr zpool-remove 8
.Xc .Xc
Adds the specified virtual devices to the given pool, Adds the specified virtual devices to the given pool,
or removes the specified device from the pool. or removes the specified device from the pool.
@ -123,6 +123,7 @@ Replaces an existing device (which may be faulted) with a new one.
.It Xr zpool-split 8 .It Xr zpool-split 8
Creates a new pool by splitting all mirrors in an existing pool (which decreases its redundancy). Creates a new pool by splitting all mirrors in an existing pool (which decreases its redundancy).
.El .El
.
.Ss Properties .Ss Properties
Available pool properties listed in the Available pool properties listed in the
.Xr zpoolprops 8 .Xr zpoolprops 8
@ -131,8 +132,7 @@ manual page.
.It Xr zpool-list 8 .It Xr zpool-list 8
Lists the given pools along with a health status and space usage. Lists the given pools along with a health status and space usage.
.It Xo .It Xo
.Xr zpool-get 8 / .Xr zpool-get 8 Ns / Ns Xr zpool-set 8
.Xr zpool-set 8
.Xc .Xc
Retrieves the given list of properties Retrieves the given list of properties
.Po .Po
@ -142,6 +142,7 @@ is used
.Pc .Pc
for the specified storage pool(s). for the specified storage pool(s).
.El .El
.
.Ss Monitoring .Ss Monitoring
.Bl -tag -width Ds .Bl -tag -width Ds
.It Xr zpool-status 8 .It Xr zpool-status 8
@ -151,11 +152,12 @@ Displays logical I/O statistics for the given pools/vdevs. Physical I/Os may
be observed via be observed via
.Xr iostat 1 . .Xr iostat 1 .
.It Xr zpool-events 8 .It Xr zpool-events 8
Lists all recent events generated by the ZFS kernel modules. These events Lists all recent events generated by the ZFS kernel modules.
are consumed by the These events are consumed by the
.Xr zed 8 .Xr zed 8
and used to automate administrative tasks such as replacing a failed device and used to automate administrative tasks such as replacing a failed device
with a hot spare. For more information about the subclasses and event payloads with a hot spare.
For more information about the subclasses and event payloads
that can be generated see the that can be generated see the
.Xr zfs-events 5 .Xr zfs-events 5
man page. man page.
@ -163,48 +165,51 @@ man page.
Displays the command history of the specified pool(s) or all pools if no pool is Displays the command history of the specified pool(s) or all pools if no pool is
specified. specified.
.El .El
.
.Ss Maintenance .Ss Maintenance
.Bl -tag -width Ds .Bl -tag -width Ds
.It Xr zpool-scrub 8 .It Xr zpool-scrub 8
Begins a scrub or resumes a paused scrub. Begins a scrub or resumes a paused scrub.
.It Xr zpool-checkpoint 8 .It Xr zpool-checkpoint 8
Checkpoints the current state of Checkpoints the current state of
.Ar pool .Ar pool ,
, which can be later restored by which can be later restored by
.Nm zpool Cm import --rewind-to-checkpoint . .Nm zpool Cm import Fl -rewind-to-checkpoint .
.It Xr zpool-trim 8 .It Xr zpool-trim 8
Initiates an immediate on-demand TRIM operation for all of the free space in Initiates an immediate on-demand TRIM operation for all of the free space in a pool.
a pool. This operation informs the underlying storage devices of all blocks This operation informs the underlying storage devices of all blocks
in the pool which are no longer allocated and allows thinly provisioned in the pool which are no longer allocated and allows thinly provisioned
devices to reclaim the space. devices to reclaim the space.
.It Xr zpool-sync 8 .It Xr zpool-sync 8
This command forces all in-core dirty data to be written to the primary This command forces all in-core dirty data to be written to the primary
pool storage and not the ZIL. It will also update administrative pool storage and not the ZIL.
information including quota reporting. Without arguments, It will also update administrative information including quota reporting.
.Sy zpool sync Without arguments,
will sync all pools on the system. Otherwise, it will sync only the .Nm zpool Cm sync
specified pool(s). will sync all pools on the system.
Otherwise, it will sync only the specified pool(s).
.It Xr zpool-upgrade 8 .It Xr zpool-upgrade 8
Manage the on-disk format version of storage pools. Manage the on-disk format version of storage pools.
.It Xr zpool-wait 8 .It Xr zpool-wait 8
Waits until all background activity of the given types has ceased in the given Waits until all background activity of the given types has ceased in the given
pool. pool.
.El .El
.
.Ss Fault Resolution .Ss Fault Resolution
.Bl -tag -width Ds .Bl -tag -width Ds
.It Xo .It Xo
.Xr zpool-offline 8 .Xr zpool-offline 8 Ns / Ns Xr zpool-online 8
.Xr zpool-online 8
.Xc .Xc
Takes the specified physical device offline or brings it online. Takes the specified physical device offline or brings it online.
.It Xr zpool-resilver 8 .It Xr zpool-resilver 8
Starts a resilver. If an existing resilver is already running it will be Starts a resilver.
restarted from the beginning. If an existing resilver is already running it will be restarted from the beginning.
.It Xr zpool-reopen 8 .It Xr zpool-reopen 8
Reopen all the vdevs associated with the pool. Reopen all the vdevs associated with the pool.
.It Xr zpool-clear 8 .It Xr zpool-clear 8
Clears device errors in a pool. Clears device errors in a pool.
.El .El
.
.Ss Import & Export .Ss Import & Export
.Bl -tag -width Ds .Bl -tag -width Ds
.It Xr zpool-import 8 .It Xr zpool-import 8
@ -214,9 +219,10 @@ Exports the given pools from the system.
.It Xr zpool-reguid 8 .It Xr zpool-reguid 8
Generates a new unique identifier for the pool. Generates a new unique identifier for the pool.
.El .El
.
.Sh EXIT STATUS .Sh EXIT STATUS
The following exit values are returned: The following exit values are returned:
.Bl -tag -width Ds .Bl -tag -compact -offset 4n -width "a"
.It Sy 0 .It Sy 0
Successful completion. Successful completion.
.It Sy 1 .It Sy 1
@ -224,74 +230,69 @@ An error occurred.
.It Sy 2 .It Sy 2
Invalid command line options were specified. Invalid command line options were specified.
.El .El
.
.Sh EXAMPLES .Sh EXAMPLES
.Bl -tag -width Ds .Bl -tag -width "Exam"
.It Sy Example 1 No Creating a RAID-Z Storage Pool .It Sy Example 1 : No Creating a RAID-Z Storage Pool
The following command creates a pool with a single raidz root vdev that The following command creates a pool with a single raidz root vdev that
consists of six disks. consists of six disks:
.Bd -literal .Dl # Nm zpool Cm create Ar tank Sy raidz Ar sda sdb sdc sdd sde sdf
# zpool create tank raidz sda sdb sdc sdd sde sdf .
.Ed .It Sy Example 2 : No Creating a Mirrored Storage Pool
.It Sy Example 2 No Creating a Mirrored Storage Pool
The following command creates a pool with two mirrors, where each mirror The following command creates a pool with two mirrors, where each mirror
contains two disks. contains two disks:
.Bd -literal .Dl # Nm zpool Cm create Ar tank Sy mirror Ar sda sdb Sy mirror Ar sdc sdd
# zpool create tank mirror sda sdb mirror sdc sdd .
.Ed .It Sy Example 3 : No Creating a ZFS Storage Pool by Using Partitions
.It Sy Example 3 No Creating a ZFS Storage Pool by Using Partitions The following command creates an unmirrored pool using two disk partitions:
The following command creates an unmirrored pool using two disk partitions. .Dl # Nm zpool Cm create Ar tank sda1 sdb2
.Bd -literal .
# zpool create tank sda1 sdb2 .It Sy Example 4 : No Creating a ZFS Storage Pool by Using Files
.Ed
.It Sy Example 4 No Creating a ZFS Storage Pool by Using Files
The following command creates an unmirrored pool using files. The following command creates an unmirrored pool using files.
While not recommended, a pool based on files can be useful for experimental While not recommended, a pool based on files can be useful for experimental
purposes. purposes.
.Bd -literal .Dl # Nm zpool Cm create Ar tank /path/to/file/a /path/to/file/b
# zpool create tank /path/to/file/a /path/to/file/b .
.Ed .It Sy Example 5 : No Adding a Mirror to a ZFS Storage Pool
.It Sy Example 5 No Adding a Mirror to a ZFS Storage Pool
The following command adds two mirrored disks to the pool The following command adds two mirrored disks to the pool
.Em tank , .Ar tank ,
assuming the pool is already made up of two-way mirrors. assuming the pool is already made up of two-way mirrors.
The additional space is immediately available to any datasets within the pool. The additional space is immediately available to any datasets within the pool.
.Bd -literal .Dl # Nm zpool Cm add Ar tank Sy mirror Ar sda sdb
# zpool add tank mirror sda sdb .
.Ed .It Sy Example 6 : No Listing Available ZFS Storage Pools
.It Sy Example 6 No Listing Available ZFS Storage Pools
The following command lists all available pools on the system. The following command lists all available pools on the system.
In this case, the pool In this case, the pool
.Em zion .Ar zion
is faulted due to a missing device. is faulted due to a missing device.
The results from this command are similar to the following: The results from this command are similar to the following:
.Bd -literal .Bd -literal -compact -offset Ds
# zpool list .No # Nm zpool Cm list
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
rpool 19.9G 8.43G 11.4G - 33% 42% 1.00x ONLINE - rpool 19.9G 8.43G 11.4G - 33% 42% 1.00x ONLINE -
tank 61.5G 20.0G 41.5G - 48% 32% 1.00x ONLINE - tank 61.5G 20.0G 41.5G - 48% 32% 1.00x ONLINE -
zion - - - - - - - FAULTED - zion - - - - - - - FAULTED -
.Ed .Ed
.It Sy Example 7 No Destroying a ZFS Storage Pool .
.It Sy Example 7 : No Destroying a ZFS Storage Pool
The following command destroys the pool The following command destroys the pool
.Em tank .Ar tank
and any datasets contained within. and any datasets contained within:
.Bd -literal .Dl # Nm zpool Cm destroy Fl f Ar tank
# zpool destroy -f tank .
.Ed .It Sy Example 8 : No Exporting a ZFS Storage Pool
.It Sy Example 8 No Exporting a ZFS Storage Pool
The following command exports the devices in pool The following command exports the devices in pool
.Em tank .Ar tank
so that they can be relocated or later imported. so that they can be relocated or later imported:
.Bd -literal .Dl # Nm zpool Cm export Ar tank
# zpool export tank .
.Ed .It Sy Example 9 : No Importing a ZFS Storage Pool
.It Sy Example 9 No Importing a ZFS Storage Pool
The following command displays available pools, and then imports the pool The following command displays available pools, and then imports the pool
.Em tank .Ar tank
for use on the system. for use on the system.
The results from this command are similar to the following: The results from this command are similar to the following:
.Bd -literal .Bd -literal -compact -offset Ds
# zpool import .No # Nm zpool Cm import
pool: tank pool: tank
id: 15451357997522795478 id: 15451357997522795478
state: ONLINE state: ONLINE
@ -303,66 +304,58 @@ config:
sda ONLINE sda ONLINE
sdb ONLINE sdb ONLINE
# zpool import tank .No # Nm zpool Cm import Ar tank
.Ed .Ed
.It Sy Example 10 No Upgrading All ZFS Storage Pools to the Current Version .
.It Sy Example 10 : No Upgrading All ZFS Storage Pools to the Current Version
The following command upgrades all ZFS Storage pools to the current version of The following command upgrades all ZFS Storage pools to the current version of
the software. the software:
.Bd -literal .Bd -literal -compact -offset Ds
# zpool upgrade -a .No # Nm zpool Cm upgrade Fl a
This system is currently running ZFS version 2. This system is currently running ZFS version 2.
.Ed .Ed
.It Sy Example 11 No Managing Hot Spares .
.It Sy Example 11 : No Managing Hot Spares
The following command creates a new pool with an available hot spare: The following command creates a new pool with an available hot spare:
.Bd -literal .Dl # Nm zpool Cm create Ar tank Sy mirror Ar sda sdb Sy spare Ar sdc
# zpool create tank mirror sda sdb spare sdc
.Ed
.Pp .Pp
If one of the disks were to fail, the pool would be reduced to the degraded If one of the disks were to fail, the pool would be reduced to the degraded
state. state.
The failed device can be replaced using the following command: The failed device can be replaced using the following command:
.Bd -literal .Dl # Nm zpool Cm replace Ar tank sda sdd
# zpool replace tank sda sdd
.Ed
.Pp .Pp
Once the data has been resilvered, the spare is automatically removed and is Once the data has been resilvered, the spare is automatically removed and is
made available for use should another device fail. made available for use should another device fail.
The hot spare can be permanently removed from the pool using the following The hot spare can be permanently removed from the pool using the following
command: command:
.Bd -literal .Dl # Nm zpool Cm remove Ar tank sdc
# zpool remove tank sdc .
.Ed .It Sy Example 12 : No Creating a ZFS Pool with Mirrored Separate Intent Logs
.It Sy Example 12 No Creating a ZFS Pool with Mirrored Separate Intent Logs
The following command creates a ZFS storage pool consisting of two, two-way The following command creates a ZFS storage pool consisting of two, two-way
mirrors and mirrored log devices: mirrors and mirrored log devices:
.Bd -literal .Dl # Nm zpool Cm create Ar pool Sy mirror Ar sda sdb Sy mirror Ar sdc sdd Sy log mirror Ar sde sdf
# zpool create pool mirror sda sdb mirror sdc sdd log mirror \\ .
sde sdf .It Sy Example 13 : No Adding Cache Devices to a ZFS Pool
.Ed
.It Sy Example 13 No Adding Cache Devices to a ZFS Pool
The following command adds two disks for use as cache devices to a ZFS storage The following command adds two disks for use as cache devices to a ZFS storage
pool: pool:
.Bd -literal .Dl # Nm zpool Cm add Ar pool Sy cache Ar sdc sdd
# zpool add pool cache sdc sdd
.Ed
.Pp .Pp
Once added, the cache devices gradually fill with content from main memory. Once added, the cache devices gradually fill with content from main memory.
Depending on the size of your cache devices, it could take over an hour for Depending on the size of your cache devices, it could take over an hour for
them to fill. them to fill.
Capacity and reads can be monitored using the Capacity and reads can be monitored using the
.Cm iostat .Cm iostat
option as follows: subcommand as follows:
.Bd -literal .Dl # Nm zpool Cm iostat Fl v Ar pool 5
# zpool iostat -v pool 5 .
.Ed .It Sy Example 14 : No Removing a Mirrored top-level (Log or Data) Device
.It Sy Example 14 No Removing a Mirrored top-level (Log or Data) Device
The following commands remove the mirrored log device The following commands remove the mirrored log device
.Sy mirror-2 .Sy mirror-2
and mirrored top-level data device and mirrored top-level data device
.Sy mirror-1 . .Sy mirror-1 .
.Pp .Pp
Given this configuration: Given this configuration:
.Bd -literal .Bd -literal -compact -offset Ds
pool: tank pool: tank
state: ONLINE state: ONLINE
scrub: none requested scrub: none requested
@ -383,27 +376,22 @@ config:
.Ed .Ed
.Pp .Pp
The command to remove the mirrored log The command to remove the mirrored log
.Sy mirror-2 .Ar mirror-2 No is:
is: .Dl # Nm zpool Cm remove Ar tank mirror-2
.Bd -literal
# zpool remove tank mirror-2
.Ed
.Pp .Pp
The command to remove the mirrored data The command to remove the mirrored data
.Sy mirror-1 .Ar mirror-1 No is:
is: .Dl # Nm zpool Cm remove Ar tank mirror-1
.Bd -literal .
# zpool remove tank mirror-1 .It Sy Example 15 : No Displaying expanded space on a device
.Ed
.It Sy Example 15 No Displaying expanded space on a device
The following command displays the detailed information for the pool The following command displays the detailed information for the pool
.Em data . .Ar data .
This pool is comprised of a single raidz vdev where one of its devices This pool is comprised of a single raidz vdev where one of its devices
increased its capacity by 10GB. increased its capacity by 10GB.
In this example, the pool will not be able to utilize this extra capacity until In this example, the pool will not be able to utilize this extra capacity until
all the devices under the raidz vdev have been expanded. all the devices under the raidz vdev have been expanded.
.Bd -literal .Bd -literal -compact -offset Ds
# zpool list -v data .No # Nm zpool Cm list Fl v Ar data
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
data 23.9G 14.6G 9.30G - 48% 61% 1.00x ONLINE - data 23.9G 14.6G 9.30G - 48% 61% 1.00x ONLINE -
raidz1 23.9G 14.6G 9.30G - 48% raidz1 23.9G 14.6G 9.30G - 48%
@ -411,16 +399,12 @@ data 23.9G 14.6G 9.30G - 48% 61% 1.00x ONLINE -
sdb - - - 10G - sdb - - - 10G -
sdc - - - - - sdc - - - - -
.Ed .Ed
.It Sy Example 16 No Adding output columns .
.It Sy Example 16 : No Adding output columns
Additional columns can be added to the Additional columns can be added to the
.Nm zpool Cm status .Nm zpool Cm status No and Nm zpool Cm iostat No output with Fl c .
and .Bd -literal -compact -offset Ds
.Nm zpool Cm iostat .No # Nm zpool Cm status Fl c Ar vendor , Ns Ar model , Ns Ar size
output with
.Fl c
option.
.Bd -literal
# zpool status -c vendor,model,size
NAME STATE READ WRITE CKSUM vendor model size NAME STATE READ WRITE CKSUM vendor model size
tank ONLINE 0 0 0 tank ONLINE 0 0 0
mirror-0 ONLINE 0 0 0 mirror-0 ONLINE 0 0 0
@ -431,7 +415,7 @@ option.
U13 ONLINE 0 0 0 SEAGATE ST8000NM0075 7.3T U13 ONLINE 0 0 0 SEAGATE ST8000NM0075 7.3T
U14 ONLINE 0 0 0 SEAGATE ST8000NM0075 7.3T U14 ONLINE 0 0 0 SEAGATE ST8000NM0075 7.3T
# zpool iostat -vc size .No # Nm zpool Cm iostat Fl vc Ar size
capacity operations bandwidth capacity operations bandwidth
pool alloc free read write read write size pool alloc free read write read write size
---------- ----- ----- ----- ----- ----- ----- ---- ---------- ----- ----- ----- ----- ----- ----- ----
@ -440,124 +424,104 @@ rpool 14.6G 54.9G 4 55 250K 2.69M
---------- ----- ----- ----- ----- ----- ----- ---- ---------- ----- ----- ----- ----- ----- ----- ----
.Ed .Ed
.El .El
.
.Sh ENVIRONMENT VARIABLES .Sh ENVIRONMENT VARIABLES
.Bl -tag -width "ZFS_ABORT" .Bl -tag -compact -width "ZPOOL_IMPORT_UDEV_TIMEOUT_MS"
.It Ev ZFS_ABORT .It Sy ZFS_ABORT
Cause Cause
.Nm zpool .Nm
to dump core on exit for the purposes of running to dump core on exit for the purposes of running
.Sy ::findleaks . .Sy ::findleaks .
.El .It Sy ZFS_COLOR
.Bl -tag -width "ZFS_COLOR"
.It Ev ZFS_COLOR
Use ANSI color in Use ANSI color in
.Nm zpool status .Nm zpool status
output. output.
.El .It Sy ZPOOL_IMPORT_PATH
.Bl -tag -width "ZPOOL_IMPORT_PATH" The search path for devices or files to use with the pool.
.It Ev ZPOOL_IMPORT_PATH This is a colon-separated list of directories in which
The search path for devices or files to use with the pool. This is a colon-separated list of directories in which .Nm
.Nm zpool
looks for device nodes and files. looks for device nodes and files.
Similar to the Similar to the
.Fl d .Fl d
option in option in
.Nm zpool import . .Nm zpool import .
.El .It Sy ZPOOL_IMPORT_UDEV_TIMEOUT_MS
.Bl -tag -width "ZPOOL_IMPORT_UDEV_TIMEOUT_MS"
.It Ev ZPOOL_IMPORT_UDEV_TIMEOUT_MS
The maximum time in milliseconds that The maximum time in milliseconds that
.Nm zpool import .Nm zpool import
will wait for an expected device to be available. will wait for an expected device to be available.
.El .It Sy ZPOOL_STATUS_NON_NATIVE_ASHIFT_IGNORE
.Bl -tag -width "ZPOOL_STATUS_NON_NATIVE_ASHIFT_IGNORE"
.It Ev ZPOOL_STATUS_NON_NATIVE_ASHIFT_IGNORE
If set, suppress warning about non-native vdev ashift in If set, suppress warning about non-native vdev ashift in
.Nm zpool status . .Nm zpool status .
The value is not used, only the presence or absence of the variable matters. The value is not used, only the presence or absence of the variable matters.
.El .It Sy ZPOOL_VDEV_NAME_GUID
.Bl -tag -width "ZPOOL_VDEV_NAME_GUID"
.It Ev ZPOOL_VDEV_NAME_GUID
Cause Cause
.Nm zpool .Nm
subcommands to output vdev guids by default. This behavior is identical to the subcommands to output vdev guids by default.
This behavior is identical to the
.Nm zpool Cm status Fl g .Nm zpool Cm status Fl g
command line option. command line option.
.El .It Sy ZPOOL_VDEV_NAME_FOLLOW_LINKS
.Bl -tag -width "ZPOOL_VDEV_NAME_FOLLOW_LINKS"
.It Ev ZPOOL_VDEV_NAME_FOLLOW_LINKS
Cause Cause
.Nm zpool .Nm
subcommands to follow links for vdev names by default. This behavior is identical to the subcommands to follow links for vdev names by default.
This behavior is identical to the
.Nm zpool Cm status Fl L .Nm zpool Cm status Fl L
command line option. command line option.
.El .It Sy ZPOOL_VDEV_NAME_PATH
.Bl -tag -width "ZPOOL_VDEV_NAME_PATH"
.It Ev ZPOOL_VDEV_NAME_PATH
Cause Cause
.Nm zpool .Nm
subcommands to output full vdev path names by default. This subcommands to output full vdev path names by default.
behavior is identical to the This behavior is identical to the
.Nm zpool Cm status Fl P .Nm zpool Cm status Fl P
command line option. command line option.
.El .It Sy ZFS_VDEV_DEVID_OPT_OUT
.Bl -tag -width "ZFS_VDEV_DEVID_OPT_OUT"
.It Ev ZFS_VDEV_DEVID_OPT_OUT
Older OpenZFS implementations had issues when attempting to display pool Older OpenZFS implementations had issues when attempting to display pool
config VDEV names if a config VDEV names if a
.Sy devid .Sy devid
NVP value is present in the pool's config. NVP value is present in the pool's config.
.Pp .Pp
For example, a pool that originated on illumos platform would have a devid For example, a pool that originated on illumos platform would have a
.Sy devid
value in the config and value in the config and
.Nm zpool status .Nm zpool status
would fail when listing the config. would fail when listing the config.
This would also be true for future Linux based pools. This would also be true for future Linux-based pools.
.Pp .Pp
A pool can be stripped of any A pool can be stripped of any
.Sy devid .Sy devid
values on import or prevented from adding values on import or prevented from adding
them on them on
.Nm zpool create .Nm zpool Cm create
or or
.Nm zpool add .Nm zpool Cm add
by setting by setting
.Sy ZFS_VDEV_DEVID_OPT_OUT . .Sy ZFS_VDEV_DEVID_OPT_OUT .
.El .Pp
.Bl -tag -width "ZPOOL_SCRIPTS_AS_ROOT" .It Sy ZPOOL_SCRIPTS_AS_ROOT
.It Ev ZPOOL_SCRIPTS_AS_ROOT Allow a privileged user to run
Allow a privileged user to run the .Nm zpool status/iostat Fl c .
.Nm zpool status/iostat Normally, only unprivileged users are allowed to run
with the
.Fl c
option. Normally, only unprivileged users are allowed to run
.Fl c . .Fl c .
.El .It Sy ZPOOL_SCRIPTS_PATH
.Bl -tag -width "ZPOOL_SCRIPTS_PATH"
.It Ev ZPOOL_SCRIPTS_PATH
The search path for scripts when running The search path for scripts when running
.Nm zpool status/iostat .Nm zpool status/iostat Fl c .
with the This is a colon-separated list of directories and overrides the default
.Fl c
option. This is a colon-separated list of directories and overrides the default
.Pa ~/.zpool.d .Pa ~/.zpool.d
and and
.Pa /etc/zfs/zpool.d .Pa /etc/zfs/zpool.d
search paths. search paths.
.El .It Sy ZPOOL_SCRIPTS_ENABLED
.Bl -tag -width "ZPOOL_SCRIPTS_ENABLED"
.It Ev ZPOOL_SCRIPTS_ENABLED
Allow a user to run Allow a user to run
.Nm zpool status/iostat .Nm zpool status/iostat Fl c .
with the If
.Fl c
option. If
.Sy ZPOOL_SCRIPTS_ENABLED .Sy ZPOOL_SCRIPTS_ENABLED
is not set, it is assumed that the user is allowed to run is not set, it is assumed that the user is allowed to run
.Nm zpool Cm status/iostat Fl c . .Nm zpool Cm status Ns / Ns Cm iostat Fl c .
.El .El
.
.Sh INTERFACE STABILITY .Sh INTERFACE STABILITY
.Sy Evolving .Sy Evolving
.
.Sh SEE ALSO .Sh SEE ALSO
.Xr zfs-events 5 , .Xr zfs-events 5 ,
.Xr zfs-module-parameters 5 , .Xr zfs-module-parameters 5 ,

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
@ -27,18 +26,20 @@
.\" Copyright 2017 Nexenta Systems, Inc. .\" Copyright 2017 Nexenta Systems, Inc.
.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved. .\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
.\" .\"
.Dd August 9, 2019 .Dd June 2, 2021
.Dt ZPOOLCONCEPTS 8 .Dt ZPOOLCONCEPTS 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zpoolconcepts .Nm zpoolconcepts
.Nd overview of ZFS storage pools .Nd overview of ZFS storage pools
.
.Sh DESCRIPTION .Sh DESCRIPTION
.Ss Virtual Devices (vdevs) .Ss Virtual Devices (vdevs)
A "virtual device" describes a single device or a collection of devices A "virtual device" describes a single device or a collection of devices
organized according to certain performance and fault characteristics. organized according to certain performance and fault characteristics.
The following virtual devices are supported: The following virtual devices are supported:
.Bl -tag -width Ds .Bl -tag -width "special"
.It Sy disk .It Sy disk
A block device, typically located under A block device, typically located under
.Pa /dev . .Pa /dev .
@ -58,13 +59,14 @@ When given a whole disk, ZFS automatically labels the disk, if necessary.
A regular file. A regular file.
The use of files as a backing store is strongly discouraged. The use of files as a backing store is strongly discouraged.
It is designed primarily for experimental purposes, as the fault tolerance of a It is designed primarily for experimental purposes, as the fault tolerance of a
file is only as good as the file system of which it is a part. file is only as good as the file system on which it resides.
A file must be specified by a full path. A file must be specified by a full path.
.It Sy mirror .It Sy mirror
A mirror of two or more devices. A mirror of two or more devices.
Data is replicated in an identical fashion across all components of a mirror. Data is replicated in an identical fashion across all components of a mirror.
A mirror with N disks of size X can hold X bytes and can withstand (N-1) devices A mirror with
failing without losing data. .Em N No disks of size Em X No can hold Em X No bytes and can withstand Em N-1
devices failing without losing data.
.It Sy raidz , raidz1 , raidz2 , raidz3 .It Sy raidz , raidz1 , raidz2 , raidz3
A variation on RAID-5 that allows for better distribution of parity and A variation on RAID-5 that allows for better distribution of parity and
eliminates the RAID-5 eliminates the RAID-5
@ -72,7 +74,7 @@ eliminates the RAID-5
.Pq in which data and parity become inconsistent after a power loss . .Pq in which data and parity become inconsistent after a power loss .
Data and parity is striped across all disks within a raidz group. Data and parity is striped across all disks within a raidz group.
.Pp .Pp
A raidz group can have single-, double-, or triple-parity, meaning that the A raidz group can have single, double, or triple parity, meaning that the
raidz group can sustain one, two, or three failures, respectively, without raidz group can sustain one, two, or three failures, respectively, without
losing any data. losing any data.
The The
@ -87,39 +89,42 @@ The
vdev type is an alias for vdev type is an alias for
.Sy raidz1 . .Sy raidz1 .
.Pp .Pp
A raidz group with N disks of size X with P parity disks can hold approximately A raidz group with
(N-P)*X bytes and can withstand P device(s) failing without losing data. .Em N No disks of size Em X No with Em P No parity disks can hold approximately
.Em (N-P)*X No bytes and can withstand Em P No devices failing without losing data.
The minimum number of devices in a raidz group is one more than the number of The minimum number of devices in a raidz group is one more than the number of
parity disks. parity disks.
The recommended number is between 3 and 9 to help increase performance. The recommended number is between 3 and 9 to help increase performance.
.It Sy draid , draid1 , draid2 , draid3 .It Sy draid , draid1 , draid2 , draid3
A variant of raidz that provides integrated distributed hot spares which A variant of raidz that provides integrated distributed hot spares which
allows for faster resilvering while retaining the benefits of raidz. allows for faster resilvering while retaining the benefits of raidz.
A dRAID vdev is constructed from multiple internal raidz groups, each with D A dRAID vdev is constructed from multiple internal raidz groups, each with
data devices and P parity devices. .Em D No data devices and Em P No parity devices.
These groups are distributed over all of the children in order to fully These groups are distributed over all of the children in order to fully
utilize the available disk performance. utilize the available disk performance.
.Pp .Pp
Unlike raidz, dRAID uses a fixed stripe width (padding as necessary with Unlike raidz, dRAID uses a fixed stripe width (padding as necessary with
zeros) to allow fully sequential resilvering. zeros) to allow fully sequential resilvering.
This fixed stripe width significantly effects both usable capacity and IOPS. This fixed stripe width significantly effects both usable capacity and IOPS.
For example, with the default D=8 and 4k disk sectors the minimum allocation For example, with the default
size is 32k. .Em D=8 No and Em 4kB No disk sectors the minimum allocation size is Em 32kB .
If using compression, this relatively large allocation size can reduce the If using compression, this relatively large allocation size can reduce the
effective compression ratio. effective compression ratio.
When using ZFS volumes and dRAID the default volblocksize property is increased When using ZFS volumes and dRAID, the default of the
to account for the allocation size. .Sy volblocksize
property is increased to account for the allocation size.
If a dRAID pool will hold a significant amount of small blocks, it is If a dRAID pool will hold a significant amount of small blocks, it is
recommended to also add a mirrored recommended to also add a mirrored
.Sy special .Sy special
vdev to store those blocks. vdev to store those blocks.
.Pp .Pp
In regards to IO/s, performance is similar to raidz since for any read all D In regards to I/O, performance is similar to raidz since for any read all
data disks must be accessed. .Em D No data disks must be accessed.
Delivered random IOPS can be reasonably approximated as Delivered random IOPS can be reasonably approximated as
floor((N-S)/(D+P))*<single-drive-IOPS>. .Sy floor((N-S)/(D+P))*single_drive_IOPS .
.Pp .Pp
Like raidz a dRAID can have single-, double-, or triple-parity. The Like raidzm a dRAID can have single-, double-, or triple-parity.
The
.Sy draid1 , .Sy draid1 ,
.Sy draid2 , .Sy draid2 ,
and and
@ -130,33 +135,34 @@ The
vdev type is an alias for vdev type is an alias for
.Sy draid1 . .Sy draid1 .
.Pp .Pp
A dRAID with N disks of size X, D data disks per redundancy group, P parity A dRAID with
level, and S distributed hot spares can hold approximately (N-S)*(D/(D+P))*X .Em N No disks of size Em X , D No data disks per redundancy group, Em P
bytes and can withstand P device(s) failing without losing data. .No parity level, and Em S No distributed hot spares can hold approximately
.It Sy draid[<parity>][:<data>d][:<children>c][:<spares>s] .Em (N-S)*(D/(D+P))*X No bytes and can withstand Em P
devices failing without losing data.
.It Sy draid Ns Oo Ar parity Oc Ns Oo Sy \&: Ns Ar data Ns Sy d Oc Ns Oo Sy \&: Ns Ar children Ns Sy c Oc Ns Oo Sy \&: Ns Ar spares Ns Sy s Oc
A non-default dRAID configuration can be specified by appending one or more A non-default dRAID configuration can be specified by appending one or more
of the following optional arguments to the of the following optional arguments to the
.Sy draid .Sy draid
keyword. keyword:
.Pp .Bl -tag -compact -width "children"
.Em parity .It Ar parity
- The parity level (1-3). The parity level (1-3).
.Pp .It Ar data
.Em data The number of data devices per redundancy group.
- The number of data devices per redundancy group. In general, a smaller value of
In general a smaller value of D will increase IOPS, improve the compression ratio, and speed up resilvering at the expense of total usable capacity. .Em D No will increase IOPS, improve the compression ratio,
Defaults to 8, unless N-P-S is less than 8. and speed up resilvering at the expense of total usable capacity.
.Pp Defaults to
.Em children .Em 8 , No unless Em N-P-S No is less than Em 8 .
- The expected number of children. .It Ar children
The expected number of children.
Useful as a cross-check when listing a large number of devices. Useful as a cross-check when listing a large number of devices.
An error is returned when the provided number of children differs. An error is returned when the provided number of children differs.
.Pp .It Ar spares
.Em spares The number of distributed hot spares.
- The number of distributed hot spares.
Defaults to zero. Defaults to zero.
.Pp .El
.Pp
.It Sy spare .It Sy spare
A pseudo-vdev which keeps track of available hot spares for a pool. A pseudo-vdev which keeps track of available hot spares for a pool.
For more information, see the For more information, see the
@ -174,13 +180,15 @@ section.
.It Sy dedup .It Sy dedup
A device dedicated solely for deduplication tables. A device dedicated solely for deduplication tables.
The redundancy of this device should match the redundancy of the other normal The redundancy of this device should match the redundancy of the other normal
devices in the pool. If more than one dedup device is specified, then devices in the pool.
If more than one dedup device is specified, then
allocations are load-balanced between those devices. allocations are load-balanced between those devices.
.It Sy special .It Sy special
A device dedicated solely for allocating various kinds of internal metadata, A device dedicated solely for allocating various kinds of internal metadata,
and optionally small file blocks. and optionally small file blocks.
The redundancy of this device should match the redundancy of the other normal The redundancy of this device should match the redundancy of the other normal
devices in the pool. If more than one special device is specified, then devices in the pool.
If more than one special device is specified, then
allocations are load-balanced between those devices. allocations are load-balanced between those devices.
.Pp .Pp
For more information on special allocations, see the For more information on special allocations, see the
@ -209,17 +217,15 @@ among devices.
As new virtual devices are added, ZFS automatically places data on the newly As new virtual devices are added, ZFS automatically places data on the newly
available devices. available devices.
.Pp .Pp
Virtual devices are specified one at a time on the command line, separated by Virtual devices are specified one at a time on the command line,
whitespace. separated by whitespace.
The keywords Keywords like
.Sy mirror .Sy mirror No and Sy raidz
and
.Sy raidz
are used to distinguish where a group ends and another begins. are used to distinguish where a group ends and another begins.
For example, the following creates two root vdevs, each a mirror of two disks: For example, the following creates a pool with two root vdevs,
.Bd -literal each a mirror of two disks:
# zpool create mypool mirror sda sdb mirror sdc sdd .Dl # Nm zpool Cm create Ar mypool Sy mirror Ar sda sdb Sy mirror Ar sdc sdd
.Ed .
.Ss Device Failure and Recovery .Ss Device Failure and Recovery
ZFS supports a rich set of mechanisms for handling device failure and data ZFS supports a rich set of mechanisms for handling device failure and data
corruption. corruption.
@ -232,17 +238,17 @@ While ZFS supports running in a non-redundant configuration, where each root
vdev is simply a disk or file, this is strongly discouraged. vdev is simply a disk or file, this is strongly discouraged.
A single case of bit corruption can render some or all of your data unavailable. A single case of bit corruption can render some or all of your data unavailable.
.Pp .Pp
A pool's health status is described by one of three states: online, degraded, A pool's health status is described by one of three states:
or faulted. .Sy online , degraded , No or Sy faulted .
An online pool has all devices operating normally. An online pool has all devices operating normally.
A degraded pool is one in which one or more devices have failed, but the data is A degraded pool is one in which one or more devices have failed, but the data is
still available due to a redundant configuration. still available due to a redundant configuration.
A faulted pool has corrupted metadata, or one or more faulted devices, and A faulted pool has corrupted metadata, or one or more faulted devices, and
insufficient replicas to continue functioning. insufficient replicas to continue functioning.
.Pp .Pp
The health of the top-level vdev, such as mirror or raidz device, is The health of the top-level vdev, such as a mirror or raidz device,
potentially impacted by the state of its associated vdevs, or component is potentially impacted by the state of its associated vdevs,
devices. or component devices.
A top-level vdev or component device is in one of the following states: A top-level vdev or component device is in one of the following states:
.Bl -tag -width "DEGRADED" .Bl -tag -width "DEGRADED"
.It Sy DEGRADED .It Sy DEGRADED
@ -253,7 +259,7 @@ Sufficient replicas exist to continue functioning.
One or more component devices is in the degraded or faulted state, but One or more component devices is in the degraded or faulted state, but
sufficient replicas exist to continue functioning. sufficient replicas exist to continue functioning.
The underlying conditions are as follows: The underlying conditions are as follows:
.Bl -bullet .Bl -bullet -compact
.It .It
The number of checksum errors exceeds acceptable levels and the device is The number of checksum errors exceeds acceptable levels and the device is
degraded as an indication that something may be wrong. degraded as an indication that something may be wrong.
@ -271,7 +277,7 @@ Insufficient replicas exist to continue functioning.
One or more component devices is in the faulted state, and insufficient One or more component devices is in the faulted state, and insufficient
replicas exist to continue functioning. replicas exist to continue functioning.
The underlying conditions are as follows: The underlying conditions are as follows:
.Bl -bullet .Bl -bullet -compact
.It .It
The device could be opened, but the contents did not match expected values. The device could be opened, but the contents did not match expected values.
.It .It
@ -303,19 +309,20 @@ The checksum errors are reported in
and and
.Nm zpool Cm events . .Nm zpool Cm events .
When a block is stored redundantly, a damaged block may be reconstructed When a block is stored redundantly, a damaged block may be reconstructed
(e.g. from RAIDZ parity or a mirrored copy). (e.g. from raidz parity or a mirrored copy).
In this case, ZFS reports the checksum error against the disks that contained In this case, ZFS reports the checksum error against the disks that contained
damaged data. damaged data.
If a block is unable to be reconstructed (e.g. due to 3 disks being damaged If a block is unable to be reconstructed (e.g. due to 3 disks being damaged
in a RAIDZ2 group), it is not possible to determine which disks were silently in a raidz2 group), it is not possible to determine which disks were silently
corrupted. corrupted.
In this case, checksum errors are reported for all disks on which the block In this case, checksum errors are reported for all disks on which the block
is stored. is stored.
.Pp .Pp
If a device is removed and later re-attached to the system, ZFS attempts If a device is removed and later re-attached to the system,
to put the device online automatically. ZFS attempts online the device automatically.
Device attach detection is hardware-dependent and might not be supported on all Device attachment detection is hardware-dependent
platforms. and might not be supported on all platforms.
.
.Ss Hot Spares .Ss Hot Spares
ZFS allows devices to be associated with pools as ZFS allows devices to be associated with pools as
.Qq hot spares . .Qq hot spares .
@ -325,9 +332,7 @@ To create a pool with hot spares, specify a
.Sy spare .Sy spare
vdev with any number of devices. vdev with any number of devices.
For example, For example,
.Bd -literal .Dl # Nm zpool Cm create Ar pool Sy mirror Ar sda sdb Sy spare Ar sdc sdd
# zpool create pool mirror sda sdb spare sdc sdd
.Ed
.Pp .Pp
Spares can be shared across multiple pools, and can be added with the Spares can be shared across multiple pools, and can be added with the
.Nm zpool Cm add .Nm zpool Cm add
@ -344,10 +349,11 @@ If a pool has a shared spare that is currently being used, the pool can not be
exported since other pools may use this shared spare, which may lead to exported since other pools may use this shared spare, which may lead to
potential data corruption. potential data corruption.
.Pp .Pp
Shared spares add some risk. If the pools are imported on different hosts, and Shared spares add some risk.
both pools suffer a device failure at the same time, both could attempt to use If the pools are imported on different hosts,
the spare at the same time. This may not be detected, resulting in data and both pools suffer a device failure at the same time,
corruption. both could attempt to use the spare at the same time.
This may not be detected, resulting in data corruption.
.Pp .Pp
An in-progress spare replacement can be cancelled by detaching the hot spare. An in-progress spare replacement can be cancelled by detaching the hot spare.
If the original faulted device is detached, then the hot spare assumes its If the original faulted device is detached, then the hot spare assumes its
@ -357,12 +363,14 @@ pools.
The The
.Sy draid .Sy draid
vdev type provides distributed hot spares. vdev type provides distributed hot spares.
These hot spares are named after the dRAID vdev they're a part of ( These hot spares are named after the dRAID vdev they're a part of
.Qq draid1-2-3 specifies spare 3 of vdev 2, which is a single parity dRAID .Po Sy draid1 Ns - Ns Ar 2 Ns - Ns Ar 3 No specifies spare Ar 3 No of vdev Ar 2 ,
) and may only be used by that dRAID vdev. .No which is a single parity dRAID Pc
and may only be used by that dRAID vdev.
Otherwise, they behave the same as normal hot spares. Otherwise, they behave the same as normal hot spares.
.Pp .Pp
Spares cannot replace log devices. Spares cannot replace log devices.
.
.Ss Intent Log .Ss Intent Log
The ZFS Intent Log (ZIL) satisfies POSIX requirements for synchronous The ZFS Intent Log (ZIL) satisfies POSIX requirements for synchronous
transactions. transactions.
@ -375,26 +383,25 @@ By default, the intent log is allocated from blocks within the main pool.
However, it might be possible to get better performance using separate intent However, it might be possible to get better performance using separate intent
log devices such as NVRAM or a dedicated disk. log devices such as NVRAM or a dedicated disk.
For example: For example:
.Bd -literal .Dl # Nm zpool Cm create Ar pool sda sdb Sy log Ar sdc
# zpool create pool sda sdb log sdc
.Ed
.Pp .Pp
Multiple log devices can also be specified, and they can be mirrored. Multiple log devices can also be specified, and they can be mirrored.
See the See the
.Sx EXAMPLES .Sx EXAMPLES
section for an example of mirroring multiple log devices. section for an example of mirroring multiple log devices.
.Pp .Pp
Log devices can be added, replaced, attached, detached and removed. In Log devices can be added, replaced, attached, detached and removed.
addition, log devices are imported and exported as part of the pool In addition, log devices are imported and exported as part of the pool
that contains them. that contains them.
Mirrored devices can be removed by specifying the top-level mirror vdev. Mirrored devices can be removed by specifying the top-level mirror vdev.
.
.Ss Cache Devices .Ss Cache Devices
Devices can be added to a storage pool as Devices can be added to a storage pool as
.Qq cache devices . .Qq cache devices .
These devices provide an additional layer of caching between main memory and These devices provide an additional layer of caching between main memory and
disk. disk.
For read-heavy workloads, where the working set size is much larger than what For read-heavy workloads, where the working set size is much larger than what
can be cached in main memory, using cache devices allow much more of this can be cached in main memory, using cache devices allows much more of this
working set to be served from low latency media. working set to be served from low latency media.
Using cache devices provides the greatest performance improvement for random Using cache devices provides the greatest performance improvement for random
read-workloads of mostly static content. read-workloads of mostly static content.
@ -403,9 +410,7 @@ To create a pool with cache devices, specify a
.Sy cache .Sy cache
vdev with any number of devices. vdev with any number of devices.
For example: For example:
.Bd -literal .Dl # Nm zpool Cm create Ar pool sda sdb Sy cache Ar sdc sdd
# zpool create pool sda sdb cache sdc sdd
.Ed
.Pp .Pp
Cache devices cannot be mirrored or part of a raidz configuration. Cache devices cannot be mirrored or part of a raidz configuration.
If a read error is encountered on a cache device, that read I/O is reissued to If a read error is encountered on a cache device, that read I/O is reissued to
@ -415,29 +420,36 @@ configuration.
The content of the cache devices is persistent across reboots and restored The content of the cache devices is persistent across reboots and restored
asynchronously when importing the pool in L2ARC (persistent L2ARC). asynchronously when importing the pool in L2ARC (persistent L2ARC).
This can be disabled by setting This can be disabled by setting
.Sy l2arc_rebuild_enabled = 0 . .Sy l2arc_rebuild_enabled Ns = Ns Sy 0 .
For cache devices smaller than 1GB we do not write the metadata structures For cache devices smaller than
required for rebuilding the L2ARC in order not to waste space. This can be .Em 1GB ,
changed with we do not write the metadata structures
required for rebuilding the L2ARC in order not to waste space.
This can be changed with
.Sy l2arc_rebuild_blocks_min_l2size . .Sy l2arc_rebuild_blocks_min_l2size .
The cache device header (512 bytes) is updated even if no metadata structures The cache device header
are written. Setting .Pq Em 512B
.Sy l2arc_headroom = 0 is updated even if no metadata structures are written.
Setting
.Sy l2arc_headroom Ns = Ns Sy 0
will result in scanning the full-length ARC lists for cacheable content to be will result in scanning the full-length ARC lists for cacheable content to be
written in L2ARC (persistent ARC). If a cache device is added with written in L2ARC (persistent ARC).
If a cache device is added with
.Nm zpool Cm add .Nm zpool Cm add
its label and header will be overwritten and its contents are not going to be its label and header will be overwritten and its contents are not going to be
restored in L2ARC, even if the device was previously part of the pool. If a restored in L2ARC, even if the device was previously part of the pool.
cache device is onlined with If a cache device is onlined with
.Nm zpool Cm online .Nm zpool Cm online
its contents will be restored in L2ARC. This is useful in case of memory pressure its contents will be restored in L2ARC.
This is useful in case of memory pressure
where the contents of the cache device are not fully restored in L2ARC. where the contents of the cache device are not fully restored in L2ARC.
The user can off/online the cache device when there is less memory pressure The user can off- and online the cache device when there is less memory pressure
in order to fully restore its contents to L2ARC. in order to fully restore its contents to L2ARC.
.
.Ss Pool checkpoint .Ss Pool checkpoint
Before starting critical procedures that include destructive actions (e.g Before starting critical procedures that include destructive actions
.Nm zfs Cm destroy .Pq like Nm zfs Cm destroy ,
), an administrator can checkpoint the pool's state and in the case of a an administrator can checkpoint the pool's state and in the case of a
mistake or failure, rewind the entire pool back to the checkpoint. mistake or failure, rewind the entire pool back to the checkpoint.
Otherwise, the checkpoint can be discarded when the procedure has completed Otherwise, the checkpoint can be discarded when the procedure has completed
successfully. successfully.
@ -445,59 +457,56 @@ successfully.
A pool checkpoint can be thought of as a pool-wide snapshot and should be used A pool checkpoint can be thought of as a pool-wide snapshot and should be used
with care as it contains every part of the pool's state, from properties to vdev with care as it contains every part of the pool's state, from properties to vdev
configuration. configuration.
Thus, while a pool has a checkpoint certain operations are not allowed. Thus, certain operations are not allowed while a pool has a checkpoint.
Specifically, vdev removal/attach/detach, mirror splitting, and Specifically, vdev removal/attach/detach, mirror splitting, and
changing the pool's guid. changing the pool's GUID.
Adding a new vdev is supported but in the case of a rewind it will have to be Adding a new vdev is supported, but in the case of a rewind it will have to be
added again. added again.
Finally, users of this feature should keep in mind that scrubs in a pool that Finally, users of this feature should keep in mind that scrubs in a pool that
has a checkpoint do not repair checkpointed data. has a checkpoint do not repair checkpointed data.
.Pp .Pp
To create a checkpoint for a pool: To create a checkpoint for a pool:
.Bd -literal .Dl # Nm zpool Cm checkpoint Ar pool
# zpool checkpoint pool
.Ed
.Pp .Pp
To later rewind to its checkpointed state, you need to first export it and To later rewind to its checkpointed state, you need to first export it and
then rewind it during import: then rewind it during import:
.Bd -literal .Dl # Nm zpool Cm export Ar pool
# zpool export pool .Dl # Nm zpool Cm import Fl -rewind-to-checkpoint Ar pool
# zpool import --rewind-to-checkpoint pool
.Ed
.Pp .Pp
To discard the checkpoint from a pool: To discard the checkpoint from a pool:
.Bd -literal .Dl # Nm zpool Cm checkpoint Fl d Ar pool
# zpool checkpoint -d pool
.Ed
.Pp .Pp
Dataset reservations (controlled by the Dataset reservations (controlled by the
.Nm reservation .Sy reservation No and Sy refreservation
or properties) may be unenforceable while a checkpoint exists, because the
.Nm refreservation
zfs properties) may be unenforceable while a checkpoint exists, because the
checkpoint is allowed to consume the dataset's reservation. checkpoint is allowed to consume the dataset's reservation.
Finally, data that is part of the checkpoint but has been freed in the Finally, data that is part of the checkpoint but has been freed in the
current state of the pool won't be scanned during a scrub. current state of the pool won't be scanned during a scrub.
.
.Ss Special Allocation Class .Ss Special Allocation Class
The allocations in the special class are dedicated to specific block types. Allocations in the special class are dedicated to specific block types.
By default this includes all metadata, the indirect blocks of user data, and By default this includes all metadata, the indirect blocks of user data, and
any deduplication tables. The class can also be provisioned to accept any deduplication tables.
small file blocks. The class can also be provisioned to accept small file blocks.
.Pp .Pp
A pool must always have at least one normal (non-dedup/special) vdev before A pool must always have at least one normal
other devices can be assigned to the special class. If the special class .Pq non- Ns Sy dedup Ns /- Ns Sy special
becomes full, then allocations intended for it will spill back into the vdev before
normal class. other devices can be assigned to the special class.
If the
.Sy special
class becomes full, then allocations intended for it
will spill back into the normal class.
.Pp .Pp
Deduplication tables can be excluded from the special class by setting the Deduplication tables can be excluded from the special class by unsetting the
.Sy zfs_ddt_data_is_special .Sy zfs_ddt_data_is_special
zfs module parameter to false (0). ZFS module parameter.
.Pp .Pp
Inclusion of small file blocks in the special class is opt-in. Each dataset Inclusion of small file blocks in the special class is opt-in.
can control the size of small file blocks allowed in the special class by Each dataset can control the size of small file blocks allowed
setting the in the special class by setting the
.Sy special_small_blocks .Sy special_small_blocks
dataset property. It defaults to zero, so you must opt-in by setting it to a property to nonzero.
non-zero value. See See
.Xr zfs 8 .Xr zfsprops 8
for more info on setting this property. for more info on this property.

View File

@ -18,7 +18,6 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved. .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved. .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved. .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
@ -28,19 +27,21 @@
.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved. .\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
.\" Copyright (c) 2021, Colm Buckley <colm@tuatha.org> .\" Copyright (c) 2021, Colm Buckley <colm@tuatha.org>
.\" .\"
.Dd August 9, 2019 .Dd May 27, 2021
.Dt ZPOOLPROPS 8 .Dt ZPOOLPROPS 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zpoolprops .Nm zpoolprops
.Nd available properties for ZFS storage pools .Nd properties of ZFS storage pools
.
.Sh DESCRIPTION .Sh DESCRIPTION
Each pool has several properties associated with it. Each pool has several properties associated with it.
Some properties are read-only statistics while others are configurable and Some properties are read-only statistics while others are configurable and
change the behavior of the pool. change the behavior of the pool.
.Pp .Pp
The following are read-only properties: The following are read-only properties:
.Bl -tag -width Ds .Bl -tag -width "unsupported@guid"
.It Cm allocated .It Cm allocated
Amount of storage used within the pool. Amount of storage used within the pool.
See See
@ -65,11 +66,13 @@ The space can be claimed for the pool by bringing it online with
or using or using
.Nm zpool Cm online Fl e . .Nm zpool Cm online Fl e .
.It Sy fragmentation .It Sy fragmentation
The amount of fragmentation in the pool. As the amount of space The amount of fragmentation in the pool.
As the amount of space
.Sy allocated .Sy allocated
increases, it becomes more difficult to locate increases, it becomes more difficult to locate
.Sy free .Sy free
space. This may result in lower write performance compared to pools with more space.
This may result in lower write performance compared to pools with more
unfragmented free space. unfragmented free space.
.It Sy free .It Sy free
The amount of free space available in the pool. The amount of free space available in the pool.
@ -81,8 +84,9 @@ The zpool
.Sy free .Sy free
property is not generally useful for this purpose, and can be substantially more than the zfs property is not generally useful for this purpose, and can be substantially more than the zfs
.Sy available .Sy available
space. This discrepancy is due to several factors, including raidz parity; zfs space.
reservation, quota, refreservation, and refquota properties; and space set aside by This discrepancy is due to several factors, including raidz parity;
zfs reservation, quota, refreservation, and refquota properties; and space set aside by
.Sy spa_slop_shift .Sy spa_slop_shift
(see (see
.Xr zfs-module-parameters 5 .Xr zfs-module-parameters 5
@ -107,14 +111,14 @@ A unique identifier for the pool.
A unique identifier for the pool. A unique identifier for the pool.
Unlike the Unlike the
.Sy guid .Sy guid
property, this identifier is generated every time we load the pool (e.g. does property, this identifier is generated every time we load the pool (i.e. does
not persist across imports/exports) and never changes while the pool is loaded not persist across imports/exports) and never changes while the pool is loaded
(even if a (even if a
.Sy reguid .Sy reguid
operation takes place). operation takes place).
.It Sy size .It Sy size
Total size of the storage pool. Total size of the storage pool.
.It Sy unsupported@ Ns Em feature_guid .It Sy unsupported@ Ns Em guid
Information about unsupported features that are enabled on the pool. Information about unsupported features that are enabled on the pool.
See See
.Xr zpool-features 5 .Xr zpool-features 5
@ -176,19 +180,24 @@ Pool sector size exponent, to the power of
.Sy ashift ) . .Sy ashift ) .
Values from 9 to 16, inclusive, are valid; also, the Values from 9 to 16, inclusive, are valid; also, the
value 0 (the default) means to auto-detect using the kernel's block value 0 (the default) means to auto-detect using the kernel's block
layer and a ZFS internal exception list. I/O operations will be aligned layer and a ZFS internal exception list.
to the specified size boundaries. Additionally, the minimum (disk) I/O operations will be aligned to the specified size boundaries.
Additionally, the minimum (disk)
write size will be set to the specified size, so this represents a write size will be set to the specified size, so this represents a
space vs. performance trade-off. For optimal performance, the pool space vs. performance trade-off.
sector size should be greater than or equal to the sector size of the For optimal performance, the pool sector size should be greater than
underlying disks. The typical case for setting this property is when or equal to the sector size of the underlying disks.
The typical case for setting this property is when
performance is important and the underlying disks use 4KiB sectors but performance is important and the underlying disks use 4KiB sectors but
report 512B sectors to the OS (for compatibility reasons); in that report 512B sectors to the OS (for compatibility reasons); in that
case, set case, set
.Sy ashift=12 .Sy ashift Ns = Ns Sy 12
(which is 1<<12 = 4096). When set, this property is (which is
.Sy 1<<12 No = Sy 4096 ) .
When set, this property is
used as the default hint value in subsequent vdev operations (add, used as the default hint value in subsequent vdev operations (add,
attach and replace). Changing this value will not modify any existing attach and replace).
Changing this value will not modify any existing
vdev, not even on disk replacement; however it can be used, for vdev, not even on disk replacement; however it can be used, for
instance, to replace a dying 512B sectors disk with a newer 4KiB instance, to replace a dying 512B sectors disk with a newer 4KiB
sectors device: this will probably result in bad performance but at the sectors device: this will probably result in bad performance but at the
@ -222,40 +231,44 @@ This property can also be referred to by its shortened column name,
.Sy replace . .Sy replace .
Autoreplace can also be used with virtual disks (like device Autoreplace can also be used with virtual disks (like device
mapper) provided that you use the /dev/disk/by-vdev paths setup by mapper) provided that you use the /dev/disk/by-vdev paths setup by
vdev_id.conf. See the vdev_id.conf.
See the
.Xr vdev_id 8 .Xr vdev_id 8
man page for more details. manual page for more details.
Autoreplace and autoonline require the ZFS Event Daemon be configured and Autoreplace and autoonline require the ZFS Event Daemon be configured and
running. See the running.
See the
.Xr zed 8 .Xr zed 8
man page for more details. manual page for more details.
.It Sy autotrim Ns = Ns Sy on Ns | Ns Sy off .It Sy autotrim Ns = Ns Sy on Ns | Ns Sy off
When set to When set to
.Sy on .Sy on
space which has been recently freed, and is no longer allocated by the pool, space which has been recently freed, and is no longer allocated by the pool,
will be periodically trimmed. This allows block device vdevs which support will be periodically trimmed.
This allows block device vdevs which support
BLKDISCARD, such as SSDs, or file vdevs on which the underlying file system BLKDISCARD, such as SSDs, or file vdevs on which the underlying file system
supports hole-punching, to reclaim unused blocks. The default setting for supports hole-punching, to reclaim unused blocks.
this property is The default value for this property is
.Sy off . .Sy off .
.Pp .Pp
Automatic TRIM does not immediately reclaim blocks after a free. Instead, Automatic TRIM does not immediately reclaim blocks after a free.
it will optimistically delay allowing smaller ranges to be aggregated in to Instead, it will optimistically delay allowing smaller ranges to be aggregated
a few larger ones. These can then be issued more efficiently to the storage. into a few larger ones.
These can then be issued more efficiently to the storage.
TRIM on L2ARC devices is enabled by setting TRIM on L2ARC devices is enabled by setting
.Sy l2arc_trim_ahead > 0 . .Sy l2arc_trim_ahead > 0 .
.Pp .Pp
Be aware that automatic trimming of recently freed data blocks can put Be aware that automatic trimming of recently freed data blocks can put
significant stress on the underlying storage devices. This will vary significant stress on the underlying storage devices.
depending of how well the specific device handles these commands. For This will vary depending of how well the specific device handles these commands.
lower end devices it is often possible to achieve most of the benefits For lower-end devices it is often possible to achieve most of the benefits
of automatic trimming by running an on-demand (manual) TRIM periodically of automatic trimming by running an on-demand (manual) TRIM periodically
using the using the
.Nm zpool Cm trim .Nm zpool Cm trim
command. command.
.It Sy bootfs Ns = Ns Sy (unset) Ns | Ns Ar pool Ns / Ns Ar dataset .It Sy bootfs Ns = Ns Sy (unset) Ns | Ns Ar pool Ns Op / Ns Ar dataset
Identifies the default bootable dataset for the root pool. This property is Identifies the default bootable dataset for the root pool.
expected to be set mainly by the installation and upgrade programs. This property is expected to be set mainly by the installation and upgrade programs.
Not all Linux distribution boot processes use the bootfs property. Not all Linux distribution boot processes use the bootfs property.
.It Sy cachefile Ns = Ns Ar path Ns | Ns Sy none .It Sy cachefile Ns = Ns Ar path Ns | Ns Sy none
Controls the location of where the pool configuration is cached. Controls the location of where the pool configuration is cached.
@ -286,20 +299,24 @@ A text string consisting of printable ASCII characters that will be stored
such that it is available even if the pool becomes faulted. such that it is available even if the pool becomes faulted.
An administrator can provide additional information about a pool using this An administrator can provide additional information about a pool using this
property. property.
.It Sy compatibility Ns = Ns Ar off | legacy | file Bq , Ns Ar file Ns ... .It Sy compatibility Ns = Ns Sy off Ns | Ns Sy legacy Ns | Ns Ar file Ns Oo , Ns Ar file Oc Ns
Specifies that the pool maintain compatibility with specific feature sets. Specifies that the pool maintain compatibility with specific feature sets.
When set to When set to
.Sy off .Sy off
(or unset); compatibility is disabled (all features are enabled); when set to (or unset) compatibility is disabled (all features may be enabled); when set to
.Sy legacy Ns ; .Sy legacy Ns
no features are enabled. When set to a comma-separated list of no features may be enabled.
filenames (each filename may either be an absolute path, or relative to When set to a comma-separated list of filenames
.Pa /etc/zfs/compatibility.d or Pa /usr/share/zfs/compatibility.d Ns ) (each filename may either be an absolute path, or relative to
.Pa /etc/zfs/compatibility.d
or
.Pa /usr/share/zfs/compatibility.d )
the lists of requested features are read from those files, separated by the lists of requested features are read from those files, separated by
whitespace and/or commas. Only features present in all files are enabled. whitespace and/or commas.
Only features present in all files may be enabled.
.Pp
See See
.Xr zpool-features 5 Ns , .Xr zpool-features 5 ,
.Xr zpool-create 8 .Xr zpool-create 8
and and
.Xr zpool-upgrade 8 .Xr zpool-upgrade 8
@ -358,25 +375,30 @@ Controls whether a pool activity check should be performed during
.Nm zpool Cm import . .Nm zpool Cm import .
When a pool is determined to be active it cannot be imported, even with the When a pool is determined to be active it cannot be imported, even with the
.Fl f .Fl f
option. This property is intended to be used in failover configurations option.
This property is intended to be used in failover configurations
where multiple hosts have access to a pool on shared storage. where multiple hosts have access to a pool on shared storage.
.Pp .Pp
Multihost provides protection on import only. It does not protect against an Multihost provides protection on import only.
It does not protect against an
individual device being used in multiple pools, regardless of the type of vdev. individual device being used in multiple pools, regardless of the type of vdev.
See the discussion under See the discussion under
.Sy zpool create. .Nm zpool Cm create .
.Pp .Pp
When this property is on, periodic writes to storage occur to show the pool is When this property is on, periodic writes to storage occur to show the pool is
in use. See in use.
See
.Sy zfs_multihost_interval .Sy zfs_multihost_interval
in the in the
.Xr zfs-module-parameters 5 .Xr zfs-module-parameters 5
man page. In order to enable this property each host must set a unique hostid. manual page.
In order to enable this property each host must set a unique hostid.
See See
.Xr genhostid 1 .Xr genhostid 1
.Xr zgenhostid 8 .Xr zgenhostid 8
.Xr spl-module-parameters 5 .Xr spl-module-parameters 5
for additional details. The default value is for additional details.
The default value is
.Sy off . .Sy off .
.It Sy version Ns = Ns Ar version .It Sy version Ns = Ns Ar version
The current on-disk version of the pool. The current on-disk version of the pool.

View File

@ -18,14 +18,15 @@
.\" .\"
.\" CDDL HEADER END .\" CDDL HEADER END
.\" .\"
.\"
.\" Copyright (c) 2020 by Delphix. All rights reserved. .\" Copyright (c) 2020 by Delphix. All rights reserved.
.\"
.Dd May 8, 2021 .Dd May 8, 2021
.Dt ZSTREAM 8 .Dt ZSTREAM 8
.Os .Os
.
.Sh NAME .Sh NAME
.Nm zstream .Nm zstream
.Nd manipulate zfs send streams .Nd manipulate ZFS send streams
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm .Nm
.Cm dump .Cm dump
@ -38,11 +39,11 @@
.Nm .Nm
.Cm token .Cm token
.Ar resume_token .Ar resume_token
.
.Sh DESCRIPTION .Sh DESCRIPTION
.sp
The The
.Sy zstream .Sy zstream
utility manipulates zfs send streams, which are the output of the utility manipulates ZFS send streams output by the
.Sy zfs send .Sy zfs send
command. command.
.Bl -tag -width "" .Bl -tag -width ""
@ -102,16 +103,15 @@ command is provided a
containing a deduplicated send stream, and outputs an equivalent containing a deduplicated send stream, and outputs an equivalent
non-deduplicated send stream on standard output. non-deduplicated send stream on standard output.
Therefore, a deduplicated send stream can be received by running: Therefore, a deduplicated send stream can be received by running:
.Bd -literal .Dl # Nm zstream Cm redup Pa DEDUP_STREAM_FILE | Nm zfs Cm receive No
# zstream redup DEDUP_STREAM_FILE | zfs receive ...
.Ed
.Bl -tag -width "-D" .Bl -tag -width "-D"
.It Fl v .It Fl v
Verbose. Verbose.
Print summary of converted records. Print summary of converted records.
.El .El
.El .El
.
.Sh SEE ALSO .Sh SEE ALSO
.Xr zfs 8 , .Xr zfs 8 ,
.Xr zfs-send 8 , .Xr zfs-receive 8 ,
.Xr zfs-receive 8 .Xr zfs-send 8