xref: /freebsd-src/sys/contrib/openzfs/man/man7/vdevprops.7 (revision 681ce946f33e75c590e97c53076e86dff1fe8f4a)
1*681ce946SMartin Matuska.\"
2*681ce946SMartin Matuska.\" CDDL HEADER START
3*681ce946SMartin Matuska.\"
4*681ce946SMartin Matuska.\" The contents of this file are subject to the terms of the
5*681ce946SMartin Matuska.\" Common Development and Distribution License (the "License").
6*681ce946SMartin Matuska.\" You may not use this file except in compliance with the License.
7*681ce946SMartin Matuska.\"
8*681ce946SMartin Matuska.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*681ce946SMartin Matuska.\" or http://www.opensolaris.org/os/licensing.
10*681ce946SMartin Matuska.\" See the License for the specific language governing permissions
11*681ce946SMartin Matuska.\" and limitations under the License.
12*681ce946SMartin Matuska.\"
13*681ce946SMartin Matuska.\" When distributing Covered Code, include this CDDL HEADER in each
14*681ce946SMartin Matuska.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*681ce946SMartin Matuska.\" If applicable, add the following below this CDDL HEADER, with the
16*681ce946SMartin Matuska.\" fields enclosed by brackets "[]" replaced with your own identifying
17*681ce946SMartin Matuska.\" information: Portions Copyright [yyyy] [name of copyright owner]
18*681ce946SMartin Matuska.\"
19*681ce946SMartin Matuska.\" CDDL HEADER END
20*681ce946SMartin Matuska.\"
21*681ce946SMartin Matuska.\" Copyright (c) 2021 Klara, Inc.
22*681ce946SMartin Matuska.\"
23*681ce946SMartin Matuska.Dd November 27, 2021
24*681ce946SMartin Matuska.Dt VDEVPROPS 7
25*681ce946SMartin Matuska.Os
26*681ce946SMartin Matuska.
27*681ce946SMartin Matuska.Sh NAME
28*681ce946SMartin Matuska.Nm vdevprops
29*681ce946SMartin Matuska.Nd native and user-defined properties of ZFS vdevs
30*681ce946SMartin Matuska.
31*681ce946SMartin Matuska.Sh DESCRIPTION
32*681ce946SMartin MatuskaProperties are divided into two types, native properties and user-defined
33*681ce946SMartin Matuska.Pq or Qq user
34*681ce946SMartin Matuskaproperties.
35*681ce946SMartin MatuskaNative properties either export internal statistics or control ZFS behavior.
36*681ce946SMartin MatuskaIn addition, native properties are either editable or read-only.
37*681ce946SMartin MatuskaUser properties have no effect on ZFS behavior, but you can use them to annotate
38*681ce946SMartin Matuskavdevs in a way that is meaningful in your environment.
39*681ce946SMartin MatuskaFor more information about user properties, see the
40*681ce946SMartin Matuska.Sx User Properties
41*681ce946SMartin Matuskasection, below.
42*681ce946SMartin Matuska.
43*681ce946SMartin Matuska.Ss Native Properties
44*681ce946SMartin MatuskaEvery vdev has a set of properties that export statistics about the vdev
45*681ce946SMartin Matuskaas well as control various behaviors.
46*681ce946SMartin MatuskaProperties are NOT inherited from top-level vdevs.
47*681ce946SMartin Matuska.Pp
48*681ce946SMartin MatuskaThe values of numeric properties can be specified using human-readable suffixes
49*681ce946SMartin Matuska.Po for example,
50*681ce946SMartin Matuska.Sy k , KB , M , Gb ,
51*681ce946SMartin Matuskaand so forth, up to
52*681ce946SMartin Matuska.Sy Z
53*681ce946SMartin Matuskafor zettabyte
54*681ce946SMartin Matuska.Pc .
55*681ce946SMartin MatuskaThe following are all valid
56*681ce946SMartin Matuska.Pq and equal
57*681ce946SMartin Matuskaspecifications:
58*681ce946SMartin Matuska.Li 1536M , 1.5g , 1.50GB .
59*681ce946SMartin Matuska.Pp
60*681ce946SMartin MatuskaThe values of non-numeric properties are case sensitive and must be lowercase.
61*681ce946SMartin Matuska.Pp
62*681ce946SMartin MatuskaThe following native properties consist of read-only statistics about the
63*681ce946SMartin Matuskavdev.
64*681ce946SMartin MatuskaThese properties can not be changed.
65*681ce946SMartin Matuska.Bl -tag -width "fragmentation"
66*681ce946SMartin Matuska.It Sy capacity
67*681ce946SMartin MatuskaPercentage of vdev space used
68*681ce946SMartin Matuska.It Sy state
69*681ce946SMartin Matuskastate of this vdev such as online, faulted, or offline
70*681ce946SMartin Matuska.It Sy guid
71*681ce946SMartin Matuskaglobaly unique id of this vdev
72*681ce946SMartin Matuska.It Sy asize
73*681ce946SMartin MatuskaThe allocable size of this vdev
74*681ce946SMartin Matuska.It Sy psize
75*681ce946SMartin MatuskaThe physical size of this vdev
76*681ce946SMartin Matuska.It Sy ashift
77*681ce946SMartin MatuskaThe physical sector size of this vdev expressed as the power of two
78*681ce946SMartin Matuska.It Sy size
79*681ce946SMartin MatuskaThe total size of this vdev
80*681ce946SMartin Matuska.It Sy free
81*681ce946SMartin MatuskaThe amount of remaining free space on this vdev
82*681ce946SMartin Matuska.It Sy allocated
83*681ce946SMartin MatuskaThe amount of allocated space on this vdev
84*681ce946SMartin Matuska.It Sy expandsize
85*681ce946SMartin MatuskaHow much this vdev can expand by
86*681ce946SMartin Matuska.It Sy fragmentation
87*681ce946SMartin MatuskaPercent of fragmentation in this vdev
88*681ce946SMartin Matuska.It Sy parity
89*681ce946SMartin MatuskaThe level of parity for this vdev
90*681ce946SMartin Matuska.It Sy devid
91*681ce946SMartin MatuskaThe device id for this vdev
92*681ce946SMartin Matuska.It Sy physpath
93*681ce946SMartin MatuskaThe physical path to the device
94*681ce946SMartin Matuska.It Sy encpath
95*681ce946SMartin MatuskaThe enclosure path to the device
96*681ce946SMartin Matuska.It Sy fru
97*681ce946SMartin MatuskaField Replacable Unit, usually a model number
98*681ce946SMartin Matuska.It Sy parent
99*681ce946SMartin MatuskaParent of this vdev
100*681ce946SMartin Matuska.It Sy children
101*681ce946SMartin MatuskaComma separated list of children of this vdev
102*681ce946SMartin Matuska.It Sy numchildren
103*681ce946SMartin MatuskaThe number of children belonging to this vdev
104*681ce946SMartin Matuska.It Sy read_errors , write_errors , checksum_errors , initialize_errors
105*681ce946SMartin MatuskaThe number of errors of each type encountered by this vdev
106*681ce946SMartin Matuska.It Sy null_ops , read_ops , write_ops , free_ops , claim_ops , trim_ops
107*681ce946SMartin MatuskaThe number of I/O operations of each type performed by this vdev
108*681ce946SMartin Matuska.It Xo
109*681ce946SMartin Matuska.Sy null_bytes , read_bytes , write_bytes , free_bytes , claim_bytes ,
110*681ce946SMartin Matuska.Sy trim_bytes
111*681ce946SMartin Matuska.Xc
112*681ce946SMartin MatuskaThe cumulative size of all operations of each type performed by this vdev
113*681ce946SMartin Matuska.It Sy removing
114*681ce946SMartin MatuskaIf this device is currently being removed from the pool
115*681ce946SMartin Matuska.El
116*681ce946SMartin Matuska.Pp
117*681ce946SMartin MatuskaThe following native properties can be used to change the behavior of a ZFS
118*681ce946SMartin Matuskadataset.
119*681ce946SMartin Matuska.Bl -tag -width "allocating"
120*681ce946SMartin Matuska.It Sy comment
121*681ce946SMartin MatuskaA text comment up to 8192 characters long
122*681ce946SMartin Matuska.It Sy bootsize
123*681ce946SMartin MatuskaThe amount of space to reserve for the EFI system partition
124*681ce946SMartin Matuska.It Sy path
125*681ce946SMartin MatuskaThe path to the device for this vdev
126*681ce946SMartin Matuska.It Sy allocating
127*681ce946SMartin MatuskaIf this device should perform new allocations, used to disable a device
128*681ce946SMartin Matuskawhen it is scheduled for later removal.
129*681ce946SMartin MatuskaSee
130*681ce946SMartin Matuska.Xr zpool-remove 8 .
131*681ce946SMartin Matuska.El
132*681ce946SMartin Matuska.Ss User Properties
133*681ce946SMartin MatuskaIn addition to the standard native properties, ZFS supports arbitrary user
134*681ce946SMartin Matuskaproperties.
135*681ce946SMartin MatuskaUser properties have no effect on ZFS behavior, but applications or
136*681ce946SMartin Matuskaadministrators can use them to annotate vdevs.
137*681ce946SMartin Matuska.Pp
138*681ce946SMartin MatuskaUser property names must contain a colon
139*681ce946SMartin Matuska.Pq Qq Sy \&:
140*681ce946SMartin Matuskacharacter to distinguish them from native properties.
141*681ce946SMartin MatuskaThey may contain lowercase letters, numbers, and the following punctuation
142*681ce946SMartin Matuskacharacters: colon
143*681ce946SMartin Matuska.Pq Qq Sy \&: ,
144*681ce946SMartin Matuskadash
145*681ce946SMartin Matuska.Pq Qq Sy - ,
146*681ce946SMartin Matuskaperiod
147*681ce946SMartin Matuska.Pq Qq Sy \&. ,
148*681ce946SMartin Matuskaand underscore
149*681ce946SMartin Matuska.Pq Qq Sy _ .
150*681ce946SMartin MatuskaThe expected convention is that the property name is divided into two portions
151*681ce946SMartin Matuskasuch as
152*681ce946SMartin Matuska.Ar module : Ns Ar property ,
153*681ce946SMartin Matuskabut this namespace is not enforced by ZFS.
154*681ce946SMartin MatuskaUser property names can be at most 256 characters, and cannot begin with a dash
155*681ce946SMartin Matuska.Pq Qq Sy - .
156*681ce946SMartin Matuska.Pp
157*681ce946SMartin MatuskaWhen making programmatic use of user properties, it is strongly suggested to use
158*681ce946SMartin Matuskaa reversed DNS domain name for the
159*681ce946SMartin Matuska.Ar module
160*681ce946SMartin Matuskacomponent of property names to reduce the chance that two
161*681ce946SMartin Matuskaindependently-developed packages use the same property name for different
162*681ce946SMartin Matuskapurposes.
163*681ce946SMartin Matuska.Pp
164*681ce946SMartin MatuskaThe values of user properties are arbitrary strings and
165*681ce946SMartin Matuskaare never validated.
166*681ce946SMartin MatuskaUse the
167*681ce946SMartin Matuska.Nm zpool Cm set
168*681ce946SMartin Matuskacommand with a blank value to clear a user property.
169*681ce946SMartin MatuskaProperty values are limited to 8192 bytes.
170*681ce946SMartin Matuska.Sh SEE ALSO
171*681ce946SMartin Matuska.Xr zpoolprops 7 ,
172*681ce946SMartin Matuska.Xr zpool-set 8
173