All rights reserved, please indicate the source when citing
vgreduce - Reduce VG (Volume Group) Capacity
The vgreduce command is part of the Logical Volume Manager (LVM) toolset and is used to reduce the capacity of a Volume Group (VG) by removing one or more Physical Volumes (PVs) from it.
The basic syntax for the vgreduce command is as follows:
vgextend [OPTIONS] VG_NAME PV_NAME1 [PV_NAME2 ...] .
Here:
- "VG_NAME" is the name of the volume group from which you want to remove PVs.
- "PV_NAME1", "PV_NAME2", etc., are the names of the physical volumes you want to remove from the volume group.
Some commonly used options for the vgreduce command include:
- -a: Remove all empty physical volumes.
- -l: Display detailed information about the reduction.
- -y: Perform the reduction without prompting for confirmation.
For example, the following command will remove the physical volume "dev/sda1" from the volume group named "db_vg" to reduce its capacity:
# vgreduce db_vg /dev/sda1
|
After running this command, the capacity of the "db_vg" volume group will be reduced, and "/dev/sda1" will no longer be part of the volume group.
The vgreduce command is useful for administrators who need to reclaim physical storage resources from a volume group, whether because a physical volume is no longer needed or for other administrative reasons.
For more detailed explanations and additional examples of the vgreduce command in LVM, you can refer to the provided link.