Mailinglist Archive: yast-devel (48 mails)

< Previous Next >
[yast-devel] Fwd: [Research] change lvm2 filter rules
Not sure if this really affects us, but FYI:

(this is about SLE-12-SP?)

-------- Forwarded Message --------

Subject: [Research] change lvm2 filter rules
Date: Mon, 17 Jun 2019 09:46:02 +0000
From: Heming Zhao <heming.zhao@xxxxxxxx>
To: research@xxxxxxx <research@xxxxxxx>, yast-internal@xxxxxxx

Hello List,

I want to change the filter rules in /etc/lvm/lvm.conf.
the bug 1137296 is my motivation:

currently filter in lvm.conf:
filter = [ "r|/dev/./by-path/.|", "r|/dev/./by-id/.|", "r|/dev/fd.|",
"r|/dev/cdrom|", "a/./" ]
with above filter, in 12sp3 (lvm2 2.02.120) below 3 commands work normal:
pvcreate /dev/disk/by-id/xxxx
vgcreate vgtst /dev/disk/by-id/xxxx
vgextend vgtst /dev/disk/by-id/xxxx

filter logic in 12sp3:
first, reject all /dev/*/by-{path|id}/* , /dev/fd.* , /dev/cdrom.
then the last "a/./" overwrite previous reject rules.
so finally, filter action is like: filter=["a|.*|"]
At least in 12sp3, the end of "a|.*|" make the filter useless. It makes no
different with empty filter. It scanning all devices with cmd like pvcreate,
vgcreate & vgextend. there is no speed up scanning time.

But in 12sp4, lvm version 2.02.180+
pvcreate & vgcreate work fine. vgextend will meet filter reject.
I dig the code, vgextend not take the last "a/./" filter.
I also ask this question to upstream, they didn't think this is a bug.:

I didn't dig out the history of the filter. why append the "a|.*|" at the end.

So I recommend in new lvm2 release (2.02.180+) using empty filter rule
(removing all filter, this is also redhat style). If customers want to do
some special customized configuration, customers should write rules by
themselves. Suse is providing mechanism, customer is applying policy.
Below is my patch (you can see I commented out the filter):
# below filter work in 12sp3 and previous
# filter = [ "r|/dev/./by-path/.|", "r|/dev/./by-id/.|", "r|/dev/fd.|",
"r|/dev/cdrom|", "a/./" ]

Does anybody disagree with me?


To unsubscribe, e-mail: yast-devel+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: yast-devel+owner@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages