Add "compatibility" property for zpool feature sets
[zfs.git] / man / man8 / zpoolprops.8
blob20e0d74421ae80339cae5661feae67aad5414abd
1 .\"
2 .\" CDDL HEADER START
3 .\"
4 .\" The contents of this file are subject to the terms of the
5 .\" Common Development and Distribution License (the "License").
6 .\" You may not use this file except in compliance with the License.
7 .\"
8 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 .\" or http://www.opensolaris.org/os/licensing.
10 .\" See the License for the specific language governing permissions
11 .\" and limitations under the License.
12 .\"
13 .\" When distributing Covered Code, include this CDDL HEADER in each
14 .\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 .\" If applicable, add the following below this CDDL HEADER, with the
16 .\" fields enclosed by brackets "[]" replaced with your own identifying
17 .\" information: Portions Copyright [yyyy] [name of copyright owner]
18 .\"
19 .\" CDDL HEADER END
20 .\"
21 .\"
22 .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
23 .\" Copyright (c) 2012, 2018 by Delphix. All rights reserved.
24 .\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
25 .\" Copyright (c) 2017 Datto Inc.
26 .\" Copyright (c) 2018 George Melikov. All Rights Reserved.
27 .\" Copyright 2017 Nexenta Systems, Inc.
28 .\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
29 .\" Copyright (c) 2021, Colm Buckley <colm@tuatha.org>
30 .\"
31 .Dd August 9, 2019
32 .Dt ZPOOLPROPS 8
33 .Os
34 .Sh NAME
35 .Nm zpoolprops
36 .Nd available properties for ZFS storage pools
37 .Sh DESCRIPTION
38 Each pool has several properties associated with it.
39 Some properties are read-only statistics while others are configurable and
40 change the behavior of the pool.
41 .Pp
42 The following are read-only properties:
43 .Bl -tag -width Ds
44 .It Cm allocated
45 Amount of storage used within the pool.
46 See
47 .Sy fragmentation
48 and
49 .Sy free
50 for more information.
51 .It Sy capacity
52 Percentage of pool space used.
53 This property can also be referred to by its shortened column name,
54 .Sy cap .
55 .It Sy expandsize
56 Amount of uninitialized space within the pool or device that can be used to
57 increase the total capacity of the pool.
58 On whole-disk vdevs, this is the space beyond the end of the GPT –
59 typically occurring when a LUN is dynamically expanded
60 or a disk replaced with a larger one.
61 On partition vdevs, this is the space appended to the partition after it was
62 added to the pool – most likely by resizing it in-place.
63 The space can be claimed for the pool by bringing it online with
64 .Sy autoexpand=on
65 or using
66 .Nm zpool Cm online Fl e .
67 .It Sy fragmentation
68 The amount of fragmentation in the pool. As the amount of space
69 .Sy allocated
70 increases, it becomes more difficult to locate
71 .Sy free
72 space. This may result in lower write performance compared to pools with more
73 unfragmented free space.
74 .It Sy free
75 The amount of free space available in the pool.
76 By contrast, the
77 .Xr zfs 8
78 .Sy available
79 property describes how much new data can be written to ZFS filesystems/volumes.
80 The zpool
81 .Sy free
82 property is not generally useful for this purpose, and can be substantially more than the zfs
83 .Sy available
84 space. This discrepancy is due to several factors, including raidz parity; zfs
85 reservation, quota, refreservation, and refquota properties; and space set aside by
86 .Sy spa_slop_shift
87 (see
88 .Xr zfs-module-parameters 5
89 for more information).
90 .It Sy freeing
91 After a file system or snapshot is destroyed, the space it was using is
92 returned to the pool asynchronously.
93 .Sy freeing
94 is the amount of space remaining to be reclaimed.
95 Over time
96 .Sy freeing
97 will decrease while
98 .Sy free
99 increases.
100 .It Sy health
101 The current health of the pool.
102 Health can be one of
103 .Sy ONLINE , DEGRADED , FAULTED , OFFLINE, REMOVED , UNAVAIL .
104 .It Sy guid
105 A unique identifier for the pool.
106 .It Sy load_guid
107 A unique identifier for the pool.
108 Unlike the
109 .Sy guid
110 property, this identifier is generated every time we load the pool (e.g. does
111 not persist across imports/exports) and never changes while the pool is loaded
112 (even if a
113 .Sy reguid
114 operation takes place).
115 .It Sy size
116 Total size of the storage pool.
117 .It Sy unsupported@ Ns Em feature_guid
118 Information about unsupported features that are enabled on the pool.
120 .Xr zpool-features 5
121 for details.
124 The space usage properties report actual physical space available to the
125 storage pool.
126 The physical space can be different from the total amount of space that any
127 contained datasets can actually use.
128 The amount of space used in a raidz configuration depends on the characteristics
129 of the data being written.
130 In addition, ZFS reserves some space for internal accounting that the
131 .Xr zfs 8
132 command takes into account, but the
134 command does not.
135 For non-full pools of a reasonable size, these effects should be invisible.
136 For small pools, or pools that are close to being completely full, these
137 discrepancies may become more noticeable.
139 The following property can be set at creation time and import time:
140 .Bl -tag -width Ds
141 .It Sy altroot
142 Alternate root directory.
143 If set, this directory is prepended to any mount points within the pool.
144 This can be used when examining an unknown pool where the mount points cannot be
145 trusted, or in an alternate boot environment, where the typical paths are not
146 valid.
147 .Sy altroot
148 is not a persistent property.
149 It is valid only while the system is up.
150 Setting
151 .Sy altroot
152 defaults to using
153 .Sy cachefile Ns = Ns Sy none ,
154 though this may be overridden using an explicit setting.
157 The following property can be set only at import time:
158 .Bl -tag -width Ds
159 .It Sy readonly Ns = Ns Sy on Ns | Ns Sy off
160 If set to
161 .Sy on ,
162 the pool will be imported in read-only mode.
163 This property can also be referred to by its shortened column name,
164 .Sy rdonly .
167 The following properties can be set at creation time and import time, and later
168 changed with the
169 .Nm zpool Cm set
170 command:
171 .Bl -tag -width Ds
172 .It Sy ashift Ns = Ns Sy ashift
173 Pool sector size exponent, to the power of
174 .Sy 2
175 (internally referred to as
176 .Sy ashift
177 ). Values from 9 to 16, inclusive, are valid; also, the
178 value 0 (the default) means to auto-detect using the kernel's block
179 layer and a ZFS internal exception list. I/O operations will be aligned
180 to the specified size boundaries. Additionally, the minimum (disk)
181 write size will be set to the specified size, so this represents a
182 space vs. performance trade-off. For optimal performance, the pool
183 sector size should be greater than or equal to the sector size of the
184 underlying disks. The typical case for setting this property is when
185 performance is important and the underlying disks use 4KiB sectors but
186 report 512B sectors to the OS (for compatibility reasons); in that
187 case, set
188 .Sy ashift=12
189 (which is 1<<12 = 4096). When set, this property is
190 used as the default hint value in subsequent vdev operations (add,
191 attach and replace). Changing this value will not modify any existing
192 vdev, not even on disk replacement; however it can be used, for
193 instance, to replace a dying 512B sectors disk with a newer 4KiB
194 sectors device: this will probably result in bad performance but at the
195 same time could prevent loss of data.
196 .It Sy autoexpand Ns = Ns Sy on Ns | Ns Sy off
197 Controls automatic pool expansion when the underlying LUN is grown.
198 If set to
199 .Sy on ,
200 the pool will be resized according to the size of the expanded device.
201 If the device is part of a mirror or raidz then all devices within that
202 mirror/raidz group must be expanded before the new space is made available to
203 the pool.
204 The default behavior is
205 .Sy off .
206 This property can also be referred to by its shortened column name,
207 .Sy expand .
208 .It Sy autoreplace Ns = Ns Sy on Ns | Ns Sy off
209 Controls automatic device replacement.
210 If set to
211 .Sy off ,
212 device replacement must be initiated by the administrator by using the
213 .Nm zpool Cm replace
214 command.
215 If set to
216 .Sy on ,
217 any new device, found in the same physical location as a device that previously
218 belonged to the pool, is automatically formatted and replaced.
219 The default behavior is
220 .Sy off .
221 This property can also be referred to by its shortened column name,
222 .Sy replace .
223 Autoreplace can also be used with virtual disks (like device
224 mapper) provided that you use the /dev/disk/by-vdev paths setup by
225 vdev_id.conf. See the
226 .Xr vdev_id 8
227 man page for more details.
228 Autoreplace and autoonline require the ZFS Event Daemon be configured and
229 running.  See the
230 .Xr zed 8
231 man page for more details.
232 .It Sy autotrim Ns = Ns Sy on Ns | Ns Sy off
233 When set to
234 .Sy on
235 space which has been recently freed, and is no longer allocated by the pool,
236 will be periodically trimmed.  This allows block device vdevs which support
237 BLKDISCARD, such as SSDs, or file vdevs on which the underlying file system
238 supports hole-punching, to reclaim unused blocks.  The default setting for
239 this property is
240 .Sy off .
242 Automatic TRIM does not immediately reclaim blocks after a free. Instead,
243 it will optimistically delay allowing smaller ranges to be aggregated in to
244 a few larger ones.  These can then be issued more efficiently to the storage.
245 TRIM on L2ARC devices is enabled by setting
246 .Sy l2arc_trim_ahead > 0 .
248 Be aware that automatic trimming of recently freed data blocks can put
249 significant stress on the underlying storage devices.  This will vary
250 depending of how well the specific device handles these commands.  For
251 lower end devices it is often possible to achieve most of the benefits
252 of automatic trimming by running an on-demand (manual) TRIM periodically
253 using the
254 .Nm zpool Cm trim
255 command.
256 .It Sy bootfs Ns = Ns Sy (unset) Ns | Ns Ar pool Ns / Ns Ar dataset
257 Identifies the default bootable dataset for the root pool. This property is
258 expected to be set mainly by the installation and upgrade programs.
259 Not all Linux distribution boot processes use the bootfs property.
260 .It Sy cachefile Ns = Ns Ar path Ns | Ns Sy none
261 Controls the location of where the pool configuration is cached.
262 Discovering all pools on system startup requires a cached copy of the
263 configuration data that is stored on the root file system.
264 All pools in this cache are automatically imported when the system boots.
265 Some environments, such as install and clustering, need to cache this
266 information in a different location so that pools are not automatically
267 imported.
268 Setting this property caches the pool configuration in a different location that
269 can later be imported with
270 .Nm zpool Cm import Fl c .
271 Setting it to the value
272 .Sy none
273 creates a temporary pool that is never cached, and the
275 .Pq empty string
276 uses the default location.
278 Multiple pools can share the same cache file.
279 Because the kernel destroys and recreates this file when pools are added and
280 removed, care should be taken when attempting to access this file.
281 When the last pool using a
282 .Sy cachefile
283 is exported or destroyed, the file will be empty.
284 .It Sy comment Ns = Ns Ar text
285 A text string consisting of printable ASCII characters that will be stored
286 such that it is available even if the pool becomes faulted.
287 An administrator can provide additional information about a pool using this
288 property.
289 .It Sy compatibility Ns = Ns Ar off | legacy | file Bq , Ns Ar file Ns ...
290 Specifies that the pool maintain compatibility with specific feature sets.
291 When set to
292 .Sy off
293 (or unset); compatibility is disabled (all features are enabled); when set to
294 .Sy legacy Ns ;
295 no features are enabled. When set to a comma-separated list of
296 filenames (each filename may either be an absolute path, or relative to
297 .Pa /etc/zfs/compatibility.d or Pa /usr/share/zfs/compatibility.d Ns )
298 the lists of requested features are read from those files, separated by
299 whitespace and/or commas. Only features present in all files are enabled.
302 .Xr zpool-features 5 Ns ,
303 .Xr zpool-create 8
305 .Xr zpool-upgrade 8
306 for more information on the operation of compatibility feature sets.
307 .It Sy dedupditto Ns = Ns Ar number
308 This property is deprecated and no longer has any effect.
309 .It Sy delegation Ns = Ns Sy on Ns | Ns Sy off
310 Controls whether a non-privileged user is granted access based on the dataset
311 permissions defined on the dataset.
313 .Xr zfs 8
314 for more information on ZFS delegated administration.
315 .It Sy failmode Ns = Ns Sy wait Ns | Ns Sy continue Ns | Ns Sy panic
316 Controls the system behavior in the event of catastrophic pool failure.
317 This condition is typically a result of a loss of connectivity to the underlying
318 storage device(s) or a failure of all devices within the pool.
319 The behavior of such an event is determined as follows:
320 .Bl -tag -width "continue"
321 .It Sy wait
322 Blocks all I/O access until the device connectivity is recovered and the errors
323 are cleared.
324 This is the default behavior.
325 .It Sy continue
326 Returns
327 .Er EIO
328 to any new write I/O requests but allows reads to any of the remaining healthy
329 devices.
330 Any write requests that have yet to be committed to disk would be blocked.
331 .It Sy panic
332 Prints out a message to the console and generates a system crash dump.
334 .It Sy feature@ Ns Ar feature_name Ns = Ns Sy enabled
335 The value of this property is the current state of
336 .Ar feature_name .
337 The only valid value when setting this property is
338 .Sy enabled
339 which moves
340 .Ar feature_name
341 to the enabled state.
343 .Xr zpool-features 5
344 for details on feature states.
345 .It Sy listsnapshots Ns = Ns Sy on Ns | Ns Sy off
346 Controls whether information about snapshots associated with this pool is
347 output when
348 .Nm zfs Cm list
349 is run without the
350 .Fl t
351 option.
352 The default value is
353 .Sy off .
354 This property can also be referred to by its shortened name,
355 .Sy listsnaps .
356 .It Sy multihost Ns = Ns Sy on Ns | Ns Sy off
357 Controls whether a pool activity check should be performed during
358 .Nm zpool Cm import .
359 When a pool is determined to be active it cannot be imported, even with the
360 .Fl f
361 option.  This property is intended to be used in failover configurations
362 where multiple hosts have access to a pool on shared storage.
364 Multihost provides protection on import only.  It does not protect against an
365 individual device being used in multiple pools, regardless of the type of vdev.
366 See the discussion under
367 .Sy zpool create.
369 When this property is on, periodic writes to storage occur to show the pool is
370 in use.  See
371 .Sy zfs_multihost_interval
372 in the
373 .Xr zfs-module-parameters 5
374 man page.  In order to enable this property each host must set a unique hostid.
376 .Xr genhostid 1
377 .Xr zgenhostid 8
378 .Xr spl-module-parameters 5
379 for additional details.  The default value is
380 .Sy off .
381 .It Sy version Ns = Ns Ar version
382 The current on-disk version of the pool.
383 This can be increased, but never decreased.
384 The preferred method of updating pools is with the
385 .Nm zpool Cm upgrade
386 command, though this property can be used when a specific version is needed for
387 backwards compatibility.
388 Once feature flags are enabled on a pool this property will no longer have a
389 value.