In a previous article we looked at LVM. This short article describes how to grow an existing volume by adding an extra disk to the system. Specifically, we use a XenServer guest VM with CentOS installed.
The first disk of a XenServer guest VM is called xvda, the second disk (the one we added) is called xvdb. We start with the creation of a Physical Volume (PV) on the extra disk.
pvcreate /dev/xvdb
Then we extend the existing Volume Group (VG) called VolGroup00.
vgextend VolGroup00 /dev/xvdb
Then we extend the Logical Volume (LV) by the size of the extra disk, in this case 8GB.
lvextend -L8G /dev/VolGroup00/LogVol00
Finally we resize the filesystem that uses this LV.
resize2fs /dev/VolGroup00/LogVol00

Hi,
Thanx for interesting post!
Would you have a similar suggestion on how to increase the Logical Volume (LV) if you increase the size of the physical disk (not adding a new one). In XenCenter I’ve increase a disk from 8GB to 100GB – but when I run e.g.
lvextend -L92G /dev/VolGroup00/logVol00
I get a message: Innsufficient free space: 2757 extents needed, but only 0 available. I assume I must do something in addition.
Thanx for any input.
I’m running cento5.7 and xenserver5.6