Is there an easy method to increase the size of the VM?

Jarvar

Well-Known Member
Aug 27, 2019
317
10
58
When I first created the PBS VM I went with the default 32 GB but ran out of space. I was able to increase it to 150GB, However I had to take the unit offline.
I first used
qm resize 100 scsi0 +118G

then I booted into Gparted and added the unallocated space.
I believe th next was.

lvresize --size 148G --resizefs /dev/mapper/pbs-root

The size was a little smaller just to be safe.
Anyways I can't figure out how to do it while the VM is online.
I have gone through the initial step, but can't get the parts after.

I used fdisk to create a new partition with the remaning space, then I pvcreate /dev/sda4 since It's SDA, and my root and swap are on sda3

then I used:
lvextend -l +100%FREE /dev/mapper/pbs-root

I see now that I have pbs-root in both sda3 and sda4
 
Hi,
I don't think there's an easier way than what you did. As the pbs-root volume is a logical volume, it doesn't really matter that the physical volumes for it are different partitions. You could've extended partition 3 directly instead of creating a new one, but it doesn't really make a difference.