[SOLVED] VM thinks it has significantly more free space than local-lvm has free

offbrandd

New Member
Jun 12, 2025
3
1
3
Hey all, still somewhat new to this. Did attempt to google before posting.
My media VM (debian) shows 268GB out of 825.2GB available, but the local-lvm it's using only shows 65.39 GiB availble. Discard is enabled and I just ran an fstrim -va. I think I may have somehow overallocated storage, but I'm not really sure. I do have one other VM, but only 32GB of storage are allocated there and much less is actually used.

I have had a few crashes where the lvm-thin disk got filled up completely and I hate to go in a manually trim before I could start the VMs up again, might be relevant.

1749745686076.png
1749745697909.png
1749745718804.png 1749745740647.png
1749745767591.png
1749745791890.png
 
All your VM knows is that it has a disk with a size of 800G~ that you allocated to it. It does not know anything about LVM(-Thin) or the physical disk.
It can tell how much space it uses on that disk but that does not necessarily align with what the node sees. The space is thin allocated and between trims there is always some unused but allocated buffer space. I don't recommend giving a single guest more storage than you have in total.
To make trim/discard work properly and learn how to check the true used size I'd recommend you read this: https://gist.github.com/Impact123/3dbd7e0ddaf47c5539708a9cbcaab9e3#discard
 
Last edited:
  • Like
Reactions: offbrandd
Snapshot of the system was taking ~300GB. I deleted it and made a new one since the system is stable.

It seems the snapshot might be inflating as I remove media that existed when the snapshot was taken. Long term I'll be offloading the media storage to a NAS, but until then do I have any options to avoid the snapshot inflating like this? I only have ~1TB physical storage at the moment so I can't afford to not delete media after I've watched.
 
Last edited:
Snapshots, or rather the delta they store, will get larger the more the data has changed since when it was taken.
My approach to keep that in check is to do my snapshots automated via cv4pve-autosnap. I don't keep them for long.
 
Last edited:
  • Like
Reactions: offbrandd
Short-term, more frequent snapshots sound like a good idea given my storage constraints. I'll check out your recommendation. Thanks for your help!
 
Last edited:
  • Like
Reactions: Impact