Why is space not being freed from disk after deleting a file?

goldenfox

New Member
Apr 17, 2024
3
1
3
I have a problem with (local-lvm) space in my proxmox. I deleted a lot of files to free up some space in (local-lvm), but the space in proxmox is still reserved.
In screenshot 01 in my (VM 100) I have 66g used from 147G and 75G is free, and I am using (local-lvm) for this VM. You can see that in screenshot 02.
And if I go to (local-lvm) to check the storage status, I see that 112.44G used from 151.64G so the free space is 151.64 - 112.44 = 39.2G.
How can I fix this problem? In a few weeks, (local-lvm) will be full and the VM will stop.
 

Attachments

  • 03.png
    03.png
    57 KB · Views: 4
  • 01.png
    01.png
    85.3 KB · Views: 4
  • 02.png
    02.png
    64 KB · Views: 4
You have to set up discard for the virtual disk and set up discard for the guests filesystem or run fstrim regularily in each VMs guestOS.
For LXCs you need to run pct fstrim YourVMID regularily.
 
i'm begginer with proxmox c
You have to set up discard for the virtual disk and set up discard for the guests filesystem or run fstrim regularily in each VMs guestOS.
For LXCs you need to run pct fstrim YourVMID regularily.
thanks for your Answer, but i'm beginner with proxmox can u explain how to do that step by step or share me a post or videos to explain that :(
 
i'm begginer with proxmox c

thanks for your Answer, but i'm beginner with proxmox can u explain how to do that step by step or share me a post or videos to explain that :(
Please search the forum for "discard" and "fstrim". There should be hundreds of threads explaining this.
For the support of discard of virtual disks you need to go to the VMs hardware tab, edit the virtual disks and check the "discard" checkbox. You need to choose a protocol like "virtio SCSI" that supports TRIM commands or that checkbox will be grayed out.
How to enable discard/trim inside the VM totally depends on the guestOS and what filesystem the guestOS is using.
 
Please search the forum for "discard" and "fstrim". There should be hundreds of threads explaining this.
For the support of discard of virtual disks you need to go to the VMs hardware tab, edit the virtual disks and check the "discard" checkbox. You need to choose a protocol like "virtio SCSI" that supports TRIM commands or that checkbox will be grayed out.
How to enable discard/trim inside the VM totally depends on the guestOS and what filesystem the guestOS is using.
Thanks a lot u helped me a lot with your instructions, it really solved my problem
 
  • 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!