Sunday, February 14, 2010

How to increase size of a logical volume in linux:

1) check that you have enough free space
vgs

2) shutdown domU (in this example 'xen07')
xm shutdown xen07

3) check that xen07 is not in the list
xm list

4) if it still there wait or kill it
xm destroy xen07

5) make new size = 200GB
lvextend -L200G /dev/mapper/node0001h4hvg0-xen07

6) check new sizeif logical volume
e2fsck -f /dev/mapper/node0001h4hvg0-xen07

7) resize file system
resize2fs /dev/mapper/node0001h4hvg0-xen07

8) start VPS xen07
xm create -c xen07