2019-11-13 17:21:07 +00:00
|
|
|
.\"
|
|
|
|
.\" CDDL HEADER START
|
|
|
|
.\"
|
|
|
|
.\" The contents of this file are subject to the terms of the
|
|
|
|
.\" Common Development and Distribution License (the "License").
|
|
|
|
.\" You may not use this file except in compliance with the License.
|
|
|
|
.\"
|
|
|
|
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
2022-07-11 21:16:13 +00:00
|
|
|
.\" or https://opensource.org/licenses/CDDL-1.0.
|
2019-11-13 17:21:07 +00:00
|
|
|
.\" See the License for the specific language governing permissions
|
|
|
|
.\" and limitations under the License.
|
|
|
|
.\"
|
|
|
|
.\" When distributing Covered Code, include this CDDL HEADER in each
|
|
|
|
.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
|
|
|
.\" If applicable, add the following below this CDDL HEADER, with the
|
|
|
|
.\" fields enclosed by brackets "[]" replaced with your own identifying
|
|
|
|
.\" information: Portions Copyright [yyyy] [name of copyright owner]
|
|
|
|
.\"
|
|
|
|
.\" CDDL HEADER END
|
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
|
|
|
|
.\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
|
|
|
|
.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
|
|
|
|
.\" Copyright (c) 2017 Datto Inc.
|
|
|
|
.\" Copyright (c) 2018 George Melikov. All Rights Reserved.
|
|
|
|
.\" Copyright 2017 Nexenta Systems, Inc.
|
|
|
|
.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
|
|
|
|
.\"
|
2023-04-13 16:15:34 +00:00
|
|
|
.Dd April 7, 2023
|
2021-06-04 20:29:26 +00:00
|
|
|
.Dt ZPOOLCONCEPTS 7
|
2020-08-21 18:55:47 +00:00
|
|
|
.Os
|
2021-05-27 00:46:40 +00:00
|
|
|
.
|
2019-11-13 17:21:07 +00:00
|
|
|
.Sh NAME
|
|
|
|
.Nm zpoolconcepts
|
|
|
|
.Nd overview of ZFS storage pools
|
2021-05-27 00:46:40 +00:00
|
|
|
.
|
2019-11-13 17:21:07 +00:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Ss Virtual Devices (vdevs)
|
2023-04-13 16:15:34 +00:00
|
|
|
A "virtual device" describes a single device or a collection of devices,
|
2019-11-13 17:21:07 +00:00
|
|
|
organized according to certain performance and fault characteristics.
|
|
|
|
The following virtual devices are supported:
|
2021-05-27 00:46:40 +00:00
|
|
|
.Bl -tag -width "special"
|
2019-11-13 17:21:07 +00:00
|
|
|
.It Sy disk
|
|
|
|
A block device, typically located under
|
|
|
|
.Pa /dev .
|
|
|
|
ZFS can use individual slices or partitions, though the recommended mode of
|
|
|
|
operation is to use whole disks.
|
|
|
|
A disk can be specified by a full path, or it can be a shorthand name
|
|
|
|
.Po the relative portion of the path under
|
|
|
|
.Pa /dev
|
|
|
|
.Pc .
|
|
|
|
A whole disk can be specified by omitting the slice or partition designation.
|
|
|
|
For example,
|
|
|
|
.Pa sda
|
|
|
|
is equivalent to
|
|
|
|
.Pa /dev/sda .
|
|
|
|
When given a whole disk, ZFS automatically labels the disk, if necessary.
|
|
|
|
.It Sy file
|
|
|
|
A regular file.
|
|
|
|
The use of files as a backing store is strongly discouraged.
|
|
|
|
It is designed primarily for experimental purposes, as the fault tolerance of a
|
2021-05-27 00:46:40 +00:00
|
|
|
file is only as good as the file system on which it resides.
|
2019-11-13 17:21:07 +00:00
|
|
|
A file must be specified by a full path.
|
|
|
|
.It Sy mirror
|
|
|
|
A mirror of two or more devices.
|
|
|
|
Data is replicated in an identical fashion across all components of a mirror.
|
2021-05-27 00:46:40 +00:00
|
|
|
A mirror with
|
|
|
|
.Em N No disks of size Em X No can hold Em X No bytes and can withstand Em N-1
|
2023-04-13 16:15:34 +00:00
|
|
|
devices failing, without losing data.
|
2019-11-13 17:21:07 +00:00
|
|
|
.It Sy raidz , raidz1 , raidz2 , raidz3
|
2023-04-13 16:15:34 +00:00
|
|
|
A distributed-parity layout, similar to RAID-5/6, with improved distribution of
|
|
|
|
parity, and which does not suffer from the RAID-5/6
|
|
|
|
.Qq write hole ,
|
2019-11-13 17:21:07 +00:00
|
|
|
.Pq in which data and parity become inconsistent after a power loss .
|
2023-04-13 16:15:34 +00:00
|
|
|
Data and parity is striped across all disks within a raidz group, though not
|
|
|
|
necessarily in a consistent stripe width.
|
2019-11-13 17:21:07 +00:00
|
|
|
.Pp
|
2021-05-27 00:46:40 +00:00
|
|
|
A raidz group can have single, double, or triple parity, meaning that the
|
2019-11-13 17:21:07 +00:00
|
|
|
raidz group can sustain one, two, or three failures, respectively, without
|
|
|
|
losing any data.
|
|
|
|
The
|
|
|
|
.Sy raidz1
|
|
|
|
vdev type specifies a single-parity raidz group; the
|
|
|
|
.Sy raidz2
|
|
|
|
vdev type specifies a double-parity raidz group; and the
|
|
|
|
.Sy raidz3
|
|
|
|
vdev type specifies a triple-parity raidz group.
|
|
|
|
The
|
|
|
|
.Sy raidz
|
|
|
|
vdev type is an alias for
|
|
|
|
.Sy raidz1 .
|
|
|
|
.Pp
|
2021-05-27 00:46:40 +00:00
|
|
|
A raidz group with
|
|
|
|
.Em N No disks of size Em X No with Em P No parity disks can hold approximately
|
2022-11-12 12:23:30 +00:00
|
|
|
.Em (N-P)*X No bytes and can withstand Em P No devices failing without losing data .
|
2019-11-13 17:21:07 +00:00
|
|
|
The minimum number of devices in a raidz group is one more than the number of
|
|
|
|
parity disks.
|
|
|
|
The recommended number is between 3 and 9 to help increase performance.
|
Distributed Spare (dRAID) Feature
This patch adds a new top-level vdev type called dRAID, which stands
for Distributed parity RAID. This pool configuration allows all dRAID
vdevs to participate when rebuilding to a distributed hot spare device.
This can substantially reduce the total time required to restore full
parity to pool with a failed device.
A dRAID pool can be created using the new top-level `draid` type.
Like `raidz`, the desired redundancy is specified after the type:
`draid[1,2,3]`. No additional information is required to create the
pool and reasonable default values will be chosen based on the number
of child vdevs in the dRAID vdev.
zpool create <pool> draid[1,2,3] <vdevs...>
Unlike raidz, additional optional dRAID configuration values can be
provided as part of the draid type as colon separated values. This
allows administrators to fully specify a layout for either performance
or capacity reasons. The supported options include:
zpool create <pool> \
draid[<parity>][:<data>d][:<children>c][:<spares>s] \
<vdevs...>
- draid[parity] - Parity level (default 1)
- draid[:<data>d] - Data devices per group (default 8)
- draid[:<children>c] - Expected number of child vdevs
- draid[:<spares>s] - Distributed hot spares (default 0)
Abbreviated example `zpool status` output for a 68 disk dRAID pool
with two distributed spares using special allocation classes.
```
pool: tank
state: ONLINE
config:
NAME STATE READ WRITE CKSUM
slag7 ONLINE 0 0 0
draid2:8d:68c:2s-0 ONLINE 0 0 0
L0 ONLINE 0 0 0
L1 ONLINE 0 0 0
...
U25 ONLINE 0 0 0
U26 ONLINE 0 0 0
spare-53 ONLINE 0 0 0
U27 ONLINE 0 0 0
draid2-0-0 ONLINE 0 0 0
U28 ONLINE 0 0 0
U29 ONLINE 0 0 0
...
U42 ONLINE 0 0 0
U43 ONLINE 0 0 0
special
mirror-1 ONLINE 0 0 0
L5 ONLINE 0 0 0
U5 ONLINE 0 0 0
mirror-2 ONLINE 0 0 0
L6 ONLINE 0 0 0
U6 ONLINE 0 0 0
spares
draid2-0-0 INUSE currently in use
draid2-0-1 AVAIL
```
When adding test coverage for the new dRAID vdev type the following
options were added to the ztest command. These options are leverages
by zloop.sh to test a wide range of dRAID configurations.
-K draid|raidz|random - kind of RAID to test
-D <value> - dRAID data drives per group
-S <value> - dRAID distributed hot spares
-R <value> - RAID parity (raidz or dRAID)
The zpool_create, zpool_import, redundancy, replacement and fault
test groups have all been updated provide test coverage for the
dRAID feature.
Co-authored-by: Isaac Huang <he.huang@intel.com>
Co-authored-by: Mark Maybee <mmaybee@cray.com>
Co-authored-by: Don Brady <don.brady@delphix.com>
Co-authored-by: Matthew Ahrens <mahrens@delphix.com>
Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Mark Maybee <mmaybee@cray.com>
Reviewed-by: Matt Ahrens <matt@delphix.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #10102
2020-11-13 21:51:51 +00:00
|
|
|
.It Sy draid , draid1 , draid2 , draid3
|
2023-04-13 16:15:34 +00:00
|
|
|
A variant of raidz that provides integrated distributed hot spares, allowing
|
|
|
|
for faster resilvering, while retaining the benefits of raidz.
|
2021-05-27 00:46:40 +00:00
|
|
|
A dRAID vdev is constructed from multiple internal raidz groups, each with
|
2022-11-12 12:23:30 +00:00
|
|
|
.Em D No data devices and Em P No parity devices .
|
Distributed Spare (dRAID) Feature
This patch adds a new top-level vdev type called dRAID, which stands
for Distributed parity RAID. This pool configuration allows all dRAID
vdevs to participate when rebuilding to a distributed hot spare device.
This can substantially reduce the total time required to restore full
parity to pool with a failed device.
A dRAID pool can be created using the new top-level `draid` type.
Like `raidz`, the desired redundancy is specified after the type:
`draid[1,2,3]`. No additional information is required to create the
pool and reasonable default values will be chosen based on the number
of child vdevs in the dRAID vdev.
zpool create <pool> draid[1,2,3] <vdevs...>
Unlike raidz, additional optional dRAID configuration values can be
provided as part of the draid type as colon separated values. This
allows administrators to fully specify a layout for either performance
or capacity reasons. The supported options include:
zpool create <pool> \
draid[<parity>][:<data>d][:<children>c][:<spares>s] \
<vdevs...>
- draid[parity] - Parity level (default 1)
- draid[:<data>d] - Data devices per group (default 8)
- draid[:<children>c] - Expected number of child vdevs
- draid[:<spares>s] - Distributed hot spares (default 0)
Abbreviated example `zpool status` output for a 68 disk dRAID pool
with two distributed spares using special allocation classes.
```
pool: tank
state: ONLINE
config:
NAME STATE READ WRITE CKSUM
slag7 ONLINE 0 0 0
draid2:8d:68c:2s-0 ONLINE 0 0 0
L0 ONLINE 0 0 0
L1 ONLINE 0 0 0
...
U25 ONLINE 0 0 0
U26 ONLINE 0 0 0
spare-53 ONLINE 0 0 0
U27 ONLINE 0 0 0
draid2-0-0 ONLINE 0 0 0
U28 ONLINE 0 0 0
U29 ONLINE 0 0 0
...
U42 ONLINE 0 0 0
U43 ONLINE 0 0 0
special
mirror-1 ONLINE 0 0 0
L5 ONLINE 0 0 0
U5 ONLINE 0 0 0
mirror-2 ONLINE 0 0 0
L6 ONLINE 0 0 0
U6 ONLINE 0 0 0
spares
draid2-0-0 INUSE currently in use
draid2-0-1 AVAIL
```
When adding test coverage for the new dRAID vdev type the following
options were added to the ztest command. These options are leverages
by zloop.sh to test a wide range of dRAID configurations.
-K draid|raidz|random - kind of RAID to test
-D <value> - dRAID data drives per group
-S <value> - dRAID distributed hot spares
-R <value> - RAID parity (raidz or dRAID)
The zpool_create, zpool_import, redundancy, replacement and fault
test groups have all been updated provide test coverage for the
dRAID feature.
Co-authored-by: Isaac Huang <he.huang@intel.com>
Co-authored-by: Mark Maybee <mmaybee@cray.com>
Co-authored-by: Don Brady <don.brady@delphix.com>
Co-authored-by: Matthew Ahrens <mahrens@delphix.com>
Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Mark Maybee <mmaybee@cray.com>
Reviewed-by: Matt Ahrens <matt@delphix.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #10102
2020-11-13 21:51:51 +00:00
|
|
|
These groups are distributed over all of the children in order to fully
|
|
|
|
utilize the available disk performance.
|
|
|
|
.Pp
|
|
|
|
Unlike raidz, dRAID uses a fixed stripe width (padding as necessary with
|
|
|
|
zeros) to allow fully sequential resilvering.
|
2023-04-13 16:15:34 +00:00
|
|
|
This fixed stripe width significantly affects both usable capacity and IOPS.
|
2021-05-27 00:46:40 +00:00
|
|
|
For example, with the default
|
2022-05-03 12:07:04 +00:00
|
|
|
.Em D=8 No and Em 4 KiB No disk sectors the minimum allocation size is Em 32 KiB .
|
Distributed Spare (dRAID) Feature
This patch adds a new top-level vdev type called dRAID, which stands
for Distributed parity RAID. This pool configuration allows all dRAID
vdevs to participate when rebuilding to a distributed hot spare device.
This can substantially reduce the total time required to restore full
parity to pool with a failed device.
A dRAID pool can be created using the new top-level `draid` type.
Like `raidz`, the desired redundancy is specified after the type:
`draid[1,2,3]`. No additional information is required to create the
pool and reasonable default values will be chosen based on the number
of child vdevs in the dRAID vdev.
zpool create <pool> draid[1,2,3] <vdevs...>
Unlike raidz, additional optional dRAID configuration values can be
provided as part of the draid type as colon separated values. This
allows administrators to fully specify a layout for either performance
or capacity reasons. The supported options include:
zpool create <pool> \
draid[<parity>][:<data>d][:<children>c][:<spares>s] \
<vdevs...>
- draid[parity] - Parity level (default 1)
- draid[:<data>d] - Data devices per group (default 8)
- draid[:<children>c] - Expected number of child vdevs
- draid[:<spares>s] - Distributed hot spares (default 0)
Abbreviated example `zpool status` output for a 68 disk dRAID pool
with two distributed spares using special allocation classes.
```
pool: tank
state: ONLINE
config:
NAME STATE READ WRITE CKSUM
slag7 ONLINE 0 0 0
draid2:8d:68c:2s-0 ONLINE 0 0 0
L0 ONLINE 0 0 0
L1 ONLINE 0 0 0
...
U25 ONLINE 0 0 0
U26 ONLINE 0 0 0
spare-53 ONLINE 0 0 0
U27 ONLINE 0 0 0
draid2-0-0 ONLINE 0 0 0
U28 ONLINE 0 0 0
U29 ONLINE 0 0 0
...
U42 ONLINE 0 0 0
U43 ONLINE 0 0 0
special
mirror-1 ONLINE 0 0 0
L5 ONLINE 0 0 0
U5 ONLINE 0 0 0
mirror-2 ONLINE 0 0 0
L6 ONLINE 0 0 0
U6 ONLINE 0 0 0
spares
draid2-0-0 INUSE currently in use
draid2-0-1 AVAIL
```
When adding test coverage for the new dRAID vdev type the following
options were added to the ztest command. These options are leverages
by zloop.sh to test a wide range of dRAID configurations.
-K draid|raidz|random - kind of RAID to test
-D <value> - dRAID data drives per group
-S <value> - dRAID distributed hot spares
-R <value> - RAID parity (raidz or dRAID)
The zpool_create, zpool_import, redundancy, replacement and fault
test groups have all been updated provide test coverage for the
dRAID feature.
Co-authored-by: Isaac Huang <he.huang@intel.com>
Co-authored-by: Mark Maybee <mmaybee@cray.com>
Co-authored-by: Don Brady <don.brady@delphix.com>
Co-authored-by: Matthew Ahrens <mahrens@delphix.com>
Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Mark Maybee <mmaybee@cray.com>
Reviewed-by: Matt Ahrens <matt@delphix.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #10102
2020-11-13 21:51:51 +00:00
|
|
|
If using compression, this relatively large allocation size can reduce the
|
|
|
|
effective compression ratio.
|
2023-04-13 16:15:34 +00:00
|
|
|
When using ZFS volumes (zvols) and dRAID, the default of the
|
2021-05-27 00:46:40 +00:00
|
|
|
.Sy volblocksize
|
|
|
|
property is increased to account for the allocation size.
|
Distributed Spare (dRAID) Feature
This patch adds a new top-level vdev type called dRAID, which stands
for Distributed parity RAID. This pool configuration allows all dRAID
vdevs to participate when rebuilding to a distributed hot spare device.
This can substantially reduce the total time required to restore full
parity to pool with a failed device.
A dRAID pool can be created using the new top-level `draid` type.
Like `raidz`, the desired redundancy is specified after the type:
`draid[1,2,3]`. No additional information is required to create the
pool and reasonable default values will be chosen based on the number
of child vdevs in the dRAID vdev.
zpool create <pool> draid[1,2,3] <vdevs...>
Unlike raidz, additional optional dRAID configuration values can be
provided as part of the draid type as colon separated values. This
allows administrators to fully specify a layout for either performance
or capacity reasons. The supported options include:
zpool create <pool> \
draid[<parity>][:<data>d][:<children>c][:<spares>s] \
<vdevs...>
- draid[parity] - Parity level (default 1)
- draid[:<data>d] - Data devices per group (default 8)
- draid[:<children>c] - Expected number of child vdevs
- draid[:<spares>s] - Distributed hot spares (default 0)
Abbreviated example `zpool status` output for a 68 disk dRAID pool
with two distributed spares using special allocation classes.
```
pool: tank
state: ONLINE
config:
NAME STATE READ WRITE CKSUM
slag7 ONLINE 0 0 0
draid2:8d:68c:2s-0 ONLINE 0 0 0
L0 ONLINE 0 0 0
L1 ONLINE 0 0 0
...
U25 ONLINE 0 0 0
U26 ONLINE 0 0 0
spare-53 ONLINE 0 0 0
U27 ONLINE 0 0 0
draid2-0-0 ONLINE 0 0 0
U28 ONLINE 0 0 0
U29 ONLINE 0 0 0
...
U42 ONLINE 0 0 0
U43 ONLINE 0 0 0
special
mirror-1 ONLINE 0 0 0
L5 ONLINE 0 0 0
U5 ONLINE 0 0 0
mirror-2 ONLINE 0 0 0
L6 ONLINE 0 0 0
U6 ONLINE 0 0 0
spares
draid2-0-0 INUSE currently in use
draid2-0-1 AVAIL
```
When adding test coverage for the new dRAID vdev type the following
options were added to the ztest command. These options are leverages
by zloop.sh to test a wide range of dRAID configurations.
-K draid|raidz|random - kind of RAID to test
-D <value> - dRAID data drives per group
-S <value> - dRAID distributed hot spares
-R <value> - RAID parity (raidz or dRAID)
The zpool_create, zpool_import, redundancy, replacement and fault
test groups have all been updated provide test coverage for the
dRAID feature.
Co-authored-by: Isaac Huang <he.huang@intel.com>
Co-authored-by: Mark Maybee <mmaybee@cray.com>
Co-authored-by: Don Brady <don.brady@delphix.com>
Co-authored-by: Matthew Ahrens <mahrens@delphix.com>
Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Mark Maybee <mmaybee@cray.com>
Reviewed-by: Matt Ahrens <matt@delphix.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #10102
2020-11-13 21:51:51 +00:00
|
|
|
If a dRAID pool will hold a significant amount of small blocks, it is
|
|
|
|
recommended to also add a mirrored
|
|
|
|
.Sy special
|
|
|
|
vdev to store those blocks.
|
|
|
|
.Pp
|
2023-04-13 16:15:34 +00:00
|
|
|
In regards to I/O, performance is similar to raidz since, for any read, all
|
2022-11-12 12:23:30 +00:00
|
|
|
.Em D No data disks must be accessed .
|
Distributed Spare (dRAID) Feature
This patch adds a new top-level vdev type called dRAID, which stands
for Distributed parity RAID. This pool configuration allows all dRAID
vdevs to participate when rebuilding to a distributed hot spare device.
This can substantially reduce the total time required to restore full
parity to pool with a failed device.
A dRAID pool can be created using the new top-level `draid` type.
Like `raidz`, the desired redundancy is specified after the type:
`draid[1,2,3]`. No additional information is required to create the
pool and reasonable default values will be chosen based on the number
of child vdevs in the dRAID vdev.
zpool create <pool> draid[1,2,3] <vdevs...>
Unlike raidz, additional optional dRAID configuration values can be
provided as part of the draid type as colon separated values. This
allows administrators to fully specify a layout for either performance
or capacity reasons. The supported options include:
zpool create <pool> \
draid[<parity>][:<data>d][:<children>c][:<spares>s] \
<vdevs...>
- draid[parity] - Parity level (default 1)
- draid[:<data>d] - Data devices per group (default 8)
- draid[:<children>c] - Expected number of child vdevs
- draid[:<spares>s] - Distributed hot spares (default 0)
Abbreviated example `zpool status` output for a 68 disk dRAID pool
with two distributed spares using special allocation classes.
```
pool: tank
state: ONLINE
config:
NAME STATE READ WRITE CKSUM
slag7 ONLINE 0 0 0
draid2:8d:68c:2s-0 ONLINE 0 0 0
L0 ONLINE 0 0 0
L1 ONLINE 0 0 0
...
U25 ONLINE 0 0 0
U26 ONLINE 0 0 0
spare-53 ONLINE 0 0 0
U27 ONLINE 0 0 0
draid2-0-0 ONLINE 0 0 0
U28 ONLINE 0 0 0
U29 ONLINE 0 0 0
...
U42 ONLINE 0 0 0
U43 ONLINE 0 0 0
special
mirror-1 ONLINE 0 0 0
L5 ONLINE 0 0 0
U5 ONLINE 0 0 0
mirror-2 ONLINE 0 0 0
L6 ONLINE 0 0 0
U6 ONLINE 0 0 0
spares
draid2-0-0 INUSE currently in use
draid2-0-1 AVAIL
```
When adding test coverage for the new dRAID vdev type the following
options were added to the ztest command. These options are leverages
by zloop.sh to test a wide range of dRAID configurations.
-K draid|raidz|random - kind of RAID to test
-D <value> - dRAID data drives per group
-S <value> - dRAID distributed hot spares
-R <value> - RAID parity (raidz or dRAID)
The zpool_create, zpool_import, redundancy, replacement and fault
test groups have all been updated provide test coverage for the
dRAID feature.
Co-authored-by: Isaac Huang <he.huang@intel.com>
Co-authored-by: Mark Maybee <mmaybee@cray.com>
Co-authored-by: Don Brady <don.brady@delphix.com>
Co-authored-by: Matthew Ahrens <mahrens@delphix.com>
Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Mark Maybee <mmaybee@cray.com>
Reviewed-by: Matt Ahrens <matt@delphix.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #10102
2020-11-13 21:51:51 +00:00
|
|
|
Delivered random IOPS can be reasonably approximated as
|
2021-05-27 00:46:40 +00:00
|
|
|
.Sy floor((N-S)/(D+P))*single_drive_IOPS .
|
Distributed Spare (dRAID) Feature
This patch adds a new top-level vdev type called dRAID, which stands
for Distributed parity RAID. This pool configuration allows all dRAID
vdevs to participate when rebuilding to a distributed hot spare device.
This can substantially reduce the total time required to restore full
parity to pool with a failed device.
A dRAID pool can be created using the new top-level `draid` type.
Like `raidz`, the desired redundancy is specified after the type:
`draid[1,2,3]`. No additional information is required to create the
pool and reasonable default values will be chosen based on the number
of child vdevs in the dRAID vdev.
zpool create <pool> draid[1,2,3] <vdevs...>
Unlike raidz, additional optional dRAID configuration values can be
provided as part of the draid type as colon separated values. This
allows administrators to fully specify a layout for either performance
or capacity reasons. The supported options include:
zpool create <pool> \
draid[<parity>][:<data>d][:<children>c][:<spares>s] \
<vdevs...>
- draid[parity] - Parity level (default 1)
- draid[:<data>d] - Data devices per group (default 8)
- draid[:<children>c] - Expected number of child vdevs
- draid[:<spares>s] - Distributed hot spares (default 0)
Abbreviated example `zpool status` output for a 68 disk dRAID pool
with two distributed spares using special allocation classes.
```
pool: tank
state: ONLINE
config:
NAME STATE READ WRITE CKSUM
slag7 ONLINE 0 0 0
draid2:8d:68c:2s-0 ONLINE 0 0 0
L0 ONLINE 0 0 0
L1 ONLINE 0 0 0
...
U25 ONLINE 0 0 0
U26 ONLINE 0 0 0
spare-53 ONLINE 0 0 0
U27 ONLINE 0 0 0
draid2-0-0 ONLINE 0 0 0
U28 ONLINE 0 0 0
U29 ONLINE 0 0 0
...
U42 ONLINE 0 0 0
U43 ONLINE 0 0 0
special
mirror-1 ONLINE 0 0 0
L5 ONLINE 0 0 0
U5 ONLINE 0 0 0
mirror-2 ONLINE 0 0 0
L6 ONLINE 0 0 0
U6 ONLINE 0 0 0
spares
draid2-0-0 INUSE currently in use
draid2-0-1 AVAIL
```
When adding test coverage for the new dRAID vdev type the following
options were added to the ztest command. These options are leverages
by zloop.sh to test a wide range of dRAID configurations.
-K draid|raidz|random - kind of RAID to test
-D <value> - dRAID data drives per group
-S <value> - dRAID distributed hot spares
-R <value> - RAID parity (raidz or dRAID)
The zpool_create, zpool_import, redundancy, replacement and fault
test groups have all been updated provide test coverage for the
dRAID feature.
Co-authored-by: Isaac Huang <he.huang@intel.com>
Co-authored-by: Mark Maybee <mmaybee@cray.com>
Co-authored-by: Don Brady <don.brady@delphix.com>
Co-authored-by: Matthew Ahrens <mahrens@delphix.com>
Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Mark Maybee <mmaybee@cray.com>
Reviewed-by: Matt Ahrens <matt@delphix.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #10102
2020-11-13 21:51:51 +00:00
|
|
|
.Pp
|
2022-03-23 15:53:19 +00:00
|
|
|
Like raidz, a dRAID can have single-, double-, or triple-parity.
|
2021-05-27 00:46:40 +00:00
|
|
|
The
|
Distributed Spare (dRAID) Feature
This patch adds a new top-level vdev type called dRAID, which stands
for Distributed parity RAID. This pool configuration allows all dRAID
vdevs to participate when rebuilding to a distributed hot spare device.
This can substantially reduce the total time required to restore full
parity to pool with a failed device.
A dRAID pool can be created using the new top-level `draid` type.
Like `raidz`, the desired redundancy is specified after the type:
`draid[1,2,3]`. No additional information is required to create the
pool and reasonable default values will be chosen based on the number
of child vdevs in the dRAID vdev.
zpool create <pool> draid[1,2,3] <vdevs...>
Unlike raidz, additional optional dRAID configuration values can be
provided as part of the draid type as colon separated values. This
allows administrators to fully specify a layout for either performance
or capacity reasons. The supported options include:
zpool create <pool> \
draid[<parity>][:<data>d][:<children>c][:<spares>s] \
<vdevs...>
- draid[parity] - Parity level (default 1)
- draid[:<data>d] - Data devices per group (default 8)
- draid[:<children>c] - Expected number of child vdevs
- draid[:<spares>s] - Distributed hot spares (default 0)
Abbreviated example `zpool status` output for a 68 disk dRAID pool
with two distributed spares using special allocation classes.
```
pool: tank
state: ONLINE
config:
NAME STATE READ WRITE CKSUM
slag7 ONLINE 0 0 0
draid2:8d:68c:2s-0 ONLINE 0 0 0
L0 ONLINE 0 0 0
L1 ONLINE 0 0 0
...
U25 ONLINE 0 0 0
U26 ONLINE 0 0 0
spare-53 ONLINE 0 0 0
U27 ONLINE 0 0 0
draid2-0-0 ONLINE 0 0 0
U28 ONLINE 0 0 0
U29 ONLINE 0 0 0
...
U42 ONLINE 0 0 0
U43 ONLINE 0 0 0
special
mirror-1 ONLINE 0 0 0
L5 ONLINE 0 0 0
U5 ONLINE 0 0 0
mirror-2 ONLINE 0 0 0
L6 ONLINE 0 0 0
U6 ONLINE 0 0 0
spares
draid2-0-0 INUSE currently in use
draid2-0-1 AVAIL
```
When adding test coverage for the new dRAID vdev type the following
options were added to the ztest command. These options are leverages
by zloop.sh to test a wide range of dRAID configurations.
-K draid|raidz|random - kind of RAID to test
-D <value> - dRAID data drives per group
-S <value> - dRAID distributed hot spares
-R <value> - RAID parity (raidz or dRAID)
The zpool_create, zpool_import, redundancy, replacement and fault
test groups have all been updated provide test coverage for the
dRAID feature.
Co-authored-by: Isaac Huang <he.huang@intel.com>
Co-authored-by: Mark Maybee <mmaybee@cray.com>
Co-authored-by: Don Brady <don.brady@delphix.com>
Co-authored-by: Matthew Ahrens <mahrens@delphix.com>
Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Mark Maybee <mmaybee@cray.com>
Reviewed-by: Matt Ahrens <matt@delphix.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #10102
2020-11-13 21:51:51 +00:00
|
|
|
.Sy draid1 ,
|
|
|
|
.Sy draid2 ,
|
|
|
|
and
|
|
|
|
.Sy draid3
|
|
|
|
types can be used to specify the parity level.
|
|
|
|
The
|
|
|
|
.Sy draid
|
|
|
|
vdev type is an alias for
|
|
|
|
.Sy draid1 .
|
|
|
|
.Pp
|
2021-05-27 00:46:40 +00:00
|
|
|
A dRAID with
|
2022-11-12 12:23:30 +00:00
|
|
|
.Em N No disks of size Em X , D No data disks per redundancy group , Em P
|
2021-05-27 00:46:40 +00:00
|
|
|
.No parity level, and Em S No distributed hot spares can hold approximately
|
|
|
|
.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
|
Distributed Spare (dRAID) Feature
This patch adds a new top-level vdev type called dRAID, which stands
for Distributed parity RAID. This pool configuration allows all dRAID
vdevs to participate when rebuilding to a distributed hot spare device.
This can substantially reduce the total time required to restore full
parity to pool with a failed device.
A dRAID pool can be created using the new top-level `draid` type.
Like `raidz`, the desired redundancy is specified after the type:
`draid[1,2,3]`. No additional information is required to create the
pool and reasonable default values will be chosen based on the number
of child vdevs in the dRAID vdev.
zpool create <pool> draid[1,2,3] <vdevs...>
Unlike raidz, additional optional dRAID configuration values can be
provided as part of the draid type as colon separated values. This
allows administrators to fully specify a layout for either performance
or capacity reasons. The supported options include:
zpool create <pool> \
draid[<parity>][:<data>d][:<children>c][:<spares>s] \
<vdevs...>
- draid[parity] - Parity level (default 1)
- draid[:<data>d] - Data devices per group (default 8)
- draid[:<children>c] - Expected number of child vdevs
- draid[:<spares>s] - Distributed hot spares (default 0)
Abbreviated example `zpool status` output for a 68 disk dRAID pool
with two distributed spares using special allocation classes.
```
pool: tank
state: ONLINE
config:
NAME STATE READ WRITE CKSUM
slag7 ONLINE 0 0 0
draid2:8d:68c:2s-0 ONLINE 0 0 0
L0 ONLINE 0 0 0
L1 ONLINE 0 0 0
...
U25 ONLINE 0 0 0
U26 ONLINE 0 0 0
spare-53 ONLINE 0 0 0
U27 ONLINE 0 0 0
draid2-0-0 ONLINE 0 0 0
U28 ONLINE 0 0 0
U29 ONLINE 0 0 0
...
U42 ONLINE 0 0 0
U43 ONLINE 0 0 0
special
mirror-1 ONLINE 0 0 0
L5 ONLINE 0 0 0
U5 ONLINE 0 0 0
mirror-2 ONLINE 0 0 0
L6 ONLINE 0 0 0
U6 ONLINE 0 0 0
spares
draid2-0-0 INUSE currently in use
draid2-0-1 AVAIL
```
When adding test coverage for the new dRAID vdev type the following
options were added to the ztest command. These options are leverages
by zloop.sh to test a wide range of dRAID configurations.
-K draid|raidz|random - kind of RAID to test
-D <value> - dRAID data drives per group
-S <value> - dRAID distributed hot spares
-R <value> - RAID parity (raidz or dRAID)
The zpool_create, zpool_import, redundancy, replacement and fault
test groups have all been updated provide test coverage for the
dRAID feature.
Co-authored-by: Isaac Huang <he.huang@intel.com>
Co-authored-by: Mark Maybee <mmaybee@cray.com>
Co-authored-by: Don Brady <don.brady@delphix.com>
Co-authored-by: Matthew Ahrens <mahrens@delphix.com>
Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Mark Maybee <mmaybee@cray.com>
Reviewed-by: Matt Ahrens <matt@delphix.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #10102
2020-11-13 21:51:51 +00:00
|
|
|
A non-default dRAID configuration can be specified by appending one or more
|
|
|
|
of the following optional arguments to the
|
|
|
|
.Sy draid
|
2021-05-27 00:46:40 +00:00
|
|
|
keyword:
|
|
|
|
.Bl -tag -compact -width "children"
|
|
|
|
.It Ar parity
|
|
|
|
The parity level (1-3).
|
|
|
|
.It Ar data
|
|
|
|
The number of data devices per redundancy group.
|
|
|
|
In general, a smaller value of
|
2022-11-12 12:23:30 +00:00
|
|
|
.Em D No will increase IOPS, improve the compression ratio ,
|
2021-05-27 00:46:40 +00:00
|
|
|
and speed up resilvering at the expense of total usable capacity.
|
|
|
|
Defaults to
|
|
|
|
.Em 8 , No unless Em N-P-S No is less than Em 8 .
|
|
|
|
.It Ar children
|
|
|
|
The expected number of children.
|
Distributed Spare (dRAID) Feature
This patch adds a new top-level vdev type called dRAID, which stands
for Distributed parity RAID. This pool configuration allows all dRAID
vdevs to participate when rebuilding to a distributed hot spare device.
This can substantially reduce the total time required to restore full
parity to pool with a failed device.
A dRAID pool can be created using the new top-level `draid` type.
Like `raidz`, the desired redundancy is specified after the type:
`draid[1,2,3]`. No additional information is required to create the
pool and reasonable default values will be chosen based on the number
of child vdevs in the dRAID vdev.
zpool create <pool> draid[1,2,3] <vdevs...>
Unlike raidz, additional optional dRAID configuration values can be
provided as part of the draid type as colon separated values. This
allows administrators to fully specify a layout for either performance
or capacity reasons. The supported options include:
zpool create <pool> \
draid[<parity>][:<data>d][:<children>c][:<spares>s] \
<vdevs...>
- draid[parity] - Parity level (default 1)
- draid[:<data>d] - Data devices per group (default 8)
- draid[:<children>c] - Expected number of child vdevs
- draid[:<spares>s] - Distributed hot spares (default 0)
Abbreviated example `zpool status` output for a 68 disk dRAID pool
with two distributed spares using special allocation classes.
```
pool: tank
state: ONLINE
config:
NAME STATE READ WRITE CKSUM
slag7 ONLINE 0 0 0
draid2:8d:68c:2s-0 ONLINE 0 0 0
L0 ONLINE 0 0 0
L1 ONLINE 0 0 0
...
U25 ONLINE 0 0 0
U26 ONLINE 0 0 0
spare-53 ONLINE 0 0 0
U27 ONLINE 0 0 0
draid2-0-0 ONLINE 0 0 0
U28 ONLINE 0 0 0
U29 ONLINE 0 0 0
...
U42 ONLINE 0 0 0
U43 ONLINE 0 0 0
special
mirror-1 ONLINE 0 0 0
L5 ONLINE 0 0 0
U5 ONLINE 0 0 0
mirror-2 ONLINE 0 0 0
L6 ONLINE 0 0 0
U6 ONLINE 0 0 0
spares
draid2-0-0 INUSE currently in use
draid2-0-1 AVAIL
```
When adding test coverage for the new dRAID vdev type the following
options were added to the ztest command. These options are leverages
by zloop.sh to test a wide range of dRAID configurations.
-K draid|raidz|random - kind of RAID to test
-D <value> - dRAID data drives per group
-S <value> - dRAID distributed hot spares
-R <value> - RAID parity (raidz or dRAID)
The zpool_create, zpool_import, redundancy, replacement and fault
test groups have all been updated provide test coverage for the
dRAID feature.
Co-authored-by: Isaac Huang <he.huang@intel.com>
Co-authored-by: Mark Maybee <mmaybee@cray.com>
Co-authored-by: Don Brady <don.brady@delphix.com>
Co-authored-by: Matthew Ahrens <mahrens@delphix.com>
Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Mark Maybee <mmaybee@cray.com>
Reviewed-by: Matt Ahrens <matt@delphix.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #10102
2020-11-13 21:51:51 +00:00
|
|
|
Useful as a cross-check when listing a large number of devices.
|
|
|
|
An error is returned when the provided number of children differs.
|
2021-05-27 00:46:40 +00:00
|
|
|
.It Ar spares
|
|
|
|
The number of distributed hot spares.
|
Distributed Spare (dRAID) Feature
This patch adds a new top-level vdev type called dRAID, which stands
for Distributed parity RAID. This pool configuration allows all dRAID
vdevs to participate when rebuilding to a distributed hot spare device.
This can substantially reduce the total time required to restore full
parity to pool with a failed device.
A dRAID pool can be created using the new top-level `draid` type.
Like `raidz`, the desired redundancy is specified after the type:
`draid[1,2,3]`. No additional information is required to create the
pool and reasonable default values will be chosen based on the number
of child vdevs in the dRAID vdev.
zpool create <pool> draid[1,2,3] <vdevs...>
Unlike raidz, additional optional dRAID configuration values can be
provided as part of the draid type as colon separated values. This
allows administrators to fully specify a layout for either performance
or capacity reasons. The supported options include:
zpool create <pool> \
draid[<parity>][:<data>d][:<children>c][:<spares>s] \
<vdevs...>
- draid[parity] - Parity level (default 1)
- draid[:<data>d] - Data devices per group (default 8)
- draid[:<children>c] - Expected number of child vdevs
- draid[:<spares>s] - Distributed hot spares (default 0)
Abbreviated example `zpool status` output for a 68 disk dRAID pool
with two distributed spares using special allocation classes.
```
pool: tank
state: ONLINE
config:
NAME STATE READ WRITE CKSUM
slag7 ONLINE 0 0 0
draid2:8d:68c:2s-0 ONLINE 0 0 0
L0 ONLINE 0 0 0
L1 ONLINE 0 0 0
...
U25 ONLINE 0 0 0
U26 ONLINE 0 0 0
spare-53 ONLINE 0 0 0
U27 ONLINE 0 0 0
draid2-0-0 ONLINE 0 0 0
U28 ONLINE 0 0 0
U29 ONLINE 0 0 0
...
U42 ONLINE 0 0 0
U43 ONLINE 0 0 0
special
mirror-1 ONLINE 0 0 0
L5 ONLINE 0 0 0
U5 ONLINE 0 0 0
mirror-2 ONLINE 0 0 0
L6 ONLINE 0 0 0
U6 ONLINE 0 0 0
spares
draid2-0-0 INUSE currently in use
draid2-0-1 AVAIL
```
When adding test coverage for the new dRAID vdev type the following
options were added to the ztest command. These options are leverages
by zloop.sh to test a wide range of dRAID configurations.
-K draid|raidz|random - kind of RAID to test
-D <value> - dRAID data drives per group
-S <value> - dRAID distributed hot spares
-R <value> - RAID parity (raidz or dRAID)
The zpool_create, zpool_import, redundancy, replacement and fault
test groups have all been updated provide test coverage for the
dRAID feature.
Co-authored-by: Isaac Huang <he.huang@intel.com>
Co-authored-by: Mark Maybee <mmaybee@cray.com>
Co-authored-by: Don Brady <don.brady@delphix.com>
Co-authored-by: Matthew Ahrens <mahrens@delphix.com>
Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Mark Maybee <mmaybee@cray.com>
Reviewed-by: Matt Ahrens <matt@delphix.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #10102
2020-11-13 21:51:51 +00:00
|
|
|
Defaults to zero.
|
2021-05-27 00:46:40 +00:00
|
|
|
.El
|
2019-11-13 17:21:07 +00:00
|
|
|
.It Sy spare
|
|
|
|
A pseudo-vdev which keeps track of available hot spares for a pool.
|
|
|
|
For more information, see the
|
|
|
|
.Sx Hot Spares
|
|
|
|
section.
|
|
|
|
.It Sy log
|
|
|
|
A separate intent log device.
|
|
|
|
If more than one log device is specified, then writes are load-balanced between
|
|
|
|
devices.
|
|
|
|
Log devices can be mirrored.
|
|
|
|
However, raidz vdev types are not supported for the intent log.
|
|
|
|
For more information, see the
|
|
|
|
.Sx Intent Log
|
|
|
|
section.
|
|
|
|
.It Sy dedup
|
2023-04-13 16:15:34 +00:00
|
|
|
A device solely dedicated for deduplication tables.
|
2019-11-13 17:21:07 +00:00
|
|
|
The redundancy of this device should match the redundancy of the other normal
|
2021-05-27 00:46:40 +00:00
|
|
|
devices in the pool.
|
|
|
|
If more than one dedup device is specified, then
|
2019-11-13 17:21:07 +00:00
|
|
|
allocations are load-balanced between those devices.
|
|
|
|
.It Sy special
|
|
|
|
A device dedicated solely for allocating various kinds of internal metadata,
|
|
|
|
and optionally small file blocks.
|
|
|
|
The redundancy of this device should match the redundancy of the other normal
|
2021-05-27 00:46:40 +00:00
|
|
|
devices in the pool.
|
|
|
|
If more than one special device is specified, then
|
2019-11-13 17:21:07 +00:00
|
|
|
allocations are load-balanced between those devices.
|
|
|
|
.Pp
|
|
|
|
For more information on special allocations, see the
|
|
|
|
.Sx Special Allocation Class
|
|
|
|
section.
|
|
|
|
.It Sy cache
|
|
|
|
A device used to cache storage pool data.
|
|
|
|
A cache device cannot be configured as a mirror or raidz group.
|
|
|
|
For more information, see the
|
|
|
|
.Sx Cache Devices
|
|
|
|
section.
|
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
Virtual devices cannot be nested, so a mirror or raidz virtual device can only
|
|
|
|
contain files or disks.
|
|
|
|
Mirrors of mirrors
|
|
|
|
.Pq or other combinations
|
|
|
|
are not allowed.
|
|
|
|
.Pp
|
|
|
|
A pool can have any number of virtual devices at the top of the configuration
|
|
|
|
.Po known as
|
|
|
|
.Qq root vdevs
|
|
|
|
.Pc .
|
|
|
|
Data is dynamically distributed across all top-level devices to balance data
|
|
|
|
among devices.
|
|
|
|
As new virtual devices are added, ZFS automatically places data on the newly
|
|
|
|
available devices.
|
|
|
|
.Pp
|
2021-05-27 00:46:40 +00:00
|
|
|
Virtual devices are specified one at a time on the command line,
|
|
|
|
separated by whitespace.
|
|
|
|
Keywords like
|
|
|
|
.Sy mirror No and Sy raidz
|
2019-11-13 17:21:07 +00:00
|
|
|
are used to distinguish where a group ends and another begins.
|
2021-05-27 00:46:40 +00:00
|
|
|
For example, the following creates a pool with two root vdevs,
|
|
|
|
each a mirror of two disks:
|
|
|
|
.Dl # Nm zpool Cm create Ar mypool Sy mirror Ar sda sdb Sy mirror Ar sdc sdd
|
|
|
|
.
|
2019-11-13 17:21:07 +00:00
|
|
|
.Ss Device Failure and Recovery
|
|
|
|
ZFS supports a rich set of mechanisms for handling device failure and data
|
|
|
|
corruption.
|
|
|
|
All metadata and data is checksummed, and ZFS automatically repairs bad data
|
2023-04-13 16:15:34 +00:00
|
|
|
from a good copy, when corruption is detected.
|
2019-11-13 17:21:07 +00:00
|
|
|
.Pp
|
|
|
|
In order to take advantage of these features, a pool must make use of some form
|
|
|
|
of redundancy, using either mirrored or raidz groups.
|
|
|
|
While ZFS supports running in a non-redundant configuration, where each root
|
|
|
|
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.
|
|
|
|
.Pp
|
2021-05-27 00:46:40 +00:00
|
|
|
A pool's health status is described by one of three states:
|
|
|
|
.Sy online , degraded , No or Sy faulted .
|
2019-11-13 17:21:07 +00:00
|
|
|
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
|
|
|
|
still available due to a redundant configuration.
|
|
|
|
A faulted pool has corrupted metadata, or one or more faulted devices, and
|
|
|
|
insufficient replicas to continue functioning.
|
|
|
|
.Pp
|
2021-05-27 00:46:40 +00:00
|
|
|
The health of the top-level vdev, such as a mirror or raidz device,
|
2023-04-13 16:15:34 +00:00
|
|
|
is potentially impacted by the state of its associated vdevs
|
2021-05-27 00:46:40 +00:00
|
|
|
or component devices.
|
2019-11-13 17:21:07 +00:00
|
|
|
A top-level vdev or component device is in one of the following states:
|
|
|
|
.Bl -tag -width "DEGRADED"
|
|
|
|
.It Sy DEGRADED
|
|
|
|
One or more top-level vdevs is in the degraded state because one or more
|
|
|
|
component devices are offline.
|
|
|
|
Sufficient replicas exist to continue functioning.
|
|
|
|
.Pp
|
|
|
|
One or more component devices is in the degraded or faulted state, but
|
|
|
|
sufficient replicas exist to continue functioning.
|
|
|
|
The underlying conditions are as follows:
|
2021-05-27 00:46:40 +00:00
|
|
|
.Bl -bullet -compact
|
2019-11-13 17:21:07 +00:00
|
|
|
.It
|
|
|
|
The number of checksum errors exceeds acceptable levels and the device is
|
|
|
|
degraded as an indication that something may be wrong.
|
|
|
|
ZFS continues to use the device as necessary.
|
|
|
|
.It
|
|
|
|
The number of I/O errors exceeds acceptable levels.
|
|
|
|
The device could not be marked as faulted because there are insufficient
|
|
|
|
replicas to continue functioning.
|
|
|
|
.El
|
|
|
|
.It Sy FAULTED
|
|
|
|
One or more top-level vdevs is in the faulted state because one or more
|
|
|
|
component devices are offline.
|
|
|
|
Insufficient replicas exist to continue functioning.
|
|
|
|
.Pp
|
|
|
|
One or more component devices is in the faulted state, and insufficient
|
|
|
|
replicas exist to continue functioning.
|
|
|
|
The underlying conditions are as follows:
|
2021-05-27 00:46:40 +00:00
|
|
|
.Bl -bullet -compact
|
2019-11-13 17:21:07 +00:00
|
|
|
.It
|
|
|
|
The device could be opened, but the contents did not match expected values.
|
|
|
|
.It
|
|
|
|
The number of I/O errors exceeds acceptable levels and the device is faulted to
|
|
|
|
prevent further use of the device.
|
|
|
|
.El
|
|
|
|
.It Sy OFFLINE
|
|
|
|
The device was explicitly taken offline by the
|
|
|
|
.Nm zpool Cm offline
|
|
|
|
command.
|
|
|
|
.It Sy ONLINE
|
|
|
|
The device is online and functioning.
|
|
|
|
.It Sy REMOVED
|
|
|
|
The device was physically removed while the system was running.
|
|
|
|
Device removal detection is hardware-dependent and may not be supported on all
|
|
|
|
platforms.
|
|
|
|
.It Sy UNAVAIL
|
|
|
|
The device could not be opened.
|
|
|
|
If a pool is imported when a device was unavailable, then the device will be
|
|
|
|
identified by a unique identifier instead of its path since the path was never
|
|
|
|
correct in the first place.
|
|
|
|
.El
|
|
|
|
.Pp
|
Clean up RAIDZ/DRAID ereport code
The RAIDZ and DRAID code is responsible for reporting checksum errors on
their child vdevs. Checksum errors represent events where a disk
returned data or parity that should have been correct, but was not. In
other words, these are instances of silent data corruption. The
checksum errors show up in the vdev stats (and thus `zpool status`'s
CKSUM column), and in the event log (`zpool events`).
Note, this is in contrast with the more common "noisy" errors where a
disk goes offline, in which case ZFS knows that the disk is bad and
doesn't try to read it, or the device returns an error on the requested
read or write operation.
RAIDZ/DRAID generate checksum errors via three code paths:
1. When RAIDZ/DRAID reconstructs a damaged block, checksum errors are
reported on any children whose data was not used during the
reconstruction. This is handled in `raidz_reconstruct()`. This is the
most common type of RAIDZ/DRAID checksum error.
2. When RAIDZ/DRAID is not able to reconstruct a damaged block, that
means that the data has been lost. The zio fails and an error is
returned to the consumer (e.g. the read(2) system call). This would
happen if, for example, three different disks in a RAIDZ2 group are
silently damaged. Since the damage is silent, it isn't possible to know
which three disks are damaged, so a checksum error is reported against
every child that returned data or parity for this read. (For DRAID,
typically only one "group" of children is involved in each io.) This
case is handled in `vdev_raidz_cksum_finish()`. This is the next most
common type of RAIDZ/DRAID checksum error.
3. If RAIDZ/DRAID is not able to reconstruct a damaged block (like in
case 2), but there happens to be additional copies of this block due to
"ditto blocks" (i.e. multiple DVA's in this blkptr_t), and one of those
copies is good, then RAIDZ/DRAID compares each sector of the data or
parity that it retrieved with the good data from the other DVA, and if
they differ then it reports a checksum error on this child. This
differs from case 2 in that the checksum error is reported on only the
subset of children that actually have bad data or parity. This case
happens very rarely, since normally only metadata has ditto blocks. If
the silent damage is extensive, there will be many instances of case 2,
and the pool will likely be unrecoverable.
The code for handling case 3 is considerably more complicated than the
other cases, for two reasons:
1. It needs to run after the main raidz read logic has completed. The
data RAIDZ read needs to be preserved until after the alternate DVA has
been read, which necessitates refcounts and callbacks managed by the
non-raidz-specific zio layer.
2. It's nontrivial to map the sections of data read by RAIDZ to the
correct data. For example, the correct data does not include the parity
information, so the parity must be recalculated based on the correct
data, and then compared to the parity that was read from the RAIDZ
children.
Due to the complexity of case 3, the rareness of hitting it, and the
minimal benefit it provides above case 2, this commit removes the code
for case 3. These types of errors will now be handled the same as case
2, i.e. the checksum error will be reported against all children that
returned data or parity.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matthew Ahrens <mahrens@delphix.com>
Closes #11735
2021-03-19 23:22:10 +00:00
|
|
|
Checksum errors represent events where a disk returned data that was expected
|
|
|
|
to be correct, but was not.
|
|
|
|
In other words, these are instances of silent data corruption.
|
|
|
|
The checksum errors are reported in
|
|
|
|
.Nm zpool Cm status
|
|
|
|
and
|
|
|
|
.Nm zpool Cm events .
|
|
|
|
When a block is stored redundantly, a damaged block may be reconstructed
|
2021-05-27 00:46:40 +00:00
|
|
|
(e.g. from raidz parity or a mirrored copy).
|
Clean up RAIDZ/DRAID ereport code
The RAIDZ and DRAID code is responsible for reporting checksum errors on
their child vdevs. Checksum errors represent events where a disk
returned data or parity that should have been correct, but was not. In
other words, these are instances of silent data corruption. The
checksum errors show up in the vdev stats (and thus `zpool status`'s
CKSUM column), and in the event log (`zpool events`).
Note, this is in contrast with the more common "noisy" errors where a
disk goes offline, in which case ZFS knows that the disk is bad and
doesn't try to read it, or the device returns an error on the requested
read or write operation.
RAIDZ/DRAID generate checksum errors via three code paths:
1. When RAIDZ/DRAID reconstructs a damaged block, checksum errors are
reported on any children whose data was not used during the
reconstruction. This is handled in `raidz_reconstruct()`. This is the
most common type of RAIDZ/DRAID checksum error.
2. When RAIDZ/DRAID is not able to reconstruct a damaged block, that
means that the data has been lost. The zio fails and an error is
returned to the consumer (e.g. the read(2) system call). This would
happen if, for example, three different disks in a RAIDZ2 group are
silently damaged. Since the damage is silent, it isn't possible to know
which three disks are damaged, so a checksum error is reported against
every child that returned data or parity for this read. (For DRAID,
typically only one "group" of children is involved in each io.) This
case is handled in `vdev_raidz_cksum_finish()`. This is the next most
common type of RAIDZ/DRAID checksum error.
3. If RAIDZ/DRAID is not able to reconstruct a damaged block (like in
case 2), but there happens to be additional copies of this block due to
"ditto blocks" (i.e. multiple DVA's in this blkptr_t), and one of those
copies is good, then RAIDZ/DRAID compares each sector of the data or
parity that it retrieved with the good data from the other DVA, and if
they differ then it reports a checksum error on this child. This
differs from case 2 in that the checksum error is reported on only the
subset of children that actually have bad data or parity. This case
happens very rarely, since normally only metadata has ditto blocks. If
the silent damage is extensive, there will be many instances of case 2,
and the pool will likely be unrecoverable.
The code for handling case 3 is considerably more complicated than the
other cases, for two reasons:
1. It needs to run after the main raidz read logic has completed. The
data RAIDZ read needs to be preserved until after the alternate DVA has
been read, which necessitates refcounts and callbacks managed by the
non-raidz-specific zio layer.
2. It's nontrivial to map the sections of data read by RAIDZ to the
correct data. For example, the correct data does not include the parity
information, so the parity must be recalculated based on the correct
data, and then compared to the parity that was read from the RAIDZ
children.
Due to the complexity of case 3, the rareness of hitting it, and the
minimal benefit it provides above case 2, this commit removes the code
for case 3. These types of errors will now be handled the same as case
2, i.e. the checksum error will be reported against all children that
returned data or parity.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matthew Ahrens <mahrens@delphix.com>
Closes #11735
2021-03-19 23:22:10 +00:00
|
|
|
In this case, ZFS reports the checksum error against the disks that contained
|
|
|
|
damaged data.
|
|
|
|
If a block is unable to be reconstructed (e.g. due to 3 disks being damaged
|
2021-05-27 00:46:40 +00:00
|
|
|
in a raidz2 group), it is not possible to determine which disks were silently
|
Clean up RAIDZ/DRAID ereport code
The RAIDZ and DRAID code is responsible for reporting checksum errors on
their child vdevs. Checksum errors represent events where a disk
returned data or parity that should have been correct, but was not. In
other words, these are instances of silent data corruption. The
checksum errors show up in the vdev stats (and thus `zpool status`'s
CKSUM column), and in the event log (`zpool events`).
Note, this is in contrast with the more common "noisy" errors where a
disk goes offline, in which case ZFS knows that the disk is bad and
doesn't try to read it, or the device returns an error on the requested
read or write operation.
RAIDZ/DRAID generate checksum errors via three code paths:
1. When RAIDZ/DRAID reconstructs a damaged block, checksum errors are
reported on any children whose data was not used during the
reconstruction. This is handled in `raidz_reconstruct()`. This is the
most common type of RAIDZ/DRAID checksum error.
2. When RAIDZ/DRAID is not able to reconstruct a damaged block, that
means that the data has been lost. The zio fails and an error is
returned to the consumer (e.g. the read(2) system call). This would
happen if, for example, three different disks in a RAIDZ2 group are
silently damaged. Since the damage is silent, it isn't possible to know
which three disks are damaged, so a checksum error is reported against
every child that returned data or parity for this read. (For DRAID,
typically only one "group" of children is involved in each io.) This
case is handled in `vdev_raidz_cksum_finish()`. This is the next most
common type of RAIDZ/DRAID checksum error.
3. If RAIDZ/DRAID is not able to reconstruct a damaged block (like in
case 2), but there happens to be additional copies of this block due to
"ditto blocks" (i.e. multiple DVA's in this blkptr_t), and one of those
copies is good, then RAIDZ/DRAID compares each sector of the data or
parity that it retrieved with the good data from the other DVA, and if
they differ then it reports a checksum error on this child. This
differs from case 2 in that the checksum error is reported on only the
subset of children that actually have bad data or parity. This case
happens very rarely, since normally only metadata has ditto blocks. If
the silent damage is extensive, there will be many instances of case 2,
and the pool will likely be unrecoverable.
The code for handling case 3 is considerably more complicated than the
other cases, for two reasons:
1. It needs to run after the main raidz read logic has completed. The
data RAIDZ read needs to be preserved until after the alternate DVA has
been read, which necessitates refcounts and callbacks managed by the
non-raidz-specific zio layer.
2. It's nontrivial to map the sections of data read by RAIDZ to the
correct data. For example, the correct data does not include the parity
information, so the parity must be recalculated based on the correct
data, and then compared to the parity that was read from the RAIDZ
children.
Due to the complexity of case 3, the rareness of hitting it, and the
minimal benefit it provides above case 2, this commit removes the code
for case 3. These types of errors will now be handled the same as case
2, i.e. the checksum error will be reported against all children that
returned data or parity.
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matthew Ahrens <mahrens@delphix.com>
Closes #11735
2021-03-19 23:22:10 +00:00
|
|
|
corrupted.
|
|
|
|
In this case, checksum errors are reported for all disks on which the block
|
|
|
|
is stored.
|
|
|
|
.Pp
|
2021-05-27 00:46:40 +00:00
|
|
|
If a device is removed and later re-attached to the system,
|
2023-04-13 16:15:34 +00:00
|
|
|
ZFS attempts to bring the device online automatically.
|
2021-05-27 00:46:40 +00:00
|
|
|
Device attachment detection is hardware-dependent
|
|
|
|
and might not be supported on all platforms.
|
|
|
|
.
|
2019-11-13 17:21:07 +00:00
|
|
|
.Ss Hot Spares
|
|
|
|
ZFS allows devices to be associated with pools as
|
|
|
|
.Qq hot spares .
|
2023-04-13 16:15:34 +00:00
|
|
|
These devices are not actively used in the pool.
|
|
|
|
But, when an active device
|
2019-11-13 17:21:07 +00:00
|
|
|
fails, it is automatically replaced by a hot spare.
|
|
|
|
To create a pool with hot spares, specify a
|
|
|
|
.Sy spare
|
|
|
|
vdev with any number of devices.
|
|
|
|
For example,
|
2021-05-27 00:46:40 +00:00
|
|
|
.Dl # Nm zpool Cm create Ar pool Sy mirror Ar sda sdb Sy spare Ar sdc sdd
|
2019-11-13 17:21:07 +00:00
|
|
|
.Pp
|
|
|
|
Spares can be shared across multiple pools, and can be added with the
|
|
|
|
.Nm zpool Cm add
|
|
|
|
command and removed with the
|
|
|
|
.Nm zpool Cm remove
|
|
|
|
command.
|
|
|
|
Once a spare replacement is initiated, a new
|
|
|
|
.Sy spare
|
|
|
|
vdev is created within the configuration that will remain there until the
|
|
|
|
original device is replaced.
|
2023-04-13 16:15:34 +00:00
|
|
|
At this point, the hot spare becomes available again, if another device fails.
|
2019-11-13 17:21:07 +00:00
|
|
|
.Pp
|
2023-04-13 16:15:34 +00:00
|
|
|
If a pool has a shared spare that is currently being used, the pool cannot be
|
|
|
|
exported, since other pools may use this shared spare, which may lead to
|
2019-11-13 17:21:07 +00:00
|
|
|
potential data corruption.
|
|
|
|
.Pp
|
2021-05-27 00:46:40 +00:00
|
|
|
Shared spares add some risk.
|
|
|
|
If the pools are imported on different hosts,
|
|
|
|
and both pools suffer a device failure at the same time,
|
|
|
|
both could attempt to use the spare at the same time.
|
|
|
|
This may not be detected, resulting in data corruption.
|
2019-11-13 17:21:07 +00:00
|
|
|
.Pp
|
|
|
|
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
|
|
|
|
place in the configuration, and is removed from the spare list of all active
|
|
|
|
pools.
|
|
|
|
.Pp
|
Distributed Spare (dRAID) Feature
This patch adds a new top-level vdev type called dRAID, which stands
for Distributed parity RAID. This pool configuration allows all dRAID
vdevs to participate when rebuilding to a distributed hot spare device.
This can substantially reduce the total time required to restore full
parity to pool with a failed device.
A dRAID pool can be created using the new top-level `draid` type.
Like `raidz`, the desired redundancy is specified after the type:
`draid[1,2,3]`. No additional information is required to create the
pool and reasonable default values will be chosen based on the number
of child vdevs in the dRAID vdev.
zpool create <pool> draid[1,2,3] <vdevs...>
Unlike raidz, additional optional dRAID configuration values can be
provided as part of the draid type as colon separated values. This
allows administrators to fully specify a layout for either performance
or capacity reasons. The supported options include:
zpool create <pool> \
draid[<parity>][:<data>d][:<children>c][:<spares>s] \
<vdevs...>
- draid[parity] - Parity level (default 1)
- draid[:<data>d] - Data devices per group (default 8)
- draid[:<children>c] - Expected number of child vdevs
- draid[:<spares>s] - Distributed hot spares (default 0)
Abbreviated example `zpool status` output for a 68 disk dRAID pool
with two distributed spares using special allocation classes.
```
pool: tank
state: ONLINE
config:
NAME STATE READ WRITE CKSUM
slag7 ONLINE 0 0 0
draid2:8d:68c:2s-0 ONLINE 0 0 0
L0 ONLINE 0 0 0
L1 ONLINE 0 0 0
...
U25 ONLINE 0 0 0
U26 ONLINE 0 0 0
spare-53 ONLINE 0 0 0
U27 ONLINE 0 0 0
draid2-0-0 ONLINE 0 0 0
U28 ONLINE 0 0 0
U29 ONLINE 0 0 0
...
U42 ONLINE 0 0 0
U43 ONLINE 0 0 0
special
mirror-1 ONLINE 0 0 0
L5 ONLINE 0 0 0
U5 ONLINE 0 0 0
mirror-2 ONLINE 0 0 0
L6 ONLINE 0 0 0
U6 ONLINE 0 0 0
spares
draid2-0-0 INUSE currently in use
draid2-0-1 AVAIL
```
When adding test coverage for the new dRAID vdev type the following
options were added to the ztest command. These options are leverages
by zloop.sh to test a wide range of dRAID configurations.
-K draid|raidz|random - kind of RAID to test
-D <value> - dRAID data drives per group
-S <value> - dRAID distributed hot spares
-R <value> - RAID parity (raidz or dRAID)
The zpool_create, zpool_import, redundancy, replacement and fault
test groups have all been updated provide test coverage for the
dRAID feature.
Co-authored-by: Isaac Huang <he.huang@intel.com>
Co-authored-by: Mark Maybee <mmaybee@cray.com>
Co-authored-by: Don Brady <don.brady@delphix.com>
Co-authored-by: Matthew Ahrens <mahrens@delphix.com>
Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Mark Maybee <mmaybee@cray.com>
Reviewed-by: Matt Ahrens <matt@delphix.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #10102
2020-11-13 21:51:51 +00:00
|
|
|
The
|
|
|
|
.Sy draid
|
|
|
|
vdev type provides distributed hot spares.
|
2021-05-27 00:46:40 +00:00
|
|
|
These hot spares are named after the dRAID vdev they're a part of
|
|
|
|
.Po Sy draid1 Ns - Ns Ar 2 Ns - Ns Ar 3 No specifies spare Ar 3 No of vdev Ar 2 ,
|
|
|
|
.No which is a single parity dRAID Pc
|
|
|
|
and may only be used by that dRAID vdev.
|
Distributed Spare (dRAID) Feature
This patch adds a new top-level vdev type called dRAID, which stands
for Distributed parity RAID. This pool configuration allows all dRAID
vdevs to participate when rebuilding to a distributed hot spare device.
This can substantially reduce the total time required to restore full
parity to pool with a failed device.
A dRAID pool can be created using the new top-level `draid` type.
Like `raidz`, the desired redundancy is specified after the type:
`draid[1,2,3]`. No additional information is required to create the
pool and reasonable default values will be chosen based on the number
of child vdevs in the dRAID vdev.
zpool create <pool> draid[1,2,3] <vdevs...>
Unlike raidz, additional optional dRAID configuration values can be
provided as part of the draid type as colon separated values. This
allows administrators to fully specify a layout for either performance
or capacity reasons. The supported options include:
zpool create <pool> \
draid[<parity>][:<data>d][:<children>c][:<spares>s] \
<vdevs...>
- draid[parity] - Parity level (default 1)
- draid[:<data>d] - Data devices per group (default 8)
- draid[:<children>c] - Expected number of child vdevs
- draid[:<spares>s] - Distributed hot spares (default 0)
Abbreviated example `zpool status` output for a 68 disk dRAID pool
with two distributed spares using special allocation classes.
```
pool: tank
state: ONLINE
config:
NAME STATE READ WRITE CKSUM
slag7 ONLINE 0 0 0
draid2:8d:68c:2s-0 ONLINE 0 0 0
L0 ONLINE 0 0 0
L1 ONLINE 0 0 0
...
U25 ONLINE 0 0 0
U26 ONLINE 0 0 0
spare-53 ONLINE 0 0 0
U27 ONLINE 0 0 0
draid2-0-0 ONLINE 0 0 0
U28 ONLINE 0 0 0
U29 ONLINE 0 0 0
...
U42 ONLINE 0 0 0
U43 ONLINE 0 0 0
special
mirror-1 ONLINE 0 0 0
L5 ONLINE 0 0 0
U5 ONLINE 0 0 0
mirror-2 ONLINE 0 0 0
L6 ONLINE 0 0 0
U6 ONLINE 0 0 0
spares
draid2-0-0 INUSE currently in use
draid2-0-1 AVAIL
```
When adding test coverage for the new dRAID vdev type the following
options were added to the ztest command. These options are leverages
by zloop.sh to test a wide range of dRAID configurations.
-K draid|raidz|random - kind of RAID to test
-D <value> - dRAID data drives per group
-S <value> - dRAID distributed hot spares
-R <value> - RAID parity (raidz or dRAID)
The zpool_create, zpool_import, redundancy, replacement and fault
test groups have all been updated provide test coverage for the
dRAID feature.
Co-authored-by: Isaac Huang <he.huang@intel.com>
Co-authored-by: Mark Maybee <mmaybee@cray.com>
Co-authored-by: Don Brady <don.brady@delphix.com>
Co-authored-by: Matthew Ahrens <mahrens@delphix.com>
Co-authored-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Mark Maybee <mmaybee@cray.com>
Reviewed-by: Matt Ahrens <matt@delphix.com>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #10102
2020-11-13 21:51:51 +00:00
|
|
|
Otherwise, they behave the same as normal hot spares.
|
|
|
|
.Pp
|
2019-11-13 17:21:07 +00:00
|
|
|
Spares cannot replace log devices.
|
2021-05-27 00:46:40 +00:00
|
|
|
.
|
2019-11-13 17:21:07 +00:00
|
|
|
.Ss Intent Log
|
|
|
|
The ZFS Intent Log (ZIL) satisfies POSIX requirements for synchronous
|
|
|
|
transactions.
|
|
|
|
For instance, databases often require their transactions to be on stable storage
|
|
|
|
devices when returning from a system call.
|
|
|
|
NFS and other applications can also use
|
|
|
|
.Xr fsync 2
|
|
|
|
to ensure data stability.
|
|
|
|
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
|
|
|
|
log devices such as NVRAM or a dedicated disk.
|
|
|
|
For example:
|
2021-05-27 00:46:40 +00:00
|
|
|
.Dl # Nm zpool Cm create Ar pool sda sdb Sy log Ar sdc
|
2019-11-13 17:21:07 +00:00
|
|
|
.Pp
|
|
|
|
Multiple log devices can also be specified, and they can be mirrored.
|
|
|
|
See the
|
|
|
|
.Sx EXAMPLES
|
|
|
|
section for an example of mirroring multiple log devices.
|
|
|
|
.Pp
|
2023-04-13 16:15:34 +00:00
|
|
|
Log devices can be added, replaced, attached, detached, and removed.
|
2021-05-27 00:46:40 +00:00
|
|
|
In addition, log devices are imported and exported as part of the pool
|
2019-11-13 17:21:07 +00:00
|
|
|
that contains them.
|
|
|
|
Mirrored devices can be removed by specifying the top-level mirror vdev.
|
2021-05-27 00:46:40 +00:00
|
|
|
.
|
2019-11-13 17:21:07 +00:00
|
|
|
.Ss Cache Devices
|
|
|
|
Devices can be added to a storage pool as
|
|
|
|
.Qq cache devices .
|
|
|
|
These devices provide an additional layer of caching between main memory and
|
|
|
|
disk.
|
|
|
|
For read-heavy workloads, where the working set size is much larger than what
|
2021-05-27 00:46:40 +00:00
|
|
|
can be cached in main memory, using cache devices allows much more of this
|
2019-11-13 17:21:07 +00:00
|
|
|
working set to be served from low latency media.
|
|
|
|
Using cache devices provides the greatest performance improvement for random
|
|
|
|
read-workloads of mostly static content.
|
|
|
|
.Pp
|
|
|
|
To create a pool with cache devices, specify a
|
|
|
|
.Sy cache
|
|
|
|
vdev with any number of devices.
|
|
|
|
For example:
|
2021-05-27 00:46:40 +00:00
|
|
|
.Dl # Nm zpool Cm create Ar pool sda sdb Sy cache Ar sdc sdd
|
2019-11-13 17:21:07 +00:00
|
|
|
.Pp
|
|
|
|
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
|
|
|
|
the original storage pool device, which might be part of a mirrored or raidz
|
|
|
|
configuration.
|
|
|
|
.Pp
|
2020-04-10 17:33:35 +00:00
|
|
|
The content of the cache devices is persistent across reboots and restored
|
|
|
|
asynchronously when importing the pool in L2ARC (persistent L2ARC).
|
|
|
|
This can be disabled by setting
|
2021-05-27 00:46:40 +00:00
|
|
|
.Sy l2arc_rebuild_enabled Ns = Ns Sy 0 .
|
|
|
|
For cache devices smaller than
|
2022-05-03 12:07:04 +00:00
|
|
|
.Em 1 GiB ,
|
2023-04-13 16:15:34 +00:00
|
|
|
ZFS does not write the metadata structures
|
|
|
|
required for rebuilding the L2ARC, to conserve space.
|
2021-05-27 00:46:40 +00:00
|
|
|
This can be changed with
|
2020-04-10 17:33:35 +00:00
|
|
|
.Sy l2arc_rebuild_blocks_min_l2size .
|
2021-05-27 00:46:40 +00:00
|
|
|
The cache device header
|
2022-05-03 12:07:04 +00:00
|
|
|
.Pq Em 512 B
|
2021-05-27 00:46:40 +00:00
|
|
|
is updated even if no metadata structures are written.
|
|
|
|
Setting
|
|
|
|
.Sy l2arc_headroom Ns = Ns Sy 0
|
2020-04-10 17:33:35 +00:00
|
|
|
will result in scanning the full-length ARC lists for cacheable content to be
|
2021-05-27 00:46:40 +00:00
|
|
|
written in L2ARC (persistent ARC).
|
|
|
|
If a cache device is added with
|
2023-04-13 16:15:34 +00:00
|
|
|
.Nm zpool Cm add ,
|
|
|
|
its label and header will be overwritten and its contents will not be
|
2021-05-27 00:46:40 +00:00
|
|
|
restored in L2ARC, even if the device was previously part of the pool.
|
|
|
|
If a cache device is onlined with
|
2023-04-13 16:15:34 +00:00
|
|
|
.Nm zpool Cm online ,
|
2021-05-27 00:46:40 +00:00
|
|
|
its contents will be restored in L2ARC.
|
2023-04-13 16:15:34 +00:00
|
|
|
This is useful in case of memory pressure,
|
2020-04-10 17:33:35 +00:00
|
|
|
where the contents of the cache device are not fully restored in L2ARC.
|
2023-04-13 16:15:34 +00:00
|
|
|
The user can off- and online the cache device when there is less memory
|
|
|
|
pressure, to fully restore its contents to L2ARC.
|
2021-05-27 00:46:40 +00:00
|
|
|
.
|
2019-11-13 17:21:07 +00:00
|
|
|
.Ss Pool checkpoint
|
2021-05-27 00:46:40 +00:00
|
|
|
Before starting critical procedures that include destructive actions
|
|
|
|
.Pq like Nm zfs Cm destroy ,
|
2023-04-13 16:15:34 +00:00
|
|
|
an administrator can checkpoint the pool's state and, in the case of a
|
2019-11-13 17:21:07 +00:00
|
|
|
mistake or failure, rewind the entire pool back to the checkpoint.
|
|
|
|
Otherwise, the checkpoint can be discarded when the procedure has completed
|
|
|
|
successfully.
|
|
|
|
.Pp
|
|
|
|
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
|
|
|
|
configuration.
|
2021-05-27 00:46:40 +00:00
|
|
|
Thus, certain operations are not allowed while a pool has a checkpoint.
|
2019-11-13 17:21:07 +00:00
|
|
|
Specifically, vdev removal/attach/detach, mirror splitting, and
|
2021-05-27 00:46:40 +00:00
|
|
|
changing the pool's GUID.
|
|
|
|
Adding a new vdev is supported, but in the case of a rewind it will have to be
|
2019-11-13 17:21:07 +00:00
|
|
|
added again.
|
|
|
|
Finally, users of this feature should keep in mind that scrubs in a pool that
|
|
|
|
has a checkpoint do not repair checkpointed data.
|
|
|
|
.Pp
|
|
|
|
To create a checkpoint for a pool:
|
2021-05-27 00:46:40 +00:00
|
|
|
.Dl # Nm zpool Cm checkpoint Ar pool
|
2019-11-13 17:21:07 +00:00
|
|
|
.Pp
|
|
|
|
To later rewind to its checkpointed state, you need to first export it and
|
|
|
|
then rewind it during import:
|
2021-05-27 00:46:40 +00:00
|
|
|
.Dl # Nm zpool Cm export Ar pool
|
|
|
|
.Dl # Nm zpool Cm import Fl -rewind-to-checkpoint Ar pool
|
2019-11-13 17:21:07 +00:00
|
|
|
.Pp
|
|
|
|
To discard the checkpoint from a pool:
|
2021-05-27 00:46:40 +00:00
|
|
|
.Dl # Nm zpool Cm checkpoint Fl d Ar pool
|
2019-11-13 17:21:07 +00:00
|
|
|
.Pp
|
|
|
|
Dataset reservations (controlled by the
|
2021-05-27 00:46:40 +00:00
|
|
|
.Sy reservation No and Sy refreservation
|
|
|
|
properties) may be unenforceable while a checkpoint exists, because the
|
2019-11-13 17:21:07 +00:00
|
|
|
checkpoint is allowed to consume the dataset's reservation.
|
|
|
|
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.
|
2021-05-27 00:46:40 +00:00
|
|
|
.
|
2019-11-13 17:21:07 +00:00
|
|
|
.Ss Special Allocation Class
|
2021-05-27 00:46:40 +00:00
|
|
|
Allocations in the special class are dedicated to specific block types.
|
2023-04-13 16:15:34 +00:00
|
|
|
By default, this includes all metadata, the indirect blocks of user data, and
|
2021-05-27 00:46:40 +00:00
|
|
|
any deduplication tables.
|
|
|
|
The class can also be provisioned to accept small file blocks.
|
|
|
|
.Pp
|
|
|
|
A pool must always have at least one normal
|
|
|
|
.Pq non- Ns Sy dedup Ns /- Ns Sy special
|
|
|
|
vdev before
|
|
|
|
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.
|
2019-11-13 17:21:07 +00:00
|
|
|
.Pp
|
2021-05-27 00:46:40 +00:00
|
|
|
Deduplication tables can be excluded from the special class by unsetting the
|
2019-11-13 17:21:07 +00:00
|
|
|
.Sy zfs_ddt_data_is_special
|
2021-05-27 00:46:40 +00:00
|
|
|
ZFS module parameter.
|
2019-11-13 17:21:07 +00:00
|
|
|
.Pp
|
2021-05-27 00:46:40 +00:00
|
|
|
Inclusion of small file blocks in the special class is opt-in.
|
|
|
|
Each dataset can control the size of small file blocks allowed
|
|
|
|
in the special class by setting the
|
2019-11-13 17:21:07 +00:00
|
|
|
.Sy special_small_blocks
|
2021-05-27 00:46:40 +00:00
|
|
|
property to nonzero.
|
|
|
|
See
|
2021-06-04 20:29:26 +00:00
|
|
|
.Xr zfsprops 7
|
2021-05-27 00:46:40 +00:00
|
|
|
for more info on this property.
|