Extending a volume group


Size of volume group can be extended by adding more physical volume to the group. No downtime is required for extending a volume group

Step 1:

Creating a physical volume

[root@server1 ~]# pvcreate /dev/sdf
Physical volume “/dev/sdf” successfully created
[root@server1 ~]# pvs
PV VG Fmt Attr PSize PFree
/dev/sdb VG01 lvm2 a– 10.00g 0
/dev/sdc VG01 lvm2 a– 10.00g 9.99g
/dev/sdd VG01 lvm2 a– 10.00g 9.96g
/dev/sde VG01 lvm2 a– 10.00g 10.00g
/dev/sdf lvm2 a– 10.00g 10.00g

 

Step 2:

Extending the volume group by adding the new physical volume . Current volume group VG01 has size 40GB.
We are adding a physical volume of size 10GB to make the Volume group VG01 to 50GB

[root@server1 ~]# vgs
VG #PV #LV #SN Attr VSize VFree
VG01 4 2 0 wz–n- 39.98g 29.95g

 

[root@server1 ~]# vgextend VG01 /dev/sdf
Volume group “VG01” successfully extended
[root@server1 ~]# vgs
VG #PV #LV #SN Attr VSize VFree
VG01 5 2 0 wz–n- 49.98g 39.94g