Increase local-lvm storage size

ascTim

New Member
Mar 27, 2018
4
0
1
28
Hey, I'm kinda new to Proxmox, so hopefully you can help me out with my problem.

I have a storage with a size of 185GB called "local-lvm (proxmox)". It has reached its limit, so now I want to increase the size.
Using "lsblk" in shell I could see, that I have 279GB available on that device.

sdb 8:16 0 279G 0 disk
├─sdb1 8:17 0 1M 0 part
├─sdb2 8:18 0 256M 0 part
└─sdb3 8:19 0 278.7G 0 part
├─pve-swap 253:0 0 8G 0 lvm [SWAP]
├─pve-root 253:1 0 69.5G 0 lvm /
├─pve-data_tmeta 253:2 0 96M 0 lvm
│ └─pve-data-tpool 253:4 0 185.2G 0 lvm
│ ├─pve-data 253:5 0 185.2G 0 lvm
│ ├─pve-vm--10013--disk--1 253:6 0 32G 0 lvm
...

How can I increase the size? There are currently VMs running which need to be up 24/7 if possible.


Thanks in advance!

ascTim
 
I recommend to buy another or a bigger disk, as you don't have 279 GB available. While the whole disk is 279 GB, the OS, swap and the lvm pools need to be subtracted from that. This will give you ~15 GB of available space, without shrinking the OS partition (you might need space there too). If you happen to get 50 GB (sure offline), then you will have the same problem later in time.

EDIT: changed metadata to lvm, to be more clear.
 
Thanks for your reply.
I currently have 99,91% used space. As I don't want the VMs to crash, I have to give like 10GB extra space for now.
There is also a 1,82TB drive in the server, but for some reason I can't mount / add it as a storage.

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 1.8T 0 disk

That's all I see when using lsblk.
So my plan would be to increase sdb by 10GB and add the 1,8TB drive as a storage.


Best regards,

ascTim
 
Your math is right! I did some shell commands:

root@proxmox:/# pvs
PV VG Fmt Attr PSize PFree
/dev/sdb3 pve lvm2 a-- 278.68g 15.81g

root@proxmox:/# vgs
VG #PV #LV #SN Attr VSize VFree
pve 1 13 0 wz--n- 278.68g 15.81g

root@proxmox:/# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
data pve twi-aotz-- 185.19g 93.34 41.66
root pve -wi-ao---- 69.50g
swap pve -wi-ao---- 8.00g
vm-10013-disk-1 pve Vwi-aotz-- 32.00g data 44.14
...


so I can give 15GB (or at least 10GB) to local-lvm. But how exactly do I do that?
But still, I want that 1,8TB drive to be my storage for new VMs.


Best regards,

ascTim
 
Thanks for the advices!
So I managed to create a new storage on sda1 with 1,82TB. After moving some VMs to the new storage, I saw that there's a disk of a VM that doesn't even exist? It's "vm-901-disk-1" with a size of 64GB. Not sure how to remove that one to be honest... should I open a new thread?


Best regards,

ascTim
 
If the config doesn't exist, you can delete the LV directly.


EDIT: I should note, that if in doubt, create a backup (qemu-img).
 

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!