[ovirt-users] Reclaim/Trim/issue_discards : how to inform my LUNs about disk space waste?

Federico Simoncelli fsimonce at redhat.com
Thu Nov 27 10:17:23 UTC 2014


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:block-discard,n,z
(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 at ecarnot.net>
> To: "Federico Simoncelli" <fsimonce at redhat.com>
> Cc: "users" <users at 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 at ecarnot.net>
> >> To: "users" <users at 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).
> >
> > https://bugzilla.redhat.com/show_bug.cgi?id=1017284



More information about the Users mailing list