[ovirt-users] How do I get discard working?

Fabian Deutsch fdeutsch at redhat.com
Wed Jun 10 18:24:31 UTC 2015


----- Original Message -----
> oVirt Node - 3.5 - 0.999.201504280931.el7.centos
> 
> Using our shared storage via baremetal (stock CentOS 7) -> iscsi, I can
> successfully issue fstrim commands. With oVirt at the VM level, even
> with direct LUNS, trim commands are not supported despite having the LVM
> config in the VMs set up to allow it.

Hey,

IIUIC you try to get discard working for VMs? That means that if fstrim is
used inside the VM, that it is getting passed down?

The command line needed for qemu to support discards is:

$ qemu … -drive if=virtio,cache=unsafe,discard,file=<disk> …

I'm not sure which qemu disk drivers/busses support this, but at least virtio does so.
I'm using it for development.

You could try a vdsm hook to modify the qemu command which is called when the VM is spawned.

Let me know if you can come up with a hook to realize this!

Greetings
fabian



More information about the Users mailing list