TrumanWong

vgextend

Add a physical volume to a volume group

Supplementary instructions

vgextend command is used to dynamically extend an LVM volume group. It increases the capacity of the volume group by adding physical volumes to the volume group. Physical volumes in an LVM volume group can be added when using the vgcreate command to create a volume group, or they can be added dynamically using the vgextend command.

grammar

vgextend(option)(parameter)

Options

-d: debug mode;
-t: Test only.

Parameters

  • Volume group: Specify the name of the volume group to be operated;
  • Physical volume list: Specify the list of physical volumes to be added to the volume group.

Example

Use the vgextend command to add a physical volume to volume group "vg2000". Enter the following command at the command line:

[root@localhost ~]# vgextend vg2000 /dev/sdb2 #Add physical volume "/dev/sdb2" to volume group "vg2000"

The output information is as follows:

Volume group "vg2000" successfully extended