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