Accidentally enlarged LV instead of the Thin Pool... Possible solutions?

Aston01

New Member
Dec 21, 2022
5
0
1
I cloned my 256GB main drive to a 1TB drive in order to have more available storage for my thin pool but I think I might have made a mistake somewhere along the lines. I was trying to extend my previous 256GB partition to utilize the new additional space and instead, it appears that I just created an additional partition but it wasn't merged with the original (to make one larger partition)

1685637673848.png

And it appears that I allocated it to the LV instead of the thin pool as intended.

1685637819533.png

Can someone possibly point me in the right direction regarding the general path I would need to take to rectify this issue? Ideally I'd prefer to have one LVM partition with the majority of the additional space allocated to my thin pool.
 
It does seem like what possibly happened is what you described. Although your second screenshot is a bit confusing - thats view of the "local" file storage that normally points to a subfolder on root disk.

You have to start with analyzing your LVM setup:
pvs
vgs
lvs

If the second LVM pool is not in use, then start deleting the layers. First LV, then VG if any, then PV if any, then extra partition.
Then you can use one of many articles one extending existing partition with free space : https://www.ryadel.com/en/resize-ex...d-disk-space-linux-centos-rhel-ubuntu-debian/
And continue with expanding VG. Proxmox will cut its own LVs.

All that changes if you dont in fact use lvm-thin for storage. You would need to provide output from below commands to get a more precise advice:
pvesm status
cat /etc/pve/storage.cfg
lvs
vgs
pvs


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
All that changes if you dont in fact use lvm-thin for storage. You would need to provide output from below commands to get a more precise advice:
pvesm status
cat /etc/pve/storage.cfg
lvs
vgs
pvs
Does it look like your first scenario would apply?

Code:
root@pve:~# pvesm status
Name                  Type     Status           Total            Used       Available        %
USB2TB                 dir   disabled               0               0               0      N/A
local                  dir     active       790558176        16922096       740859480    2.14%
local-USB500GB         dir     active       479578824       223440424       231703712   46.59%
local-lvm          lvmthin     active       158994432       142824698        16169733   89.83%

Code:
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

dir: USB2TB
        disable
        path /mnt/ntfs
        content vztmpl,backup,images,rootdir,iso,snippets
        prune-backups keep-all=1
        shared 1

dir: local-USB500GB
        path /mnt/usb500gb
        content backup,rootdir,iso,vztmpl,images,snippets
        prune-backups keep-all=1
        shared 0

Code:
root@pve:~# pvs
  PV             VG  Fmt  Attr PSize    PFree
  /dev/nvme0n1p3 pve lvm2 a--   237.97g    0
  /dev/nvme0n1p4 pve lvm2 a--  <693.04g    0

Code:
root@pve:~# lvs
  LV            VG  Attr       LSize    Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  data          pve twi-aotz-- <151.63g             89.83  2.28                           
  root          pve -wi-ao---- <766.28g                                                   
  swap          pve -wi-ao----    8.00g                                                   
  vm-100-disk-0 pve Vwi-aotz--    4.00m data        0.00                                   
  vm-100-disk-1 pve Vwi-aotz--   74.00g data        95.05                                 
  vm-101-disk-0 pve Vwi-a-tz--   20.00g data        99.77                                 
  vm-102-disk-0 pve Vwi-a-tz--    4.00m data        14.06                                 
  vm-102-disk-2 pve Vwi-a-tz--    4.00m data        1.56                                   
  vm-103-disk-0 pve Vwi-aotz--   20.00g data        88.86                                 
  vm-201-disk-0 pve Vwi-aotz--   32.00g data        86.47

Code:
root@pve:~# vgs
  VG  #PV #LV #SN Attr   VSize    VFree
  pve   2  10   0 wz--n- <931.01g    0
 
Does it look like your first scenario would apply?
Somewhat

You appear to have two partitions. Two PVs, both in the same VG (pve). Then you expanded your _ROOT_ logical volume on which your Root OS is located.
If you wanted to use the new space in the LVM pool for VM disks - you did the wrong thing, which will be hard to undo.
If you wanted to use the new space for "local" storage for VM disks stored as QCOW or RAW files, then you are ok.

To undo the expansion, at your own risk, you have to use something like https://www.2daygeek.com/reduce-shrink-decrease-resize-lvm-logical-volume-in-linux/
Or, if the data is backed up and/or not critical - rebuild your PVE.


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

You appear to have two partitions. Two PVs, both in the same VG (pve). Then you expanded your _ROOT_ logical volume on which your Root OS is located.
If you wanted to use the new space in the LVM pool for VM disks - you did the wrong thing, which will be hard to undo.
If you wanted to use the new space for "local" storage for VM disks stored as QCOW or RAW files, then you are ok.

To undo the expansion, at your own risk, you have to use something like https://www.2daygeek.com/reduce-shrink-decrease-resize-lvm-logical-volume-in-linux/
Or, if the data is backed up and/or not critical - rebuild your PVE.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
FWIW - I ended up just rebuilding the PVE.

Thanks for helping me sort out the options.
 

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!