After a default installation, a tiny disk space given to Proxmox root volume. Insufficient disk space issue raised up after several VMs installed and backup made, as iinstallation image files *.ISO and backup all put into root volume.
In storage.cfg:
1 2 3 4 5 6 7 8 9
root@pve:~# cat /etc/pve/storage.cfg dir: local path /var/lib/vz content iso,vztmpl,backup
lvmthin: local-lvm thinpool data vgname pve content rootdir,images
root@pve:~# lvdisplay --- Logical volume --- LV Name data VG Name pve # open 0 LV Size <3.58 TiB
--- Logical volume --- LV Path /dev/pve/swap LV Name swap VG Name pve LV Status available # open 2 LV Size 8.00 GiB
--- Logical volume --- LV Path /dev/pve/root LV Name root VG Name pve LV Status available # open 1 LV Size <112.25 GiB
Solution is to decrease the size of pve/data volume, as this volume doesn’t support reducing thin pools in size yet, and then to increase the size of pdev/root volume.
Backup all VMs, then remove pve/data volume:
1 2
root@pve:~# lvremove pve/data Removing pool pve/data will remove 7 dependent volume(s). Proceed? [y/n]: y
Based on the disk space has just released, increase the size of pdev/root volume, 20% for current FREE space in this case:
1 2 3 4 5 6 7 8 9
root@pve:~# lvextend -l +20%FREE /dev/pve/root Size of logical volume pve/root changed from <112.25 GiB (28735 extents) to <851.09 GiB (217878 extents). Logical volume pve/root successfully resized.
root@pve:~# resize2fs /dev/pve/root resize2fs 1.47.0 (5-Feb-2023) Filesystem at /dev/pve/root is mounted on /; on-line resizing required old_desc_blocks = 15, new_desc_blocks = 107 The filesystem on /dev/pve/root is now 223107072 (4k) blocks long.
root@pve:~# vgdisplay --- Volume group --- VG Name pve System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 126 VG Access read/write VG Status resizable MAX LV 0 Cur LV 3 Open LV 2 Max PV 0 Cur PV 1 Act PV 1 VG Size <3.73 TiB PE Size 4.00 MiB Total PE 976498 Alloc PE / Size 967446 / 3.69 TiB Free PE / Size 9052 / <35.36 GiB VG UUID UEsIZR-TBsz-UYlP-u2FO-2AbC-uq4d-vcb35f
Create thin pool volume of the metadata, usually size of 1% of pve/data volume:
1 2 3 4 5 6 7
root@pve:~# lvconvert --type thin-pool --poolmetadatasize 36G pve/data Reducing pool metadata size 36.00 GiB to maximum usable size <15.88 GiB. Thin pool volume with chunk size 64.00 KiB can address at most <15.88 TiB of data. WARNING: Converting pve/data to thin pool's data volume with metadata wiping. THIS WILL DESTROY CONTENT OF LOGICAL VOLUME (filesystem etc.) Do you really want to convert pve/data? [y/n]: y Converted pve/data to thin pool.
Verify current disk volumes, pve/root disk volume has more space now: