[SOLVED] Force discard on VM disk

molnart

Active Member
Jul 30, 2020
41
7
28
41
i have reorganized the content of my VM and moved some data to a separate virtual disk to have more flexibility if i ever need to increase the disk size, not touching the OS partition. now the original virtual disk has a lot of free space, but the VM still takes up ~130 GB on the local-lvm storage. Can i somehow force the discard function so that that the VM disk only uses those ~10 gigs actually used?

Code:
$ df -h /dev/vda1 /dev/vda3
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        27G  9.3G   17G  37% /
/dev/vda3        99G  1.4G   94G   2% /srv/dev-disk-by-uuid-6a783240-d831-4733-9a6c-075770839750
 
thank you, that was exactly the command i was looking for. discard was enabled on the disk, but without running the command it did not free up the space somehow.
 

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!