Local LVM Storage

killswitchin

New Member
Mar 17, 2024
5
1
1
Hi,
I am new to proxmox and was wondering why my local-lvm is filling up when I transferred media files to a completely different drive. My scenario was, I had a windows 11 vm spun up with 8TB HDD, I connected an external SSD via usb and passed it through to the VM no problem but I noticed as I transferred the files not only was it filling up the HDD but also the local-lvm (NVMeSSD) as well. My questions are 1.Why would it put data on my local-lvm if I'm transferring files to a completely different drive? (please note all this is all default settings in proxmox from a fresh install) 2. When I was searching for resolution for my issue on how to remove files from the local-lVM all I could find was how to expand the local and not how to clean up the local-lvm. How do I locate and clear the data from the local-lvm so I don't have to do a fresh install and start over? (I was looking into this because there should be no reason for the local-lvm to be used and you can start getting IO errors if the local-lvm is full when starting the vm)
 
  • Like
Reactions: memeske
"local-lvm" is the default storage where your virtual disks are stored. In case you didn't add more phsyical disks/storages the 8TB virtual disks of that Win 11 VM is probably stored on that "local-lvm" storage.
As with any other thin-provisioned storages...you will have to enable discard for that VM on the PVE node and tell the guest OS to do regular TRIMs/discards for space to be freed up again.
 
  • Like
Reactions: Kingneutron
But I don't understand why these storage's have to be "linked"? Sure, if the local-LVM wants to hold some proxmox info ok, they want to hold some data for the drives I have mounted ok but why dose it need to hold a copy of the files? In my mind the drives should be separate e.g. Proxmox has my 1TB NVMe and uses a certain % of it to hold some data and I can provision the rest of the storage however I want. The windows 11 vm has my 8TB HDD and should store the data I have transferred only on that drive. Also what if for example I have an 2TB external drive and I want to transfer files to my 8TB hdd but proxmox only has the 800gig or so form the NVMe? The space runs out and I can't transfer anymore data? the local-LVM almost feels like a cashe drive and wont auto trim it's self once the files have been passed through? I'm sorry if this sounds silly but I am having an issue with the logic behind the operation of the file storage. once again I am new and I'm sorry if this sounds dumb and i'm sure i'm just missing something that I don't fully understand.
 
"local-lvm" shouldn't grow unless you got virtual disks of your VMs/LXCs stored on it and you write to them. So my guess is still that you misconfigured your VM with a virtual disks on that "local-lvm".

Output of qm config YourVMsVMID , lvs and pvesm status would help.
 
"local-lvm" shouldn't grow unless you got virtual disks of your VMs/LXCs stored on it and you write to them. So my guess is still that you misconfigured your VM with a virtual disks on that "local-lvm".
I think you are right and there is something i'm not understanding in the setup of the VM I will have to review and experiment with to undertsand the behavior of proxmox better.
Output of qm config YourVMsVMID , lvs and pvesm status would help.
I would like to but I already did a fresh install as I am still learning and wanted to go over my setup again.
 
I think I might have an idea of what happen now. I put the storage of the OS on the local-lvm that then links any additional storage I setup in the OS to that local-lvm therefor when any data is stored on the VM it fills the local-lvm as well. At this point I need to understand if I have to find a away to separate the multiple storage devices so my other drives don't get stored on the local-lvm as well.
 
I put the storage of the OS on the local-lvm that then links any additional storage I setup in the OS to that local-lvm therefor when any data is stored on the VM it fills the local-lvm as well. At this point I need to understand if I have to find a away to separate the multiple storage devices so my other drives don't get stored on the local-lvm as well.
Then it sounds like a mounting problem inside your guest OS. If you don't properly mount a filesystem but write stuff to the empty mountpoint, the data will end up on the virtual disk.
 
After a fresh install the issue is no longer occurring. thank you everyone for helping me understand this process and I hope this thread gives some incite to someone in the future who many face a similar issue.
 
First Comment on ANY forum in my life. New with Proxmox.
Saw this topic and been intrigued about it

I have wondered why some, right after proxmox install, just delete the local-lvm from the datacenter storage menu and issue the following on CLI:
lvremove /dev/pve/data
lvresize -l +100%FREE /dev/pve/root
resize2fs /dev/mapper/pve-root

I see what's happening. I have done it in some of my past installs. But curious why some do this and others say it's not a great idea.
Found the instructions pretty easily, but haven't gotten the "reason" explanation.
 
There are two cases:
A) people come from EXSi with with its image file bases storages and don't understand the LVM-Thin and its benefits of thin provisioned and snapshotable block devices or
B) they got dedicated disks only for storing VMs/LXCs, don't plan to store any virtual disks on the system disk and therefore want the whole space for the root filesystem to be able to use all the space for ISOs/templates/snippets.
 
  • Like
Reactions: Kingneutron

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!