Increase of size of ubuntu--vg-ubuntu--lv to cover full boot disk allocation

kratax

New Member
Mar 11, 2023
6
0
1
Dear all,
I have started to proxmox and have an issue with increasing size of ubuntu--vg-ubuntu--lv on ubuntu VM where the allocation of disk was increase to 1.6TB, however, I can see only 32.2GB inside Ubuntu. Below is the detail from parted and lsblk. Could you advice me how to allocate full sda3 size to ubuntu--vg-ubuntu--lv?
Thanks a lot!
Lubos

Number Start End Size File system Name Flags
1 1049kB 2097kB 1049kB bios_grub
2 2097kB 2150MB 2147MB ext4
3 2150MB 1645GB 1643GB


Model: Linux device-mapper (linear) (dm)
Disk /dev/mapper/ubuntu--vg-ubuntu--lv: 32.2GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:

Number Start End Size File system Flags
1 0.00B 32.2GB 32.2GB ext4

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS
loop0 7:0 0 55.6M 1 loop /snap/core18/2697
loop1 7:1 0 55.6M 1 loop /snap/core18/2708
loop2 7:2 0 63.3M 1 loop /snap/core20/1828
loop3 7:3 0 63.3M 1 loop /snap/core20/1822
loop4 7:4 0 111.9M 1 loop /snap/lxd/24322
loop5 7:5 0 49.8M 1 loop /snap/snapd/18357
loop6 7:6 0 1.1M 1 loop /snap/mosquitto/776
sda 8:0 0 1.5T 0 disk
├─sda1 8:1 0 1M 0 part
├─sda2 8:2 0 2G 0 part /boot
└─sda3 8:3 0 1.5T 0 part
└─ubuntu--vg-ubuntu--lv 253:0 0 30G 0 lvm /
sr0 11:0 1 1.8G 0 rom


kratax@ubuntuvmmachine:~$ sudo pvdisplay
--- Physical volume ---
PV Name /dev/sda3
VG Name ubuntu-vg
PV Size <30.00 GiB / not usable 0
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 7679
Free PE 0
Allocated PE 7679
PV UUID wHPCNE-cK0e-QLB2-g52k-LGRT-ixTe-ee1cKB
 
while you increased your disk size, you still need to extend your lvm volume and the ext4 filesystem inside it. The easiest way to do that is with gparted or, if you are comfortable with the commandline, there is a thread in the forum [1].

If you want to do it with gparted
  1. download the gparted live iso[2] to your proxmox instance.
  2. in the proxmox web interface, click on the ubuntu vm you want to increase, click on `hardware` -> `add` -> `cd/dvd drive` and select gparted as your iso.
  3. boot your vm, press `esc` on boot to enter the boot menu, select gparted.
  4. gparted will open, you should see a big bar of unused space. resize the lvm to the end of the unused space and then the ext4 partition. apply and done
once you reboot the ubuntu vm, you should see the increase

[1]: https://forum.proxmox.com/threads/resize-local-or-local-lvm-and-how.105263/
[2]: https://gparted.org/download.php
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!