[SOLVED] VM Disk consuming more space than assigned ?

dariuszszyc

Member
Sep 7, 2020
9
1
23
36
Hello,

Proxmox 7.4-17

I have usb NVME drive added as ext4 partition on which I have only 1 VM Disk.
There is nothing else on that drive (see NCDU below).

It's assigned to VM as 650 GB and I think ~698 GB Size indicated might be ok, but I don't understand why the size usage of that NVME is constantly growing and almost took all the capacity...

1714904246468.png

1714903982381.png

1714904214517.png

1714904006714.png

1714904036533.png

Here's what NCDU says...

1714904077966.png

1714904097277.png

After some advices from Reddit - I enabled the "Discard" option and ran fstrim. I also ensured it is executed weekly.

1714903605553.png

Code:
/usr/sbin/fstrim --fstab --verbose
Gave this response:
Code:
/srv/dev-disk-by-uuid-112a8316-67e8-4785-8ead-af534f82012f: 81.4 GiB (87449911296 bytes) trimmed on /dev/disk/by-uuid/112a8316-67e8-4785-8ead-af534f82012f
OpenMediaValut is the VM and it shows this :
1714903752354.png

I also had suggestion to load big file on that drive and remove it to force trim (after setting drive to Discard in Proxmox).

Didn't help.

So my 650 GB Disk, which according to OMV has 570 GB used space - in Proxmox still shows that it takes ~940 GB.

I loaded a 4GB file, but that increased the used space on Proxmox to 934GB.
Removed the file and ran fstrim again to see what happens - I'm back to 930 GB :(

I've read that this could be also a consequence of making backups using Proxmox snapshot mode, so I've changed backups of that VM to "Stop" mode, however this disk isn't part of the Backup.
 
I believe there are probably snapshots being stored within/with the copy-on-write image, see here.
If you show the {VMID}.conf file you'll probably/possibly find the snapshots.
 
I believe there are probably snapshots being stored within/with the copy-on-write image, see here.
If you show the {VMID}.conf file you'll probably/possibly find the snapshots.
1714906598612.png

I noticed the discard option on the HDD_4TB so I took it out as it's not SSD.
 
Last edited:
Hmm, so assuming that's the complete {VMID}.conf file (doesn't continue further down) - can't see any snapshots here. What about somewhere in GUI?
What does a full ls -R of that /images directory show.
 
Hmm, so assuming that's the complete {VMID}.conf file (doesn't continue further down) - can't see any snapshots here. What about somewhere in GUI?
What does a full ls -R of that /images directory show.

That's exactly what I don't understand - I don't know why GUI shows more usage than any other tool.

1714907337946.png

Could the "Directory" type be an issue ?

1714907432007.png
1714907456242.png
 
So a snapshot exists within the qcow2 with the TAG before_update.

I believe the 0 B size shows some error occurred with this snapshot/creation?

Can you see this snapshot in the GUI? ( VMID, Snapshots). Try & remove it there while the VM is shutdown.

If not you could try (while the VM is shutdown) qemu-img snapshot -d before_update /mnt/usb_lexar/images/105/vm-105-disk-0.qcow2

I remember reading once that you could transfer the image to another storage & back again, to get a clean image.



Edit: See here with reference to your situation.
 
  • Like
Reactions: dariuszszyc
So a snapshot exists within the qcow2 with the TAG before_update.

I believe the 0 B size shows some error occurred with this snapshot/creation?

Can you see this snapshot in the GUI? ( VMID, Snapshots). Try & remove it there while the VM is shutdown.

If not you could try (while the VM is shutdown) qemu-img snapshot -d before_update /mnt/usb_lexar/images/105/vm-105-disk-0.qcow2

I remember reading once that you could transfer the image to another storage & back again, to get a clean image.



Edit: See here with reference to your situation.
I do not see this snapshot in the GUI.
But I do recall there was some issue with snapshot/backup some time ago.
I think I removed it via GUI and thought the problem was solved as it disappeared.
Perhaps it didn't disappear fully.

A little shame this "empty" snapshot isn't visible in the GUI even though it's visible via CLI (something to improve perhaps).

I cannot do the copy thing as I don't have free 1 TB currently :D
I'll test the command you shared and let you know about results .
 
  • Like
Reactions: gfngfn256
Fortunately this VM Disk is only one of my backups ;)

And we have a success !

Thank you ! I've learned something new :)

msedge_vMko9Jin8U.png

msedge_gqnJaB5Hj8.png
 

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!