Reclaim/Trim/issue_discards : how to inform my LUNs about disk space waste?

Hi, In my hosts, I see that /etc/lvm/lvm.conf shows : issue_discards = 0 Can I enable it to 1 ? Thank you? [oVirt 3.4.1, iSCSI, Equallogic SANs] -- Nicolas Ecarnot

Le 03/07/2014 16:54, Nicolas Ecarnot a écrit :
Hi,
In my hosts, I see that /etc/lvm/lvm.conf shows :
issue_discards = 0
Can I enable it to 1 ?
Thank you?
[oVirt 3.4.1, iSCSI, Equallogic SANs]
Hi, Should I ask this question on the dev mailing-list? -- Nicolas Ecarnot

Anyone? Le 11/07/2014 09:45, Nicolas Ecarnot a écrit :
Le 03/07/2014 16:54, Nicolas Ecarnot a écrit :
Hi,
In my hosts, I see that /etc/lvm/lvm.conf shows :
issue_discards = 0
Can I enable it to 1 ?
Thank you?
[oVirt 3.4.1, iSCSI, Equallogic SANs]
Hi,
Should I ask this question on the dev mailing-list?
-- Nicolas Ecarnot

----- Original Message -----
From: "Nicolas Ecarnot" <nicolas@ecarnot.net> To: "users" <users@ovirt.org> Sent: Thursday, July 3, 2014 10:54:57 AM Subject: [ovirt-users] Reclaim/Trim/issue_discards : how to inform my LUNs about disk space waste?
Hi,
In my hosts, I see that /etc/lvm/lvm.conf shows :
issue_discards = 0
Can I enable it to 1 ?
Thank you?
You can change it but it's not going to affect the lvm behavior in VDSM since we don't use the host lvm config file. This will be probably addressed as part of bz1017284 as we're considering to extend discard also to vdsm images (and not direct luns only). https://bugzilla.redhat.com/show_bug.cgi?id=1017284 -- Federico

Le 22/07/2014 14:23, Federico Simoncelli a écrit :
In my hosts, I see that /etc/lvm/lvm.conf shows :
issue_discards = 0
Can I enable it to 1 ?
Thank you?
You can change it but it's not going to affect the lvm behavior in VDSM since we don't use the host lvm config file.
This will be probably addressed as part of bz1017284 as we're considering to extend discard also to vdsm images (and not direct luns only).
I tried with and without my RH subscription, but I'm not allowd to read this bug... -- Nicolas Ecarnot

On 07/22/2014 07:21 PM, Nicolas Ecarnot wrote:
Le 22/07/2014 14:23, Federico Simoncelli a écrit :
In my hosts, I see that /etc/lvm/lvm.conf shows :
issue_discards = 0
Can I enable it to 1 ?
Thank you?
You can change it but it's not going to affect the lvm behavior in VDSM since we don't use the host lvm config file.
This will be probably addressed as part of bz1017284 as we're considering to extend discard also to vdsm images (and not direct luns only).
I tried with and without my RH subscription, but I'm not allowd to read this bug...
fixed, but its currently mostly a place holder titled: Bug 1017284 - [RFE] Add SCSI discard support for DirectLUN disks sitting on a virtio-scsi controller

Le 22/07/2014 14:23, Federico Simoncelli a écrit :
----- Original Message -----
From: "Nicolas Ecarnot" <nicolas@ecarnot.net> To: "users" <users@ovirt.org> Sent: Thursday, July 3, 2014 10:54:57 AM Subject: [ovirt-users] Reclaim/Trim/issue_discards : how to inform my LUNs about disk space waste?
Hi,
In my hosts, I see that /etc/lvm/lvm.conf shows :
issue_discards = 0
Can I enable it to 1 ?
Thank you?
You can change it but it's not going to affect the lvm behavior in VDSM since we don't use the host lvm config file.
Frederico, May you describe a little more how it's done, explain the principle, or point us to a place where we can learn more about how LVM is used in oVirt, amongst the manager and the hosts. Thank you.
This will be probably addressed as part of bz1017284 as we're considering to extend discard also to vdsm images (and not direct luns only).
-- Nicolas Ecarnot

Hi Nicolas, you can find more information on this at: https://bugzilla.redhat.com/show_bug.cgi?id=981626 First of all an important note (that was already mentioned): vdsm is not using lvm.conf, so whatever change you make there it won't affect vdsm behavior. Anyway long story short, enabling issue_discards in lvm would lead to lvm commands starvation when the lv that you're removing is large and the granularity is small. The correct solution is to use blkdiscard on the lv and I happened to submit a patch series for that yesterday: http://gerrit.ovirt.org/#/q/status:open+project:vdsm+branch:master+topic:blo... (very much experimental) The approach is to begin with issuing blkdiscard when "wipe after delete" is selected on the disk. That is because blkdiscard in the majority of the cases will wipe the lv data and I know that someone in the past has been brave enough to try and recover data from a mistakenly removed lv that wasn't post-zeroed. Anyway extending the support to non post-zero is trivial and it's just a matter of agreement and expectations. With regard to the legitimate question of why both post-zero and block discard, the answer is that after discussing it with storage array experts it seems that blkdiscard has no contract in guaranteeing that the data will be blanked out and it could later on show up even on a completely different LUN of the same storage. -- Federico ----- Original Message -----
From: "Nicolas Ecarnot" <nicolas@ecarnot.net> To: "Federico Simoncelli" <fsimonce@redhat.com> Cc: "users" <users@ovirt.org> Sent: Thursday, November 27, 2014 10:43:06 AM Subject: Re: [ovirt-users] Reclaim/Trim/issue_discards : how to inform my LUNs about disk space waste?
Le 22/07/2014 14:23, Federico Simoncelli a écrit :
----- Original Message -----
From: "Nicolas Ecarnot" <nicolas@ecarnot.net> To: "users" <users@ovirt.org> Sent: Thursday, July 3, 2014 10:54:57 AM Subject: [ovirt-users] Reclaim/Trim/issue_discards : how to inform my LUNs about disk space waste?
Hi,
In my hosts, I see that /etc/lvm/lvm.conf shows :
issue_discards = 0
Can I enable it to 1 ?
Thank you?
You can change it but it's not going to affect the lvm behavior in VDSM since we don't use the host lvm config file.
Frederico,
May you describe a little more how it's done, explain the principle, or point us to a place where we can learn more about how LVM is used in oVirt, amongst the manager and the hosts.
Thank you.
This will be probably addressed as part of bz1017284 as we're considering to extend discard also to vdsm images (and not direct luns only).

Le 27/11/2014 11:17, Federico Simoncelli a écrit :
Hi Nicolas, you can find more information on this at:
https://bugzilla.redhat.com/show_bug.cgi?id=981626
First of all an important note (that was already mentioned): vdsm is not using lvm.conf, so whatever change you make there it won't affect vdsm behavior.
Anyway long story short, enabling issue_discards in lvm would lead to lvm commands starvation when the lv that you're removing is large and the granularity is small.
The correct solution is to use blkdiscard on the lv and I happened to submit a patch series for that yesterday:
http://gerrit.ovirt.org/#/q/status:open+project:vdsm+branch:master+topic:blo... (very much experimental)
Thank you Frederico, This sounds very clever and encouraging. Would it be possible to imagine see it appear in a future 3.6.? release? -- Nicolas Ecarnot
participants (3)
-
Federico Simoncelli
-
Itamar Heim
-
Nicolas Ecarnot