mmreclaimspace command
Reclaims free space on a GPFS file system.
Synopsis
mmreclaimspace Device [-Y] [-P PoolName] [-qos QosClass]
{--reclaim-threshold Percentage | --emergency-reclaim}
Availability
Available on all IBM Spectrum Scale editions.
Thin provisioning
For more information about thin provisioning in IBM Spectrum Scale and a list of supported operating systems and verified storage systems, see IBM Spectrum Scale with data reduction storage devices.
Description
- The size of the disk.
- The failure group of the disk.
- Whether the disk is used to hold data, metadata, or both.
- Available space in full blocks.
- Available space in subblocks.
- Reclaimed space in subblocks. This value indicates the number of subblocks that are discarded on the device by this instance of the command.
The mmreclaimspace command can be run against a mounted or unmounted file system.
- This command is I/O-intensive and should be run only when the system load is light.
- An asterisk at the end of a line indicates that the disk is in a state where it is not available for new block allocation. For more information, see mmdf command.
Parameters
- Device
- The device name of the file system to be queried for available file space. File system names
need not be fully qualified. fs0 is as acceptable as
/dev/fs0
.This parameter must be the first parameter in the command.
- -Y
- Displays the command output in a parseable format with a colon (:) as a field
delimiter. Each column is described by a header.Note: Fields that have a colon (:) are encoded to prevent confusion. For the set of characters that might be encoded, see the command documentation of mmclidecode. Use the mmclidecode command to decode the field.
- -P PoolName
- Reclaim space only for disks that belong to the specified storage pool.
- --qos QOSClass
- Specifies the Quality of Service for I/O operations (QoS) class to which the instance of the command
is assigned. If you do not specify this parameter, the instance of the command is assigned by
default to the maintenance
QoS class. This parameter has no effect unless the QoS service is enabled. For more information, see the topic mmchqos command. Specify one of the following QoS classes:
- maintenance
- This QoS class is typically configured to have a smaller share of file system IOPS. Use this class for I/O-intensive, potentially long-running GPFS commands, so that they contribute less to reducing overall file system performance.
- other
- This QoS class is typically configured to have a larger share of file system IOPS. Use this class for administration commands that are not I/O-intensive.
- --reclaim-threshold Percentage
- Specifies the threshold of reclaimable space, as a percentage value, beyond which a block
allocation segment will be selected to be reclaimed. A percentage of 0 means that all segments that
have reclaimable space are selected for reclaiming; a percentage of 90 means that only segments that
have reclaimable space over 90% are selected for reclaiming.
Considering that the block allocation segment is exclusively locked while space on it is being reclaimed, it is a good practice to choose a bigger value, such as 90, if the application is latency-sensitive, and choose a smaller value, such as 0, to reclaim all reclaimable space if the system is almost idle. The block allocation segment is a logical concept that is used to manage the disk space in a GPFS file system. Each segment contains free space and reclaimable space information.
- --emergency-reclaim
- Performs emergency recovery and releases pre-reserved space for the next GPFS file system
recovery. If the back-end storage is thin provisioned, it is possible that writing to a file in a
GPFS file system might fail because the thin-provisioned storage is out of physical space. That
situation can result in the file system being unmounted and not being recovered. To bring the file
system back into operation, an emergency recovery procedure is necessary. Issuing the
mmreclaimspace command with the
--emergency-reclaim option is part of the recovery process. Note: This option works only if the thin-provisioned storage is read-writable and the file system is mounted in restrict mode.For more information, see IBM Spectrum Scale with data reduction storage devices.
Exit status
- 0
- Successful completion.
- Nonzero
- A failure has occurred.
Security
You must have root authority to run the mmreclaimspace command.
The node on which the command is issued must be able to execute remote shell commands on any other node in the cluster without the use of a password and without producing any extraneous messages.For more information, see Requirements for administering a GPFS file system.
Examples
mmreclaimspace foofs --reclaim-threshold 0
The
command displays information as in the following
example:disk disk size failure holds holds free in KB free in KB reclaimed in KB
name in KB group metadata data in full blocks in fragments in subblocks
------------------------ -------- -------- ----- -------------------- ------------- ----------------
Disks in storage pool: system (Maximum disk size allowed is 8.82 TB)
gpfs1nsd 1169920000 -1 Yes No 1162211328 ( 99%) 15896 ( 0%) 1162227224 (99%)
------------ -------------------- ------------- ----------------
(pool total) 1169920000 1162211328 ( 99%) 15896 ( 0%) 1162227224 (99%)
Disks in storage pool: data (Maximum disk size allowed is 8.93 TB)
gpfs2nsd 1169920000 1 No Yes 1161445376 ( 99%) 20320 ( 0%) 1161465696 (99%)
gpfs3nsd 1169920000 2 No Yes 1161445376 ( 99%) 20320 ( 0%) 1161465696 (99%)
------------ -------------------- ------------- ----------------
(pool total) 2339840000 2322890752 ( 99%) 40640 ( 0%) 2322931392 (99%)
============ ==================== =============
(data) 2339840000 2322890752 ( 99%) 40640 ( 0%)
(metadata) 1169920000 1162211328 ( 99%) 15896 ( 0%)
============ ==================== ============= ================
(total) 3509760000 3485102080 ( 99%) 56536 ( 0%) 3485158616 (99%)
See also
Location
/usr/lpp/mmfs/bin