Resizing Disk

Binksy

New Member
Feb 18, 2023
5
0
1
Hey

Made a slight error on installation in that all of the drive was not allocated correctly.

I need to change the local storage to be 100GB in total, and the remaining to be allocated to local-lvm

pve2 is a secondary drive

lvs

Code:
LV               VG   Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  base-6100-disk-0 pve  Vri---tz-k  90.00g data
  data             pve  twi-aotz-- 112.94g             83.65  3.74
  root             pve  -wi-ao---- <59.75g
  swap             pve  -wi-ao----   8.00g
  vm-108-disk-0    pve  Vwi-a-tz--  90.00g data        22.55
  vm-7000-disk-0   pve  Vwi-a-tz--  60.00g data        79.18
  vm-7000-disk-1   pve  Vwi-a-tz--  30.00g data        21.23
  pve2             pve2 twi-a-tz--  <1.07t             0.00   0.18


pvs

Code:
  PV             VG   Fmt  Attr PSize    PFree
  /dev/nvme0n1p3 pve  lvm2 a--  <199.00g  16.00g
  /dev/nvme1n1   pve2 lvm2 a--     1.09t 120.00m

vgs

Code:
  VG   #PV #LV #SN Attr   VSize    VFree
  pve    1   7   0 wz--n- <199.00g  16.00g
  pve2   1   1   0 wz--n-    1.09t 120.00m

So I am unable to resize using lvextend or other commands, as I think it's seeing the drive is partitioned fully, but that isn't the case. LVM is showing local has 62GB and local-lvm has 121GB

The drive is a 1TB drive, and would need it to be allocated as approx. 100GB to be for local storage and the remainder (900GB Approx) to go to LVM-Thin pool, but I can't seem to get that to work?

Just wondering what I am missing with this

TIA
 
Last edited:
There is really no easy way to reduce/shrink existing volume group, especially when you have lvs already allocated in them. You can find many discussions about it online, ie https://unix.stackexchange.com/questions/67702/how-to-reduce-volume-group-size-in-lvm
Your best bet is to :
a) migrate your VM disks from PVE to PVE2, you can use "move disk" option
b) remove lvm-thin pool (first from PVE, then manually from disk)
c) extend your root LV and filesystem as desired
d) recreate lvm-thin pool from remaining space
e) optionally: move VM disks back

good luck


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 

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!