Proxmox VM Disk Resize
With resent database size issues on my Pi-hole cluster, I had discovered my usual method of resizing partitions in a VM did not work so thought I would note the steps I took to resize the VMs Disks for future reference
- In Proxmox select hardware for the VM in question
- Highlight the Disk needing resizing
- Select disk action drop down menu and click resize
- Enter in how many GBs to add to the VM
- Shutdown the VM
- Start the VM as normal
- Shell into the VM
- Run
sudo fdisk -lto list all the partitions on all the disks - Run
sudo parted /dev/"the disk needing resizing" - Now in the parted run
resizepart "number of partition"eg resizepart 2 if the partition was 2 on device sda /dev/sda2 - If all the space added to the VM disk is for this partition type 100% and press enter
- type quit and press enter
- Run
sudo resize2fs /dev/"partition device id"eg /dev/sda2 - The process is now finished, and the space is useable, if the disk doesn't appear resized then the user out and back in and run
df -h, and it will now be correctly resized