xref: /freebsd/sys/contrib/openzfs/man/man7/vdevprops.7 (revision 61145dc2b94f12f6a47344fb9aac702321880e43)
1*61145dc2SMartin Matuska.\" SPDX-License-Identifier: CDDL-1.0
2681ce946SMartin Matuska.\"
3681ce946SMartin Matuska.\" CDDL HEADER START
4681ce946SMartin Matuska.\"
5681ce946SMartin Matuska.\" The contents of this file are subject to the terms of the
6681ce946SMartin Matuska.\" Common Development and Distribution License (the "License").
7681ce946SMartin Matuska.\" You may not use this file except in compliance with the License.
8681ce946SMartin Matuska.\"
9681ce946SMartin Matuska.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10271171e0SMartin Matuska.\" or https://opensource.org/licenses/CDDL-1.0.
11681ce946SMartin Matuska.\" See the License for the specific language governing permissions
12681ce946SMartin Matuska.\" and limitations under the License.
13681ce946SMartin Matuska.\"
14681ce946SMartin Matuska.\" When distributing Covered Code, include this CDDL HEADER in each
15681ce946SMartin Matuska.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16681ce946SMartin Matuska.\" If applicable, add the following below this CDDL HEADER, with the
17681ce946SMartin Matuska.\" fields enclosed by brackets "[]" replaced with your own identifying
18681ce946SMartin Matuska.\" information: Portions Copyright [yyyy] [name of copyright owner]
19681ce946SMartin Matuska.\"
20681ce946SMartin Matuska.\" CDDL HEADER END
21681ce946SMartin Matuska.\"
22681ce946SMartin Matuska.\" Copyright (c) 2021 Klara, Inc.
23681ce946SMartin Matuska.\"
24dbd5678dSMartin Matuska.Dd October 30, 2022
25681ce946SMartin Matuska.Dt VDEVPROPS 7
26681ce946SMartin Matuska.Os
27681ce946SMartin Matuska.
28681ce946SMartin Matuska.Sh NAME
29681ce946SMartin Matuska.Nm vdevprops
30681ce946SMartin Matuska.Nd native and user-defined properties of ZFS vdevs
31681ce946SMartin Matuska.
32681ce946SMartin Matuska.Sh DESCRIPTION
33681ce946SMartin MatuskaProperties are divided into two types, native properties and user-defined
34681ce946SMartin Matuska.Pq or Qq user
35681ce946SMartin Matuskaproperties.
36681ce946SMartin MatuskaNative properties either export internal statistics or control ZFS behavior.
37681ce946SMartin MatuskaIn addition, native properties are either editable or read-only.
38681ce946SMartin MatuskaUser properties have no effect on ZFS behavior, but you can use them to annotate
39681ce946SMartin Matuskavdevs in a way that is meaningful in your environment.
40681ce946SMartin MatuskaFor more information about user properties, see the
41681ce946SMartin Matuska.Sx User Properties
42681ce946SMartin Matuskasection, below.
43681ce946SMartin Matuska.
44681ce946SMartin Matuska.Ss Native Properties
45681ce946SMartin MatuskaEvery vdev has a set of properties that export statistics about the vdev
46681ce946SMartin Matuskaas well as control various behaviors.
4715f0b8c3SMartin MatuskaProperties are not inherited from top-level vdevs, with the exception of
48e2257b31SMartin Matuskachecksum_n, checksum_t, io_n, io_t, slow_io_n, and slow_io_t.
49681ce946SMartin Matuska.Pp
50681ce946SMartin MatuskaThe values of numeric properties can be specified using human-readable suffixes
51681ce946SMartin Matuska.Po for example,
52681ce946SMartin Matuska.Sy k , KB , M , Gb ,
53681ce946SMartin Matuskaand so forth, up to
54681ce946SMartin Matuska.Sy Z
55681ce946SMartin Matuskafor zettabyte
56681ce946SMartin Matuska.Pc .
57681ce946SMartin MatuskaThe following are all valid
58681ce946SMartin Matuska.Pq and equal
59681ce946SMartin Matuskaspecifications:
60681ce946SMartin Matuska.Li 1536M , 1.5g , 1.50GB .
61681ce946SMartin Matuska.Pp
62681ce946SMartin MatuskaThe values of non-numeric properties are case sensitive and must be lowercase.
63681ce946SMartin Matuska.Pp
64681ce946SMartin MatuskaThe following native properties consist of read-only statistics about the
65681ce946SMartin Matuskavdev.
66681ce946SMartin MatuskaThese properties can not be changed.
67681ce946SMartin Matuska.Bl -tag -width "fragmentation"
68681ce946SMartin Matuska.It Sy capacity
69681ce946SMartin MatuskaPercentage of vdev space used
70681ce946SMartin Matuska.It Sy state
71681ce946SMartin Matuskastate of this vdev such as online, faulted, or offline
72681ce946SMartin Matuska.It Sy guid
73e92ffd9bSMartin Matuskaglobally unique id of this vdev
74681ce946SMartin Matuska.It Sy asize
75*61145dc2SMartin MatuskaThe allocatable size of this vdev
76681ce946SMartin Matuska.It Sy psize
77681ce946SMartin MatuskaThe physical size of this vdev
78681ce946SMartin Matuska.It Sy ashift
79681ce946SMartin MatuskaThe physical sector size of this vdev expressed as the power of two
80681ce946SMartin Matuska.It Sy size
81681ce946SMartin MatuskaThe total size of this vdev
82681ce946SMartin Matuska.It Sy free
83681ce946SMartin MatuskaThe amount of remaining free space on this vdev
84681ce946SMartin Matuska.It Sy allocated
85681ce946SMartin MatuskaThe amount of allocated space on this vdev
86681ce946SMartin Matuska.It Sy expandsize
87681ce946SMartin MatuskaHow much this vdev can expand by
88681ce946SMartin Matuska.It Sy fragmentation
89681ce946SMartin MatuskaPercent of fragmentation in this vdev
90681ce946SMartin Matuska.It Sy parity
91681ce946SMartin MatuskaThe level of parity for this vdev
92681ce946SMartin Matuska.It Sy devid
93681ce946SMartin MatuskaThe device id for this vdev
94681ce946SMartin Matuska.It Sy physpath
95681ce946SMartin MatuskaThe physical path to the device
96681ce946SMartin Matuska.It Sy encpath
97681ce946SMartin MatuskaThe enclosure path to the device
98681ce946SMartin Matuska.It Sy fru
99*61145dc2SMartin MatuskaField Replaceable Unit, usually a model number
100681ce946SMartin Matuska.It Sy parent
101681ce946SMartin MatuskaParent of this vdev
102681ce946SMartin Matuska.It Sy children
103681ce946SMartin MatuskaComma separated list of children of this vdev
104681ce946SMartin Matuska.It Sy numchildren
105681ce946SMartin MatuskaThe number of children belonging to this vdev
106ce4dcb97SMartin Matuska.It Sy read_errors , write_errors , checksum_errors , initialize_errors , trim_errors
107681ce946SMartin MatuskaThe number of errors of each type encountered by this vdev
108ce4dcb97SMartin Matuska.It Sy slow_ios
109ce4dcb97SMartin MatuskaThe number of slow I/Os encountered by this vdev,
110ce4dcb97SMartin MatuskaThese represent I/O operations that didn't complete in
111ce4dcb97SMartin Matuska.Sy zio_slow_io_ms
112ce4dcb97SMartin Matuskamilliseconds
113ce4dcb97SMartin Matuska.Pq Sy 30000 No by default .
114681ce946SMartin Matuska.It Sy null_ops , read_ops , write_ops , free_ops , claim_ops , trim_ops
115681ce946SMartin MatuskaThe number of I/O operations of each type performed by this vdev
116681ce946SMartin Matuska.It Xo
117681ce946SMartin Matuska.Sy null_bytes , read_bytes , write_bytes , free_bytes , claim_bytes ,
118681ce946SMartin Matuska.Sy trim_bytes
119681ce946SMartin Matuska.Xc
120681ce946SMartin MatuskaThe cumulative size of all operations of each type performed by this vdev
121681ce946SMartin Matuska.It Sy removing
122681ce946SMartin MatuskaIf this device is currently being removed from the pool
123ce4dcb97SMartin Matuska.It Sy trim_support
124ce4dcb97SMartin MatuskaIndicates if a leaf device supports trim operations.
125681ce946SMartin Matuska.El
126681ce946SMartin Matuska.Pp
12715f0b8c3SMartin MatuskaThe following native properties can be used to change the behavior of a vdev.
128681ce946SMartin Matuska.Bl -tag -width "allocating"
129e2257b31SMartin Matuska.It Sy checksum_n , checksum_t , io_n , io_t , slow_io_n , slow_io_t
13015f0b8c3SMartin MatuskaTune the fault management daemon by specifying checksum/io thresholds of <N>
13115f0b8c3SMartin Matuskaerrors in <T> seconds, respectively.
13215f0b8c3SMartin MatuskaThese properties can be set on leaf and top-level vdevs.
13315f0b8c3SMartin MatuskaWhen the property is set on the leaf and top-level vdev, the value of the leaf
13415f0b8c3SMartin Matuskavdev will be used.
13515f0b8c3SMartin MatuskaIf the property is only set on the top-level vdev, this value will be used.
13615f0b8c3SMartin MatuskaThe value of these properties do not persist across vdev replacement.
13715f0b8c3SMartin MatuskaFor this reason, it is advisable to set the property on the top-level vdev -
13815f0b8c3SMartin Matuskanot on the leaf vdev itself.
1391719886fSMartin MatuskaThe default values for
1401719886fSMartin Matuska.Sy OpenZFS on Linux
1411719886fSMartin Matuskaare 10 errors in 600 seconds.
1421719886fSMartin MatuskaFor
1431719886fSMartin Matuska.Sy OpenZFS on FreeBSD
1441719886fSMartin Matuskadefaults see
1451719886fSMartin Matuska.Xr zfsd 8 .
146681ce946SMartin Matuska.It Sy comment
147681ce946SMartin MatuskaA text comment up to 8192 characters long
148681ce946SMartin Matuska.It Sy bootsize
149681ce946SMartin MatuskaThe amount of space to reserve for the EFI system partition
150dbd5678dSMartin Matuska.It Sy failfast
151c6767dc1SMartin MatuskaIf this device should propagate BIO errors back to ZFS, used to disable
152dbd5678dSMartin Matuskafailfast.
153681ce946SMartin Matuska.It Sy path
154681ce946SMartin MatuskaThe path to the device for this vdev
155681ce946SMartin Matuska.It Sy allocating
156681ce946SMartin MatuskaIf this device should perform new allocations, used to disable a device
157681ce946SMartin Matuskawhen it is scheduled for later removal.
158681ce946SMartin MatuskaSee
159681ce946SMartin Matuska.Xr zpool-remove 8 .
160681ce946SMartin Matuska.El
161681ce946SMartin Matuska.Ss User Properties
162681ce946SMartin MatuskaIn addition to the standard native properties, ZFS supports arbitrary user
163681ce946SMartin Matuskaproperties.
164681ce946SMartin MatuskaUser properties have no effect on ZFS behavior, but applications or
165681ce946SMartin Matuskaadministrators can use them to annotate vdevs.
166681ce946SMartin Matuska.Pp
167681ce946SMartin MatuskaUser property names must contain a colon
168681ce946SMartin Matuska.Pq Qq Sy \&:
169681ce946SMartin Matuskacharacter to distinguish them from native properties.
170681ce946SMartin MatuskaThey may contain lowercase letters, numbers, and the following punctuation
171681ce946SMartin Matuskacharacters: colon
172681ce946SMartin Matuska.Pq Qq Sy \&: ,
173681ce946SMartin Matuskadash
174681ce946SMartin Matuska.Pq Qq Sy - ,
175681ce946SMartin Matuskaperiod
176681ce946SMartin Matuska.Pq Qq Sy \&. ,
177681ce946SMartin Matuskaand underscore
178681ce946SMartin Matuska.Pq Qq Sy _ .
179681ce946SMartin MatuskaThe expected convention is that the property name is divided into two portions
180681ce946SMartin Matuskasuch as
181681ce946SMartin Matuska.Ar module : Ns Ar property ,
182681ce946SMartin Matuskabut this namespace is not enforced by ZFS.
183681ce946SMartin MatuskaUser property names can be at most 256 characters, and cannot begin with a dash
184681ce946SMartin Matuska.Pq Qq Sy - .
185681ce946SMartin Matuska.Pp
186681ce946SMartin MatuskaWhen making programmatic use of user properties, it is strongly suggested to use
187681ce946SMartin Matuskaa reversed DNS domain name for the
188681ce946SMartin Matuska.Ar module
189681ce946SMartin Matuskacomponent of property names to reduce the chance that two
190681ce946SMartin Matuskaindependently-developed packages use the same property name for different
191681ce946SMartin Matuskapurposes.
192681ce946SMartin Matuska.Pp
193681ce946SMartin MatuskaThe values of user properties are arbitrary strings and
194681ce946SMartin Matuskaare never validated.
195681ce946SMartin MatuskaUse the
196681ce946SMartin Matuska.Nm zpool Cm set
197681ce946SMartin Matuskacommand with a blank value to clear a user property.
198681ce946SMartin MatuskaProperty values are limited to 8192 bytes.
199681ce946SMartin Matuska.Sh SEE ALSO
200681ce946SMartin Matuska.Xr zpoolprops 7 ,
201681ce946SMartin Matuska.Xr zpool-set 8
202