Bug 1017284 (RHEV_Discard_on_DirectLUN) - [RFE] Add SCSI discard support for DirectLUN disks sitting on a virtio-scsi controller
Summary: [RFE] Add SCSI discard support for DirectLUN disks sitting on a virtio-scsi c...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: RHEV_Discard_on_DirectLUN
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: RFEs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ovirt-3.6.5
: 3.6.0
Assignee: Idan Shaby
QA Contact: Elad
URL:
Whiteboard:
Depends On: 889075 919236
Blocks: 835616 892932 994246 RHEV_pass_discard_from_guest 1331277
TreeView+ depends on / blocked
 
Reported: 2013-10-09 14:53 UTC by Ademar Reis
Modified: 2021-05-01 16:23 UTC (History)
28 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
With this release, direct LUN disks with a VirtIO-SCSI interface include discard support when Enable SCSI Pass-Through is enabled.
Clone Of: 919236
Environment:
Last Closed: 2016-04-26 17:46:36 UTC
oVirt Team: Storage
Target Upstream Version:
Embargoed:
sherold: Triaged+
lsvaty: testing_plan_complete-


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1331277 0 unspecified CLOSED [Docs][Admin][VMM] Document functionality for 'Enable SCSI Pass-Through' 2021-02-22 00:41:40 UTC

Internal Links: 1331277

Comment 5 Nicolas Ecarnot 2014-11-22 21:53:17 UTC
Can we extend this RFE to every parts of oVirt where LVM is used : [master or not] storage domains?

Comment 6 Paolo Bonzini 2014-11-24 11:21:58 UTC
Indeed; for virtio-scsi DirectLUN it should already work, since DirectLUN uses <disk type='lun'> in the libvirt XML.  It's when the disk is not DirectLUN that you need to explicit enable discard support.

Comment 7 Nicolas Ecarnot 2014-11-27 09:33:53 UTC
Paolo, just to be clear : I wanted to speak about master storage domain and other storage domains. They are intensively using LVM.

On these storage domains, the discard option is not set, thus the SAN does not know when volumes get removed. So thin-provisionned LUNS on the SAN never get cleaned up.

This change seem to be easy to implement, and will not degradate performances, as LV deletion are not so frequent.

Comment 8 Paolo Bonzini 2014-12-01 16:56:23 UTC
Ok, this is indeed a different part of oVirt that doesn't deal with libvirt or qemu-kvm.  I cannot say if this requires a separate oVirt RFE.

Comment 11 Idan Shaby 2016-03-13 11:26:34 UTC
After researching the discard command, these are my conclusions:

The discard command is supported by SCSI and IDE disks (see [1] - section 2.9, "Block devices"), and will actually work if:
1. The OS supports it.
2. The partition/device you try to send the discard command from is configured to pass it on.
3. The underlying storage supports it.

In terms of oVirt, working with discard is possible via two interfaces of a direct lun: VirtIO-SCSI and IDE (VirtIO is not supported).
- If you work with VirtIO-SCSI, and the disk is configured to "Enable SCSI Pass-Through", you get discard support "for free".
- If you work with VirtIO-SCSI, and the disk is not configured to "Enable SCSI Pass-Through", you can always enable it, which will also enable the support for discard (this will require to turn off the VM, first).
Theoretically, we can add discard='unmap' to VirtIO-SCSI disks that are not configured to "Enable SCSI Pass-Through", so that discard will be supported.
- Same holds for working with IDE disks. They currently don't support discard, but we can add discard='unmap' to an IDE disk to support it.

Anyway, whether your disk's interface is IDE, VirtIO or VirtIO-SCSI (that doesn't enable SCSI Pass-Through), you can always turn off the VM, switch its interface to VirtIO-SCSI, enable SCSI Pass-Through and get the support for discard commands.

Therefore, my conclusion is that we need to close this RFE and document that discard support can be achieved by using the right interface with the configuration of "Enable SCSI Pass-Through".

Yaniv, what do you think?


[1] http://wiki.qemu.org/ChangeLog/1.5

Comment 12 Yaniv Lavi 2016-03-13 11:39:08 UTC
Based on the above comment, I'm re-targeting to be VERIFIED in 3.6.5.
Please inform the customers with cases attached.

Comment 13 Yaniv Lavi 2016-03-13 11:40:07 UTC
We will only support this in VirtIO-SCSI disks, IDE interface will not be supported.

Comment 15 Ademar Reis 2016-03-14 14:08:03 UTC
Thanks for the investigation and the update. I've added comments to the two cases which are currently open. So I guess GSS will follow up with them.

Comment 16 Elad 2016-03-21 12:00:05 UTC
Executed the following:

https://polarion.engineering.redhat.com/polarion/#/project/RHEVM3/testrun?id=4_0_Storage_Discard_support_for_DirectLUNs_run_21_03_2016


LUN actual size, on the storage server, decreased after removal of data from it, while it is attached to a VM with VirtIO-SCSI, SCSI pass through enabled and discard specified for the mounted device in the supported file system (tested using ext4).

Verified using:
ovirt-engine-4.0.0-0.0.master.20160310051350.git3151c66.el7.centos.noarch
vdsm-4.17.999-724.gitb8cb30a.el7.centos.noarch

XtremIO as the underlying storage.

Comment 17 Tal Nisan 2016-04-11 12:21:53 UTC
Idan, please add doc text

Comment 22 Allon Mureinik 2016-07-17 15:56:16 UTC
Tahlia, I think the doctext here might be a bit misleading: "**With this release**, direct LUN disks.."

Nothing has actually been done in this release (4.0) wrt discarding. Enabling SCSI passthrough on any RHEV/DC/Cluster version that supports it (3.3 and above) will also pass through discard requests from the guest down to the storage server.
The request here is to document this behavior, as it may not be obvious, but not to suggest it's something new added to the product.

Comment 23 Tahlia Richardson 2016-07-18 02:23:58 UTC
Discard support in docs is captured as part of BZ#1331277. 
If this bug still requires errata doc text for 4.0 release notes, I can remove "With this release". If it doesn't, I'll clear the doc text field and flag.

Comment 24 Allon Mureinik 2016-07-18 02:40:32 UTC
(In reply to Tahlia Richardson from comment #23)
> Discard support in docs is captured as part of BZ#1331277. 
> If this bug still requires errata doc text for 4.0 release notes, I can
> remove "With this release". If it doesn't, I'll clear the doc text field and
> flag.

BZ#1331277 covers everything we need. As there's really nothing new here, there's no need for a release note. Setting requires-doctext-.


Note You need to log in before you can comment on or make changes to this bug.