reducevg Command
Purpose
Removes physical volumes from a volume group. When all physical volumes are removed from the volume group, the volume group is deleted.
Syntax
Description
The reducevg command removes one or more physical volumes that are represented by the PhysicalVolume parameter from the VolumeGroup. When you remove all physical volumes in a volume group, the volume group is also removed. The volume group must be varied on before it can be reduced.
- To use this command, you must either have root user authority or be a member of the
system
group. - Sometimes a disk is removed from the system without first running reducevg VolumeGroup PhysicalVolume. The VGDA still has this removed disk in its memory, but the PhysicalVolume name no longer exists or reassigned. To remove references to this missing disk you can still use reducevg, but with the Physical Volume ID (PVID) instead of the disk name: reducevg VolumeGroup PVID.
- You cannot use the reducevg command on a snapshot volume group.
- You cannot use the reducevg command on a volume group that has an active firmware that is assisted dump logical volume.
- The
reducevg
command discards any background space reclamation process that is running for the physical volumes that are removed from the volume group. To identify whether a space reclamation is running, you can use thelvmstat
command with -r option. - Delete the key server and key file authentication methods of all encrypted logical volumes that are configured on the physical volumes before you run the reducevg command. The reducevg command deletes only the Platform keystore (PKS) authentication method before the encrypted logical volume is deleted.
For volume groups created on AIX 5.3 and
varied on without the varyonvg -M
flag, reducevg
will dynamically
raise the logical track group size for the volume group if necessary to match the common max
transfer size of the remaining physical volumes.
You might also use the System Management Interface Tool (SMIT) smit
reducevg
fast path to run this command.
Flags
Item | Description |
---|---|
-d | Deallocates the existing logical volume partitions and then deletes resultant empty logical
volumes from the specified physical volumes. User confirmation is required unless the -f flag is added. Attention: The reducevg command with the -d flag automatically deletes all logical
volume data on the physical volume before removing the physical volume from the volume group. If a
logical volume spans multiple physical volumes, the removal of any of those physical volumes may
jeopardize the integrity of the entire logical volume.
|
-f | Removes the requirement for user confirmation when the -d flag is used. |
-p | Removes the physical volumes that are associated with the specified mirror pool. |
-w | Waits for the completion of the space reclamation process. Note: The wait time for space
reclaim completion depends on the number of physical partitions.
|
Security
- RBAC users
- Attention RBAC users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations that are associated with this command, see the lssecattr command or the getcmdattr subcommand.
Examples
- To remove physical volume
hdisk1
from volume groupvg01
, enter:reducevg vg01 hdisk1
- To remove physical volume
hdisk1
and all residing logical volumes from volume groupvg01
without user confirmation, enter the following command. - To remove the physical volumes that are associated with the
mp1
mirror pool from thevg00
volume group, run the following command:reducevg -p mp1 vg00
Files
Item | Description |
---|---|
/usr/sbin/reducevg | Directory where the reducevg command resides. |
/tmp | Directory where the temporary files are stored and while the command is running. |