VE Guest VM Unable to Discard

Keyninja

New Member
Apr 15, 2019
19
31
3
29
Hi everyone,

I have a guest VM which seems to be unable to utilize the discard option to free up block space. The guest VM is a Ubuntu 18.04 LTS OS with an ext4 root FS. Underlying storage is Ceph on Bluestore OSDs. VM storage controller is VirtIO-SCSI, with just a standard 1TB disk attached to it. I have the discard box checked on the disk, but attempting to run "fstrim -v /" returns a: "the discard operation is not supported".

Any ideas here guys? VE is fully updated, it just won't do discard for some reason.

Thanks all,
 
What is the disk-type of the VM?
Iirc discard/trim is only working for SCSI disks.
 
What is the disk-type of the VM?
Iirc discard/trim is only working for SCSI disks.
That actually pointed me in the right direction! I stopped the VM, detached the disk from it, and found the disk itself was a VirtIO-Block device. I changed it to SCSI and re-attached it to the VM, so my current config is a VirtIO-SCSI controller with a SCSI disk, and fstrim/discard now seems to work! Thanks for pointing me in the right direction, that seemed to fix it!
 

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!