Use the vxdisk reclaim command to trigger online Thin Reclamation on one or more disks, disk groups, or enclosures. By default, the vxdisk reclaim command performs Thin Reclamation on the disks where the VxVM volume is on a "mounted" VxFS file system. The reclamation skips disks that do not have a VxFS file system mounted. Thin reclamation is not supported for RAID-5 volumes, or for instant snapshots.
Storage Foundation logs the statistics for reclamation events in the /etc/vx/log/reclaim_log
file.
See About the reclamation log file.
By default, the commands below also perform TRIM reclamation if the specified disks are supported Solid State Devices (SSDs).
Reclaiming space on a disk
# vxdisk reclaim [disk...]
For example, to trigger reclamation on LUNs hitachi_usp0_065a and hitachi_usp0_065b:
# vxdisk reclaim hitachi_usp0_065a hitachi_usp0_065b
In the above example, suppose the hitachi_usp0_065a contains a VxVM volume vol1 with a VxFS file system. If the VxFS file system is not mounted, the command skips reclamation for hitachi_usp0_065a. The command scans hitachi_usp0_065b, and reclaims any unused space.
Performing an aggressive space reclamation on a disk
# vxdisk -o full reclaim [disk...]
For example, to trigger reclamation on LUNs hitachi_usp0_065a:
# vxdisk -o full reclaim hitachi_usp0_065a
In the above example, suppose the hitachi_usp0_065a contains a VxVM volume vol1 with a VxFS file system mounted. With the -o full option, the above command scans hitachi_usp0_065a for unused space outside of the vol1, and reclaims any unused space found. For example, if there is space between subdisks, it is reclaimed.
Reclaiming space on a disk group
# vxdisk [-o ssd | -o thin] reclaim diskgroup
For example, to trigger reclamation on the disk group oradg:
# vxdisk reclaim oradg
If the disk group contains both SSDs and Thin Reclamation LUNs, you can use the -o ssd option to perform only the TRIM operation. Use the -o thin option to perform only the thin reclamation.
You can turn off TRIM functionalty or thin reclamation for a specific device with the following command:
# vxdisk set reclaim=off disk
See the vxdisk
(1M) manual page.