Remove a physical volume from a volume group
vgreduce command Reduce the volume group capacity by deleting physical volumes in the LVM volume group. The last remaining physical volume in an LVM volume group cannot be deleted.
vgreduce(options)(parameters)
-a: If the physical volume to be deleted is not specified in the command line, all empty physical volumes will be deleted;
--removemissing: Delete the lost physical volumes in the volume group to restore the volume group to normal status.
Use the vgreduce command to remove the physical volume /dev/sdb2
from the volume group "vg2000". Enter the following command at the command line:
[root@localhost ~]# vgreduce vg2000 /dev/sdb2 #Delete the physical volume "/dev/sdb2" from the volume group "vg2000"
The output information is as follows:
Removed "/dev/sdb2" from volume group "vg2000"