[SOLVED] Ubuntu VM wont resize LVM

arcicstagmedia

New Member
Oct 28, 2020
5
0
1
31
Hi There, I have a Ubuntu VM that is running on my Proxmox, I started the VM with 20 GB however it has grown well beyond that, I have resized the disk to 96 GiB however I can't get the VM to resize.

Bash:
➜  / lsblk
NAME                      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
loop0                       7:0    0 32.3M  1 loop /snap/snapd/11588
loop1                       7:1    0 55.5M  1 loop /snap/core18/1988
loop2                       7:2    0 69.9M  1 loop /snap/lxd/19188
loop3                       7:3    0 32.3M  1 loop /snap/snapd/11402
loop4                       7:4    0 55.5M  1 loop /snap/core18/1997
loop5                       7:5    0 32.3M  1 loop
loop6                       7:6    0 70.4M  1 loop /snap/lxd/19647
sda                         8:0    0   94G  0 disk
├─sda1                      8:1    0    1M  0 part
├─sda2                      8:2    0    1G  0 part /boot
└─sda3                      8:3    0   29G  0 part
  └─ubuntu--vg-ubuntu--lv 253:0    0   29G  0 lvm  /
sr0                        11:0    1  914M  0 rom

I have tried running the following to resize the sda3 and the ubuntu--vg-ubuntu--lv

Code:
sudo lvresize --size +50G --resizefs /dev/mapper/ubuntu--vg-ubuntu--lv

and

Code:
 sudo lvresize --extents +100%FREE --resizefs /dev/mapper/ubuntu--vg-ubuntu--lv

but neither seem to want to resize the volume
 
Issue resolved
I booted into a live GParted instance, Resized sdb3 and then used
Code:
 sudo lvresize --extents +100%FREE --resizefs /dev/mapper/ubuntu--vg-ubuntu--lv
and it is now working as expected