Proxmox Ubuntu Disk Resize

proxmox Nov 26, 2020

If you have installed Ubuntu on Proxmox there is a chance at somepoint that your /dev/mapper partition will become full.

To expand it. Log into Proxmox, Resize the LVM by adding xG.

SSH onto your Ubuntu VM

df -h (shows the issue)

/dev/mapper/ubuntu--vg-ubuntu--lv                                            19G   13G  4.8G  74% /

fdisk -l

sudo /sbin/lvresize -l +100%FREE /dev/mapper/ubuntu--vg-ubuntu--lv

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

Done

EDIT: I ran into some issues when the LVM part is full and it cant write any changes. Try the Following

sudo apt-get clean

sudo pvresize /dev/sda3

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

reboot

EDIR2:

Further issues when resize doesnt work

lsblk

shows the disk SDA and the partitions.

sudo fdisk /dev/sda

P  = shows partitions

d  =  deletes a partition in this case sda3

n  =  create new partition - default to 3

first sector should be the same as the previous deleted partiton

end sector will be the new end

do you want to remove signatures = NO

w  =  write

DONE

Tags

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.