How To Resize Partition Local And Local-LVM On Proxmox
Managing storage efficiently is essential for maintaining a stable and scalable Proxmox environment. In this guide, you will learn how to safely resize the Local and Local-LVM partitions step by step. The tutorial explains how to identify disk layouts, extend volumes, and update the Proxmox storage configuration correctly. This process helps you increase available space without reinstalling the system or affecting your existing virtual machines. Each step is presented clearly, making it easy for both beginners and experienced system administrators to follow. You will also learn common issues when resizing partitions and how to fix them. With proper storage expansion, your Proxmox server becomes more flexible and efficient for daily workloads. Follow along to optimize your Proxmox VE setup and unlock more usable storage effortlessly.
Case 1: Reduce local-lvm capacity to increase local capacity
Lab: local 27.21Gb, local-lvm 21.88Gb. Simulate need to increase 10Gb for local
Step 1: Remove local-lvm
Go to GUI Datacenter Storage select local-lvm Remove
Go to Shell run command remove pve/data
lvremove pve/data
Step 2: Increase capacity for local
lvresize -L +10GB pve/root –resizefs
resize2fs /dev/pve/root
Step 3: Recreate local-lvm
Recreate local-lvm 5Gb drive (thin pool)
lvcreate -L 5G -ndata pve
Recreate metadata size
lvconvert –type thin-pool –poolmetadatasize 1G pve/data
Gui Re-add LVM-Thin storage
Add all remaining free space to lvm
lvresize -l +100%FREE pve/data
Case 2: Reduce local capacity to increase local-lvm
Lab: local 27.21Gb, local-lvm 21.88Gb. The emulator needs to increase 10Gb for local-lvm
Step 1: Add Ubuntu Desktop iso file CD
Or boot from usb containing Ubuntu Desktop installation
Step 2: Go to Ubuntu Desktop’s Try interface
Open terminal Check file system errors
sudo e2fsck -f /dev/pve/root
Step 3: Reduce filesystem (reduce before reducing LV)
For example, you want to reduce from 27G to 17G (reduce 10Gb)
sudo resize2fs /dev/pve/root 17G
Note: you must enter the remaining capacity, not the subtracted capacity.
Step 4. Reduce Logical Volume
sudo lvreduce -L 17G /dev/pve/root
_______________________________________
Step 5. Expand pve/data
sudo lvextend -l +100%FREE /dev/pve/data
Step 6: Remove CD, shutdown
Restart proxmox and check
lsblk
Note: When not to resize
• If there is a VM with a disk on local-lvm, the LVM-thin pool is busy, and cannot change the partition or expand the volume directly.
• If the filesystem is mounted and in use (e.g. /var/lib/vz on local), it cannot be resized manually while the system is running.
=> Use case 2