Resize vserver partition

From Wiki
Jump to: navigation, search

Change vserver LVM partition size

Here's the sequence for changing a vserver LVM partition size

  • Check if there is room to expand on the server
vgdisplay
  • Shut down the vserver.
vserver NAME stop
  • Unmount their partition (try killing rebootmgr if it won't unmount)
umount /dev/my_volume_group/NAME
  • Run the following command
e2fsadm -L [NumberOfGigabytes]G /dev/my_volume_group/NAME

If this command isn't present or doesn't work use these commands

lvextend -L+[NumberOfGigabytes]G /dev/my_volume_group/NAME
e2fsck -f /dev/my_volume_group/NAME
resize2fs /dev/my_volume_group/NAME
  • Mount their partition
mount /dev/my_volume_group/NAME /vservers/NAME
  • Restart the vserver (you might get FAILED errors when bringing up the eth, it should be fine)
vserver NAME start