Discard option causes hard lockup of guests

brad_mssw

Well-Known Member
Jun 13, 2014
133
9
58
I've been attempting to play around with the discard option in proxmox. When I enable that option, it seems I get random and unrecoverable lockups in the guest VMs (CentOS 7). The lockup doesn't appear to be disk-only, nothing works, console is unresponsive. Usually when I see a disk issue not everything is locked.

Currently I'm running Ceph Giant for my VM disk image store, the latest pve-no-subscription packages, and the 3.10.0-5-pve kernel.

In the VM, I've explicitly configured SCSI, then edited the VM's conf file and set "scsihw: virtio-scsi-pci" as I've read the old virtio blk driver doesn't support discard.

If I disable the discard option, I haven't been able to get the guest to lock up, so I don't think it is related to using virtio-scsi.

It should be noted that if I create a 20GB file in the guest before setting discard, then reboot with discard on, delete the file, and run fstrim, 'rados df' does show the reduction, so when discard is on, it definitely frees the disk space so it looks like it is just about there.

I know Proxmox doesn't really control these aspects, but I'm just looking for a hint on where to look, what the culprit might be. Qemu/Ceph/something else?

Thanks.
-Brad
 
Last edited:
I run a cron job weekly
/sbin/fstrim -v /
If that is any help...

Nope, as stated in my original statement, fstrim works within the guest and does as intended. My problem is random deadlocks when I have discard enabled (which facilitates the use of fstrim).
 

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!