Comment 1 for bug 2013123

Revision history for this message
Gorka Eguileor (gorka) wrote :

As far as I know Nova doesn´t really block it, it issues a debug log message telling us this will probably not work [1], but it still sets the `discard=unmap` option in the libvirt XML. Maybe I'm missing something...

I was removing this debug message [2] when I realized that it doesn't actually work (just like Nova is saying)! Though I don't know why that is :-(

If I set the "hw_disk_bus" metadata key on the glance image to ide, scsi, or sata, then the sparseness is correct within the VM.

We can check if trimming is reported as supported on the OS by going into the VM and checking if /sys/class/$DEV/queue/discard_max_bytes is not zero.

[1]: https://opendev.org/openstack/nova/src/commit/971809b4d4db39e98d6534531e55d5b8fcde49cb/nova/virt/libvirt/driver.py#L2132-L2147

[2]: https://review.opendev.org/c/openstack/nova/+/885356