Profile picture

Oscar Marion

How to resize logical volume in Proxmox

Oct 6, 2024 · 1 minutes read

A step-by-step guide for when your VM runs out of disk space.


Allocate more space on Proxmox

  1. Go to your VM > Hardware tab
  2. Select the disk you want to resize
  3. Click on the Disk Action dropdown in the menu bar, then Resize
  4. Resize the disk as much as you need:

proxmox-resize-disk

Extend the partition in the VM

1 - Make the partition see the space (dev/sda3 in my case)

sudo cfdisk

Then, resize the partition within cfdisk

2 - Extend the Physical Volume (PV) from the partition

sudo pvresize /dev/sda3

3 - Extend Logical Volume (LV) to use up all space from Volume Group (VG)

sudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv

4 - Resize file system

sudo resize2fs /dev/ubuntu-vg/ubuntu-lv

5 - Check that can see the space on filesystem

df -h

Source: https://packetpushers.net/blog/ubuntu-extend-your-default-lvm-space