Skip to content

Instantly share code, notes, and snippets.

@ayushsharma82
Forked from smashah/proxmox-ubuntu-resize
Created May 1, 2024 10:36
Show Gist options
  • Save ayushsharma82/fc865649ebdefbaf5d8d80303dd0361e to your computer and use it in GitHub Desktop.
Save ayushsharma82/fc865649ebdefbaf5d8d80303dd0361e to your computer and use it in GitHub Desktop.
Resize Ubuntu on proxmox hd size
Based on:
https://gist.github.com/gjrdiesel/4e93d8743b71babb58dcba4ee049247c
https://www.reddit.com/r/Proxmox/comments/hkvl9a/cant_extend_ubuntu_20_lvm_after_expanding_raw_disk/
1.
`lsblk`
asuming sda3 is ubuntu--vg-ubuntu--lv
`sudo parted`
`resize parted 3`
`100%`
`exit`
`sudo pvresize /dev/sda3`
`sudo pvs`
`sudo lvextend /dev/ubuntu-vg/ubuntu-lv -l+100%FREE`
`sudo resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv`
# Make sure the reserve space is correct. You should keep it at 1%
`sudo tune2fs -l /dev/mapper/ubuntu--vg-ubuntu--lv | egrep "Block count|Reserved block count"`
`sudo tune2fs -m 1 /dev/mapper/ubuntu--vg-ubuntu--lv`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment