Proxmox with local-lvm disk full

Vitinhos

New Member
Jun 16, 2023
14
0
1
Goodnight!
I have a server with Proxmox, with a 1TB SSD virtualizing a Windows Server, a pfSense firewall and two Windows machines. And overnight my local-lvm disk filled up by itself getting to 100% and the storage before was half full. I've already checked all the VMs and none are taking up as much space as the local-lvm disk indicates.
I already ran the TRIM command, I already set the TRIM timer to be every hour and the problem still persists.
Running the LVS command in the shell, it says for example that the VM-100 (pfSense firewall) is occupying 82%, but it is well below that. And it's like that with the other VMs too.
How could I be solving this problem of disk-lvm using almost all the storage?
 

Attachments

  • Screenshot_1.png
    Screenshot_1.png
    11.1 KB · Views: 21
  • Screenshot_2.png
    Screenshot_2.png
    15.2 KB · Views: 18
please post using CODE tags:
pveversion -v
qm config [vmid]
confirm that your disks have discard=on.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
Attached are the requested commands.
Only two VMs have discard=on and another two don't have discard enabled.
 

Attachments

  • Screenshot_1.png
    Screenshot_1.png
    66.8 KB · Views: 11
  • Screenshot_2.png
    Screenshot_2.png
    30.9 KB · Views: 12
  • Screenshot_3.png
    Screenshot_3.png
    23.8 KB · Views: 13
  • Screenshot_4.png
    Screenshot_4.png
    34.2 KB · Views: 10
  • Screenshot_5.png
    Screenshot_5.png
    42.1 KB · Views: 12
For trim to work, discard needs to be on:
https://pve.proxmox.com/pve-docs/chapter-qm.html#qm_hard_disk:~:text=this disk image.-,Trim/Discard,-If your storage
Code:
Trim/Discard
If your storage supports thin provisioning (see the storage chapter in the Proxmox VE guide), you can activate the Discard option on a drive. 
With Discard set and a TRIM-enabled guest OS [3], when the VM’s filesystem marks blocks as unused after deleting files, the controller will 
relay this information to the storage, which will then shrink the disk image accordingly. For the guest to be able to issue TRIM commands, you 
must enable the Discard option on the drive. Some guest operating systems may also require the SSD Emulation flag to be set. Note that 
Discard on VirtIO Block drives is only supported on guests using Linux Kernel 5.0 or higher.

Additional reading: https://gist.github.com/hostberg/86bfaa81e50cc0666f1745e1897c0a56
Make sure you follow all steps.

Its possible there is something else going on. Do you happen to have snapshots?

PS its much easier to read your data if you post it as text using CODE tags. You can use SSH to get plain text.


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Last edited:
Right!
I enabled discard=on all my VMs.
In the additional reading that you gave me, it tells me to access the vm through the shell and execute a trim command.
How do I do that ?
Code:
vm-170 $# fstrim --fstab --verbose

For now I don't have snapshots of my VMs
 

Attachments

  • 1686883227489.png
    1686883227489.png
    326 bytes · Views: 5

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!