you can find more information on this at:
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:
(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
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.
----- Original Message -----
From: "Nicolas Ecarnot" <nicolas(a)ecarnot.net>
To: "Federico Simoncelli" <fsimonce(a)redhat.com>
Cc: "users" <users(a)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
Le 22/07/2014 14:23, Federico Simoncelli a écrit :
> ----- Original Message -----
>> From: "Nicolas Ecarnot" <nicolas(a)ecarnot.net>
>> To: "users" <users(a)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?
>> 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.
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.
> 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).