[SOLVED] Reduce local and Increase local-lvm Disk size?

bond347

Member
Oct 21, 2022
68
1
13
Hi All,

After installing proxmox 7.3, i saw the following disk sizes info
- local 100GB
- local-lvm 1.64TB


root:~# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 1.6T 0 disk
├─sda1 8:1 0 1007K 0 part
├─sda2 8:2 0 512M 0 part /boot/efi
└─sda3 8:3 0 1.6T 0 part
├─pve-swap 253:0 0 8G 0 lvm [SWAP]
├─pve-root 253:1 0 96G 0 lvm /
├─pve-data_tmeta 253:2 0 15.6G 0 lvm
│ └─pve-data 253:4 0 1.5T 0 lvm
└─pve-data_tdata 253:3 0 1.5T 0 lvm
└─pve-data 253:4 0 1.5T 0 lvm


root:~# vgs
VG #PV #LV #SN Attr VSize VFree
pve 1 3 0 wz--n- <1.64t 16.00g


root:~# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
data pve twi-a-tz-- <1.49t 0.00 0.14
root pve -wi-ao---- 96.00g
swap pve -wi-ao---- 8.00g


How could i reduce local-lvm to 1TB and take 600+/- GB to increase local disk from 100GB to 700GB?
 
See https://forum.proxmox.com/threads/reduce-size-of-local-lvm.78676/post-348810

You would also need to execute a 'lvresize' for your root LV after the 'lvremove' step.

So the steps should roughly be (NOT tested, just from the top of my head)
  1. lvremove pve/data
  2. lvresize -L +600GB pve/root --resizefs
  3. lvecreate -L 1000G -ndata pve
  4. lvconvert --type thin-pool --poolmetadatasize 10G pve/data
Since you remove the pve/data pool first, make sure that you have a backup of your VMs or CTs that you can restore afterwards.

Since you just installed, you could also just reinstall - in the installer you can specify the sizes of the LVs (advanced settings in disk setup step)
 
Hi Lukas and members,

Thanks for the reply and i will surely try it out soon.

BTW, I'm sure there might be a way to reduce and expand the Data and root LV on the fly without deleting the Data and root LV and resizing it. Why i'm asking this because if the server is a production and running for a year with data on it.

Hope you can shed some info.
 
After installing proxmox 7.3
Oh, I thought you have just installed Proxmox VE ;)

BTW, I'm sure there might be a way to reduce and expand the Data and root LV on the fly without deleting the Data and root LV and resizing it. Why i'm asking this because if the server is a production and running for a year with data on it.
As mentioned in the post I have linked, it is unfortunately not possible yet to shrink thin-provisioned thin-pools. The only way seems to be to destroy and recreate, I'm afraid.
 
  • Like
Reactions: bond347
See https://forum.proxmox.com/threads/reduce-size-of-local-lvm.78676/post-348810

You would also need to execute a 'lvresize' for your root LV after the 'lvremove' step.

So the steps should roughly be (NOT tested, just from the top of my head)
  1. lvremove pve/data
  2. lvresize -L +600GB pve/root --resizefs
  3. lvecreate -L 1000G -ndata pve
  4. lvconvert --type thin-pool --poolmetadatasize 10G pve/data
Since you remove the pve/data pool first, make sure that you have a backup of your VMs or CTs that you can restore afterwards.

Since you just installed, you could also just reinstall - in the installer you can specify the sizes of the LVs (advanced settings in disk setup step)
Hi Lukas,

I tried those steps no. 1-4 successfully. Thanks.

I also tried reinstalling and entered 600G for root, 50G for snapshot and leave empty for data volume. Upon completion, I saw the following:

root# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 1.6T 0 disk
├─sda1 8:1 0 1007K 0 part
├─sda2 8:2 0 512M 0 part /boot/efi
└─sda3 8:3 0 1.6T 0 part
├─pve-swap 253:0 0 8G 0 lvm [SWAP]
├─pve-root 253:1 0 428.8G 0 lvm /
├─pve-data_tmeta 253:2 0 11.9G 0 lvm
│ └─pve-data 253:4 0 1.1T 0 lvm
└─pve-data_tdata 253:3 0 1.1T 0 lvm
└─pve-data 253:4 0 1.1T 0 lvm


root# vgs
VG #PV #LV #SN Attr VSize VFree
pve 1 3 0 wz--n- <1.64t 50.00g


root# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
data pve twi-a-tz-- <1.14t 0.00 0.18
root pve -wi-ao---- 428.75g
swap pve -wi-ao---- 8.00g


1. root volume is just 428.8G <-- why not 600G as entered during the installation?
2. data volume is 1.1T <---- I'm ok with the sizing.

Hope you can give some explanation.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!