Don't understand how disk size is assigned

xmox

Member
Jan 14, 2021
21
0
6
37
Hello,
have 1 VM with 800GB assigned (have 1TB SSD).

Usage stats:
Proxmox -> local-lvm : 68.98% (588.31 GB of 852.87 GB)\
df -h in VM (debian 12) : /dev/sda1 786G 33G 714G 5% /

What's wrong and how can I fix that please? Some days ago I had a problem, I moved some files to VM and it crashed because of full disk. But there was about 60% free space. Only proxmox showed me VM is full.

Thank you for your help and Happy New Year
 

Attachments

  • 2025-01-01_11h21_18.png
    2025-01-01_11h21_18.png
    62.4 KB · Views: 8
  • 2025-01-01_11h21_31.png
    2025-01-01_11h21_31.png
    11.3 KB · Views: 8
  • 2025-01-01_11h21_50.png
    2025-01-01_11h21_50.png
    88.7 KB · Views: 8
Thin provisioned data is VERY tricky if not impossible with respect to computing the actual disk usage. If you want reliable display, don't use thin provisioned storage or snapshottable storage.
 
Thank you. How can I fix that? I found another info which is not correct too
 

Attachments

  • 2025-01-01_11h48_12.png
    2025-01-01_11h48_12.png
    17.9 KB · Views: 9
If you don't use pre-allocated disks and maybe you also use snapshots you have to be careful because it's easy to have space problems, mainly due to the lack of trim/discard and/or snapshots.

It is essential:
- do not oversize the space too much based on the estimated amount that it will actually occupy and also leave a good margin, especially if you want to use snapshots
- don't have too many snapshots and/or for too long, at the beginning they don't take up space but the more you write to the disks the more they grow (it seems to me that many people underestimate them)
- another essential thing that I have seen that many do not do and/or do not make sure what function it has is the trim/discard, it is essential to deallocate the free space (or when you delete something) inside the vm. You need to make sure it is enabled both in the VM configuration and inside the VM and maybe test that it really works.
 
I can pay to someone who help me setup proxmox correctly and fix this problem. Payment via paypal for example.
 
Someone expert who helps you in the design, configuration and eventual maintenance can be useful, but it is also very useful that the users have a minimum of experience otherwise if the system is not constantly monitored by someone expert it is easy to have problems.

A simple example could be that of snapshots, when you have no knowledge and you do them and leave them for a long time without having any idea of how they work.

About disk of your case the more important think to check real space used is on first image of first post, the summary of the storage in proxmox.
A fast test you can do is trim free space on the vm:
Code:
fstrim -v /
When finished post the result and check the used size of local-lvm.
If don't works need to check vm configuration (useful also for post here, as the is no info about the vm configuration in previous post):
Code:
qm config <vmid>
For image there isn't also list of vm disk, of snapshot, so is possible to give also very generic information based on common users errors for similar cases.
 
Enabled discard in vm configuration, more exactly on the disk configuration.
Without discard is explained why it never deallocated the free space.
After enable discard reboot the vm and do again the fstrim.

EDIT:
Important: the fstrim must be done inside the vm
 
Last edited:
thank you, I enabled discard and run fstrim -v / inside VM.
I think it's good now but I'm not sure.
 

Attachments

  • 2025-01-01_13h07_54.png
    2025-01-01_13h07_54.png
    5.3 KB · Views: 6
  • 2025-01-01_13h04_20.png
    2025-01-01_13h04_20.png
    16.3 KB · Views: 5
  • 2025-01-01_13h08_40.png
    2025-01-01_13h08_40.png
    9.4 KB · Views: 4
  • 2025-01-01_13h09_11.png
    2025-01-01_13h09_11.png
    29.6 KB · Views: 4
  • 2025-01-01_13h09_30.png
    2025-01-01_13h09_30.png
    12.5 KB · Views: 5
Last edited:
Good, as you can see in the last image, a lot of space has finally been freed up, while the penultimate one is normal and remains like this, what you need to keep an eye on is the space used in the storage (last image).
The space used in the storage (76.33gb) is still greater than that of the VM disk (32gb), so there should be other disks or snapshots.

In case of snapshots keep attention, at the moment you have less than 10% of the used space and there will hardly be any problems for now, but it will be necessary to take it into account in the future with the growth of the storage used space and any big changes on the vm disk.
 
The more important thing is to monitor the used space of the storage in proxmox, avoid it filling up.
Acquiring a minimum of knowledge would be good.

It's not easy to say that there aren't other things to change or optimize (It's very likely that there is something to improve since it seems like you don't even have the basic knowledge), should have more information and see in detail, however I don't have time to see in detail, I just looked quickly to help you solve the main problem related to space.
 
  • Like
Reactions: xmox

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!