Expanding a guest VM’s disk

Looks like I’m running low on disk on my virtual machine (VM) running ownCloud. Luckily, there’s plenty more available on the host so today I’m expanding the logical volume (LV).

Step one – as always, BACKUP your data. I use rsnapshot together with ssh and mysqldump.

Step two – shutdown the guest.

Step three – On host run (as root): ssm resize /dev/vg0/cloudStorage -s+250G. Where vg0 is the name of your storage pool and cloudStorage is the name of your LV. SSM is a smart tool that takes care of partitioning, logical volumes, storage pools and file system.

Step four – Start your guest: virsh start ownCloud (or whatever the name of your VM).

Done. Happy clouding!