xref: /freebsd-src/sys/contrib/openzfs/man/man7/vdevprops.7 (revision dbd5678dca91abcefe8d046aa2f9b66497a95ffb)
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.\"
23*dbd5678dSMartin 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.
46681ce946SMartin MatuskaProperties are NOT inherited from top-level vdevs.
47681ce946SMartin Matuska.Pp
48681ce946SMartin MatuskaThe values of numeric properties can be specified using human-readable suffixes
49681ce946SMartin Matuska.Po for example,
50681ce946SMartin Matuska.Sy k , KB , M , Gb ,
51681ce946SMartin Matuskaand so forth, up to
52681ce946SMartin Matuska.Sy Z
53681ce946SMartin Matuskafor zettabyte
54681ce946SMartin Matuska.Pc .
55681ce946SMartin MatuskaThe following are all valid
56681ce946SMartin Matuska.Pq and equal
57681ce946SMartin Matuskaspecifications:
58681ce946SMartin Matuska.Li 1536M , 1.5g , 1.50GB .
59681ce946SMartin Matuska.Pp
60681ce946SMartin MatuskaThe values of non-numeric properties are case sensitive and must be lowercase.
61681ce946SMartin Matuska.Pp
62681ce946SMartin MatuskaThe following native properties consist of read-only statistics about the
63681ce946SMartin Matuskavdev.
64681ce946SMartin MatuskaThese properties can not be changed.
65681ce946SMartin Matuska.Bl -tag -width "fragmentation"
66681ce946SMartin Matuska.It Sy capacity
67681ce946SMartin MatuskaPercentage of vdev space used
68681ce946SMartin Matuska.It Sy state
69681ce946SMartin Matuskastate of this vdev such as online, faulted, or offline
70681ce946SMartin Matuska.It Sy guid
71e92ffd9bSMartin Matuskaglobally unique id of this vdev
72681ce946SMartin Matuska.It Sy asize
73681ce946SMartin MatuskaThe allocable size of this vdev
74681ce946SMartin Matuska.It Sy psize
75681ce946SMartin MatuskaThe physical size of this vdev
76681ce946SMartin Matuska.It Sy ashift
77681ce946SMartin MatuskaThe physical sector size of this vdev expressed as the power of two
78681ce946SMartin Matuska.It Sy size
79681ce946SMartin MatuskaThe total size of this vdev
80681ce946SMartin Matuska.It Sy free
81681ce946SMartin MatuskaThe amount of remaining free space on this vdev
82681ce946SMartin Matuska.It Sy allocated
83681ce946SMartin MatuskaThe amount of allocated space on this vdev
84681ce946SMartin Matuska.It Sy expandsize
85681ce946SMartin MatuskaHow much this vdev can expand by
86681ce946SMartin Matuska.It Sy fragmentation
87681ce946SMartin MatuskaPercent of fragmentation in this vdev
88681ce946SMartin Matuska.It Sy parity
89681ce946SMartin MatuskaThe level of parity for this vdev
90681ce946SMartin Matuska.It Sy devid
91681ce946SMartin MatuskaThe device id for this vdev
92681ce946SMartin Matuska.It Sy physpath
93681ce946SMartin MatuskaThe physical path to the device
94681ce946SMartin Matuska.It Sy encpath
95681ce946SMartin MatuskaThe enclosure path to the device
96681ce946SMartin Matuska.It Sy fru
97681ce946SMartin MatuskaField Replacable Unit, usually a model number
98681ce946SMartin Matuska.It Sy parent
99681ce946SMartin MatuskaParent of this vdev
100681ce946SMartin Matuska.It Sy children
101681ce946SMartin MatuskaComma separated list of children of this vdev
102681ce946SMartin Matuska.It Sy numchildren
103681ce946SMartin MatuskaThe number of children belonging to this vdev
104681ce946SMartin Matuska.It Sy read_errors , write_errors , checksum_errors , initialize_errors
105681ce946SMartin MatuskaThe number of errors of each type encountered by this vdev
106681ce946SMartin Matuska.It Sy null_ops , read_ops , write_ops , free_ops , claim_ops , trim_ops
107681ce946SMartin MatuskaThe number of I/O operations of each type performed by this vdev
108681ce946SMartin Matuska.It Xo
109681ce946SMartin Matuska.Sy null_bytes , read_bytes , write_bytes , free_bytes , claim_bytes ,
110681ce946SMartin Matuska.Sy trim_bytes
111681ce946SMartin Matuska.Xc
112681ce946SMartin MatuskaThe cumulative size of all operations of each type performed by this vdev
113681ce946SMartin Matuska.It Sy removing
114681ce946SMartin MatuskaIf this device is currently being removed from the pool
115681ce946SMartin Matuska.El
116681ce946SMartin Matuska.Pp
117681ce946SMartin MatuskaThe following native properties can be used to change the behavior of a ZFS
118681ce946SMartin Matuskadataset.
119681ce946SMartin Matuska.Bl -tag -width "allocating"
120681ce946SMartin Matuska.It Sy comment
121681ce946SMartin MatuskaA text comment up to 8192 characters long
122681ce946SMartin Matuska.It Sy bootsize
123681ce946SMartin MatuskaThe amount of space to reserve for the EFI system partition
124*dbd5678dSMartin Matuska.It Sy failfast
125*dbd5678dSMartin MatuskaIf this device should propage BIO errors back to ZFS, used to disable
126*dbd5678dSMartin Matuskafailfast.
127681ce946SMartin Matuska.It Sy path
128681ce946SMartin MatuskaThe path to the device for this vdev
129681ce946SMartin Matuska.It Sy allocating
130681ce946SMartin MatuskaIf this device should perform new allocations, used to disable a device
131681ce946SMartin Matuskawhen it is scheduled for later removal.
132681ce946SMartin MatuskaSee
133681ce946SMartin Matuska.Xr zpool-remove 8 .
134681ce946SMartin Matuska.El
135681ce946SMartin Matuska.Ss User Properties
136681ce946SMartin MatuskaIn addition to the standard native properties, ZFS supports arbitrary user
137681ce946SMartin Matuskaproperties.
138681ce946SMartin MatuskaUser properties have no effect on ZFS behavior, but applications or
139681ce946SMartin Matuskaadministrators can use them to annotate vdevs.
140681ce946SMartin Matuska.Pp
141681ce946SMartin MatuskaUser property names must contain a colon
142681ce946SMartin Matuska.Pq Qq Sy \&:
143681ce946SMartin Matuskacharacter to distinguish them from native properties.
144681ce946SMartin MatuskaThey may contain lowercase letters, numbers, and the following punctuation
145681ce946SMartin Matuskacharacters: colon
146681ce946SMartin Matuska.Pq Qq Sy \&: ,
147681ce946SMartin Matuskadash
148681ce946SMartin Matuska.Pq Qq Sy - ,
149681ce946SMartin Matuskaperiod
150681ce946SMartin Matuska.Pq Qq Sy \&. ,
151681ce946SMartin Matuskaand underscore
152681ce946SMartin Matuska.Pq Qq Sy _ .
153681ce946SMartin MatuskaThe expected convention is that the property name is divided into two portions
154681ce946SMartin Matuskasuch as
155681ce946SMartin Matuska.Ar module : Ns Ar property ,
156681ce946SMartin Matuskabut this namespace is not enforced by ZFS.
157681ce946SMartin MatuskaUser property names can be at most 256 characters, and cannot begin with a dash
158681ce946SMartin Matuska.Pq Qq Sy - .
159681ce946SMartin Matuska.Pp
160681ce946SMartin MatuskaWhen making programmatic use of user properties, it is strongly suggested to use
161681ce946SMartin Matuskaa reversed DNS domain name for the
162681ce946SMartin Matuska.Ar module
163681ce946SMartin Matuskacomponent of property names to reduce the chance that two
164681ce946SMartin Matuskaindependently-developed packages use the same property name for different
165681ce946SMartin Matuskapurposes.
166681ce946SMartin Matuska.Pp
167681ce946SMartin MatuskaThe values of user properties are arbitrary strings and
168681ce946SMartin Matuskaare never validated.
169681ce946SMartin MatuskaUse the
170681ce946SMartin Matuska.Nm zpool Cm set
171681ce946SMartin Matuskacommand with a blank value to clear a user property.
172681ce946SMartin MatuskaProperty values are limited to 8192 bytes.
173681ce946SMartin Matuska.Sh SEE ALSO
174681ce946SMartin Matuska.Xr zpoolprops 7 ,
175681ce946SMartin Matuska.Xr zpool-set 8
176