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