[x]Blackmoor Vituperative

Friday, 2016-01-08

Expanding Ubuntu LVM in VCenter

Filed under: Linux — bblackmoor @ 16:40

These are notes for my own benefit, but I am sharing them publicly in case someone else might find them useful. The paths and volume names below are specific to my own situation, of course: yours will probably be different.

  • In VCenter, add an ISO for GParted to the data store.
  • Set the VM to boot to the bios.
  • Set the bios to boot from the CD drive.
  • Load the ISO in the CD drive of the VM.
  • In gparted, deactivate the partitions so they can be resized.
  • In gparted, expand the LVM partitions to use the additional 100 GB of file space.
  • Shut down the VM and remove the ISO from the VM.
  • Start up the VM, and in Ubuntu, run these commands:
  • sudo lvextend /dev/mapper/template-root /dev/sda5
  • sudo resize2fs /dev/mapper/template-root
  • Then reboot the VM one more time.