0

I'm running a VM in proxmox. I originally didn't have enough space allocated to the VM so now I'm trying to extend it. I've allocated more space in proxmox. And it is recognized in sda3.

I was using this as a guide https://www.linuxtechi.com/extend-lvm-partitions/

root@docker2:~# parted -ls
Model: QEMU QEMU HARDDISK (scsi)
Disk /dev/sda: 53.7GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name  Flags
 1      1049kB  2097kB  1049kB                     bios_grub
 2      2097kB  1076MB  1074MB  ext4
 3      1076MB  53.7GB  52.6GB
root@docker2:~# lsblk
NAME                      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
loop0                       7:0    0 55.5M  1 loop /snap/core18/2409
loop1                       7:1    0 61.9M  1 loop /snap/core20/1434
loop2                       7:2    0 55.5M  1 loop /snap/core18/2344
loop3                       7:3    0 61.9M  1 loop /snap/core20/1494
loop4                       7:4    0 67.8M  1 loop /snap/lxd/22753
loop5                       7:5    0 67.9M  1 loop /snap/lxd/22526
loop6                       7:6    0 44.7M  1 loop /snap/snapd/15904
loop7                       7:7    0 44.7M  1 loop /snap/snapd/15534
sda                         8:0    0   50G  0 disk
├─sda1                      8:1    0    1M  0 part
├─sda2                      8:2    0    1G  0 part /boot
└─sda3                      8:3    0   49G  0 part
  └─ubuntu--vg-ubuntu--lv 253:0    0   24G  0 lvm  /
sr0                        11:0    1  1.1G  0 rom

From this I'm guessing that I can now extend LVM. So now I run this

root@docker2:~# lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv -r
  Size of logical volume ubuntu-vg/ubuntu-lv unchanged from <24.00 GiB (6143 extents).
  Logical volume ubuntu-vg/ubuntu-lv successfully resized.
resize2fs 1.45.5 (07-Jan-2020)
The filesystem is already 6290432 (4k) blocks long.  Nothing to do!

Why does it say unchanged? The other 25 (or so gigs) are available.

What am I missing in this?

gmalenko
  • 3
  • 2

1 Answers1

0

You need to resize the physical volume first.

pvresize /dev/sda3
Gerald Schneider
  • 23,274
  • 8
  • 57
  • 89