mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
Add zpool properties for allocation class space
The existing zpool properties accounting pool space (size, allocated, fragmentation, expandsize, free, capacity) are based on the normal metaslab class or are cumulative properties of several classes combined. Add properties reporting the space accounting metrics for each metaslab class individually. Also introduce pool-wide AVAIL, USABLE, and USED properties reporting values corresponding to FREE, SIZE, and ALLOC deflated for raidz. Update ZTS to recognize the new properties and validate reported values. While in zpool_get_parsable.cfg, add "fragmentation" to the list of parsable properties. Sponsored-by: Klara, Inc. Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Ameer Hamza <ahamza@ixsystems.com> Signed-off-by: Ryan Moeller <ryan.moeller@klarasystems.com> Cloes #18238
This commit is contained in:
committed by
Brian Behlendorf
parent
6ba3f915d0
commit
ac0fd40c8c
+148
-3
@@ -27,9 +27,9 @@
|
||||
.\" Copyright 2017 Nexenta Systems, Inc.
|
||||
.\" Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
|
||||
.\" Copyright (c) 2021, Colm Buckley <colm@tuatha.org>
|
||||
.\" Copyright (c) 2023, Klara Inc.
|
||||
.\" Copyright (c) 2023, 2026, Klara Inc.
|
||||
.\"
|
||||
.Dd December 4, 2024
|
||||
.Dd March 2, 2026
|
||||
.Dt ZPOOLPROPS 7
|
||||
.Os
|
||||
.
|
||||
@@ -49,7 +49,7 @@ For more information about user properties, see the
|
||||
section.
|
||||
.Pp
|
||||
The following are read-only properties:
|
||||
.Bl -tag -width "unsupported@guid"
|
||||
.Bl -tag -width "last_scrubbed_txg"
|
||||
.It Sy allocated
|
||||
Amount of storage used within the pool.
|
||||
See
|
||||
@@ -57,6 +57,21 @@ See
|
||||
and
|
||||
.Sy free
|
||||
for more information.
|
||||
.It Sy available
|
||||
The amount of free space available in the pool, adjusted for raidz parity
|
||||
overhead.
|
||||
The
|
||||
.Sy available
|
||||
property is calculated as:
|
||||
.Pp
|
||||
.Sy usable - used
|
||||
.Pp
|
||||
See
|
||||
.Sy usable ,
|
||||
.Sy used ,
|
||||
and
|
||||
.Sy free
|
||||
for more information.
|
||||
.It Sy bcloneratio
|
||||
The ratio of the total amount of storage that would be required to store all
|
||||
the cloned blocks without cloning to the actual storage used.
|
||||
@@ -184,6 +199,21 @@ Information about unsupported features that are enabled on the pool.
|
||||
See
|
||||
.Xr zpool-features 7
|
||||
for details.
|
||||
.It Sy usable
|
||||
Estimate of total storage pool size, adjusted for raidz parity overhead.
|
||||
The adjustment assumes a fixed 128KiB record size to compute a data-to-parity
|
||||
ratio.
|
||||
.Sy usable
|
||||
is a heuristic for allocation and should not be interpreted as an exact measure
|
||||
of usable space.
|
||||
.It Sy used
|
||||
Estimate of storage used within the storage pool, adjusted for raidz parity
|
||||
overhead.
|
||||
The adjustment assumes a fixed 128KiB record size to compute a data-to-parity
|
||||
ratio.
|
||||
.Sy used
|
||||
is a heuristic for allocation and should not be interpreted as an exact measure
|
||||
of used space.
|
||||
.El
|
||||
.Pp
|
||||
The space usage properties report actual physical space available to the
|
||||
@@ -201,6 +231,121 @@ For non-full pools of a reasonable size, these effects should be invisible.
|
||||
For small pools, or pools that are close to being completely full, these
|
||||
discrepancies may become more noticeable.
|
||||
.Pp
|
||||
The following properties are read-only metrics for allocation classes:
|
||||
.Bl -ohang
|
||||
.It Xo Sy class_dedup_allocated , class_dedup_available , class_dedup_capacity ,
|
||||
.Sy class_dedup_expandsize , class_dedup_fragmentation , class_dedup_free ,
|
||||
.Sy class_dedup_size , class_dedup_usable , class_dedup_used
|
||||
.Xc
|
||||
.Bd -ragged -offset Ds -compact
|
||||
Space usage properties of the pool's
|
||||
.Sy dedup
|
||||
metaslab allocator class.
|
||||
.Ed
|
||||
.It Xo Sy class_elog_allocated , class_elog_available , class_elog_capacity ,
|
||||
.Sy class_elog_expandsize , class_elog_fragmentation , class_elog_free ,
|
||||
.Sy class_elog_size , class_elog_usable , class_elog_used
|
||||
.Xc
|
||||
.Bd -ragged -offset Ds -compact
|
||||
Space usage properties of the pool's
|
||||
.Sy embedded_log
|
||||
metaslab allocator class.
|
||||
.Ed
|
||||
.It Xo Sy class_log_allocated , class_log_available , class_log_capacity ,
|
||||
.Sy class_log_expandsize , class_log_fragmentation , class_log_free ,
|
||||
.Sy class_log_size , class_log_usable , class_log_used
|
||||
.Xc
|
||||
.Bd -ragged -offset Ds -compact
|
||||
Space usage properties of the pool's
|
||||
.Sy log
|
||||
metaslab allocator class.
|
||||
.Ed
|
||||
.It Xo Sy class_normal_allocated , class_normal_available ,
|
||||
.Sy class_normal_capacity , class_normal_expandsize ,
|
||||
.Sy class_normal_fragmentation , class_normal_free , class_normal_size ,
|
||||
.Sy class_normal_usable , class_normal_used
|
||||
.Xc
|
||||
.Bd -ragged -offset Ds -compact
|
||||
Space usage properties of the pool's
|
||||
.Sy normal
|
||||
metaslab allocator class.
|
||||
.Ed
|
||||
.It Xo Sy class_special_allocated , class_special_available ,
|
||||
.Sy class_special_capacity , class_special_expandsize ,
|
||||
.Sy class_special_fragmentation , class_special_free , class_special_size ,
|
||||
.Sy class_special_usable , class_special_used
|
||||
.Xc
|
||||
.Bd -ragged -offset Ds -compact
|
||||
Space usage properties of the pool's
|
||||
.Sy special
|
||||
metaslab allocator class.
|
||||
.Ed
|
||||
.It Xo Sy class_special_elog_allocated , class_special_elog_available ,
|
||||
.Sy class_special_elog_capacity , class_special_elog_expandsize ,
|
||||
.Sy class_special_elog_fragmentation , class_special_elog_free ,
|
||||
.Sy class_special_elog_size , class_special_elog_usable ,
|
||||
.Sy class_special_elog_used
|
||||
.Xc
|
||||
.Bd -ragged -offset Ds -compact
|
||||
Space usage properties of the pool's
|
||||
.Sy special_embedded_log
|
||||
metaslab allocator class.
|
||||
.Ed
|
||||
.El
|
||||
.Pp
|
||||
Each allocation class is described by these values:
|
||||
.Bl -tag -width "fragmentation"
|
||||
.It Sy allocated
|
||||
Amount of storage used within the allocation class.
|
||||
.It Sy available
|
||||
Estimate of free space available in the allocation class, adjusted for raidz
|
||||
parity overhead.
|
||||
The adjustment assumes a fixed 128KiB record size to compute a data-to-parity
|
||||
ratio.
|
||||
.Sy available
|
||||
is a heuristic for allocation and should not be interpreted as an exact measure
|
||||
of usable space.
|
||||
Actual usable space depends on a variety of factors such as dataset record size
|
||||
and compression.
|
||||
.It Sy capacity
|
||||
Percentage of allocation class space used.
|
||||
.It Sy expandsize
|
||||
Amount of uninitialized space within the allocation class that can be used to
|
||||
increase the capacity of the allocator.
|
||||
See the pool-wide
|
||||
.Sy expandsize
|
||||
property.
|
||||
.It Sy fragmentation
|
||||
The amount of free space fragmentation in the allocation class.
|
||||
See the pool-wide
|
||||
.Sy fragmentation
|
||||
property.
|
||||
.It Sy free
|
||||
The amount of free space available in the allocation class.
|
||||
This value is not adjusted for factors such as dataset record size, compression,
|
||||
or raidz parity overhead.
|
||||
See the pool-wide
|
||||
.Sy free
|
||||
property.
|
||||
.It Sy size
|
||||
Total size of the allocation class.
|
||||
.It Sy usable
|
||||
Estimate of total allocation class size, adjusted for raidz parity overhead.
|
||||
The adjustment assumes a fixed 128KiB record size to compute a data-to-parity
|
||||
ratio.
|
||||
.Sy usable
|
||||
is a heuristic for allocation and should not be interpreted as an exact measure
|
||||
of usable space.
|
||||
.It Sy used
|
||||
Estimate of storage used within the allocation class, adjusted for raidz parity
|
||||
overhead.
|
||||
The adjustment assumes a fixed 128KiB record size to compute a data-to-parity
|
||||
ratio.
|
||||
.Sy used
|
||||
is a heuristic for allocation and should not be interpreted as an exact measure
|
||||
of used space.
|
||||
.El
|
||||
.Pp
|
||||
The following property can be set at creation time and import time:
|
||||
.Bl -tag -width Ds
|
||||
.It Sy altroot
|
||||
|
||||
Reference in New Issue
Block a user