User Tools

Site Tools


tech:documentation:procedures:vm:vm_disk_expansion_lvm_xfs

This is an old revision of the document!


VM disk Expansion LVM+XFS

Expand the original disk or add a second vdisk from Infrastructure client.
If you want to perform a grow w/o reboot you have to add a second disk THEN TAKE A SNAPSHOT!!!

then from on the vm either create an additional partirion on the free space. The partition type us 8e

cfdisk /dev/sda
### for example if the new partition is /dev/sda3
pvcreate /dev/sda3

or assign the whole new disk to lvm

cfdisk /dev/sdb
### for example if the new partition is /dev/sda3
pvcreate /dev/sdb

now you have to extend the volgroup. user lvdisplay to see which is the name of the group, in this example it's base and we assume the new partition is /dev/sda3

vgextend base /dev/sda3

check with pvscan if the extend was successfull

Now we extend the “data” partition to 11.5 GB. See man lvextend for other options

lvextend -L 11.5G  /dev/base/data 

now we have to grow the filesystem /data

xfs_growfs /data
/data/www/wiki.inf.unibz.it/data/attic/tech/documentation/procedures/vm/vm_disk_expansion_lvm_xfs.1233843075.txt.gz · Last modified: 2019/01/16 10:03 (external edit)