How to enable feature-discard on Xen domU

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to enable feature-discard on Xen domU

ebradsha@gmail.com

I'm running Xen 4.2 and I'm trying to figure out how to enable feature-discard on my paravirtualized domU's. As I understand it, I must have discard enabled in order to run fstrimon my domUs and relay trim instructions back down to the block device.

Currently, when I run fstrim -v / on my domUs, I get this on RHEL7:

fstrim: /: the discard operation is not supported

Or this on a RHEL6 guest:

fstrim: /: FITRIM ioctl failed: Operation not supported

I can see from the output of xenstore-ls that feature-discard is set to 0 for all of my domU's:

   domain = "vm115"
   frontend = "/local/domain/5/device/vbd/51713"
   uuid = "dcacf79e-e80c-9019-a00f-f984d65e9159"
   bootable = "1"
   dev = "xvda1"
   state = "4"
   params = "/dev/VolGroup00/vm115_img"
   mode = "w"
   online = "1"
   frontend-id = "5"
   type = "phy"
   physical-device = "fd:8"
   hotplug-status = "connected"
   feature-flush-cache = "1"
   feature-discard = "0"
   feature-barrier = "1"
   feature-persistent = "1"
   sectors = "20971520"
   info = "0"
   sector-size = "512"

I cannot figure out what sort of changes I need to make to my Xen cfg files to enable discard.

Does anyone know how this is done on Xen 4.2?


_______________________________________________
Xen-users mailing list
[hidden email]
https://lists.xen.org/xen-users