[openstack-dev] [OpenStack-Dev] [libvirt] Block Devices and the "discard" option

Josh Durgin josh.durgin at inktank.com
Sat Oct 11 04:15:22 UTC 2014


On 10/10/2014 08:44 PM, John Griffith wrote:
> Hi,
>
> So I've been beating on this for a good part of the day and I'm not
> having much luck so I thought I'd ask on the ML if anybody has had any
> success with the following.
>
> We have some applications that have been migrated off of our physical
> machines and into our OpenStack Cloud.  The trouble is that these apps
> and our storage take advantage of fstrim which returns the error:
>
>            "fstrim: /: FITRIM ioctl failed: Operation not supported"
>
> I thought... oh, easy I'll work up a quick patch to add this to Cinder
> and Nova; but I don't seem to be having any luck getting this to work.
>
> I also cam across the Nova patch to add this to Local Disk here: [1]
> and I seem to get the same error there as well.
>
> Testing fstrim on the devices from the compute node works fine, just not
> the device passed in to the instance.
>
> The XML I'm sending looks like this [2]
>
> I'm running on 14.04 with RC1 builds.
>
> I'm not sure what I'm missing, or if anybody has been able to make this
> work, or if it should work.  Any insight would be greatly appreciated.
>
> Thanks,
> John
>
>
> [1]: https://review.openstack.org/#/c/112977/12
> [2]: https://gist.github.com/j-griffith/3341ad287c5d684f02b5

Hey John,

I'm not sure if it's the only issue, but the virtio bus doesn't support
discard. You need to use virtio-scsi, scsi, or ide.

Josh



More information about the OpenStack-dev mailing list