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