- add new disk to the VM and reboot
- fdisk -l , should see the new disk, make note of its device name, ex. /dev/sdb or /dev/sda
- create a partition on the new space,
cfdisk /dev/sdb
or
fdisk /dev/sdb
- create physical volume and reboot,
pvcreate /dev/sdb
reboot
- vgdisplay to get the name of your volume group
- extend the volume group onto the new physical volume
vgextend Ubuntu-vg /dev/sdb1
- lvdisplay to get the name of our main logical volume
- extend the logical volume
lvextend -L +XXG LogicalVolumeName , where XX is the number of gigs to add
lvextend -l +100%FREE LogicalVolumeName , extends using all free space
lvextend -l +100%FREE /dev/Ubuntu-vg/root
- extend the filesystem
resize2fs /dev/ubuntu-vg/root
No comments:
Post a Comment