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