[yast-devel] Fwd: [Research] change lvm2 filter rules
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:
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@suse.com> To: research@suse.de <research@suse.de>, yast-internal@suse.de <yast-internal@suse.de> Hello List, I want to change the filter rules in /etc/lvm/lvm.conf. the bug 1137296 is my motivation: - http://bugzilla.suse.com/show_bug.cgi?id=1137296 currently filter in lvm.conf: 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.: https://www.redhat.com/archives/linux-lvm/2019-June/msg00014.html https://www.redhat.com/archives/linux-lvm/2019-June/msg00020.html 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? Regards, zhm -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org To contact the owner, e-mail: yast-devel+owner@opensuse.org
participants (1)
-
Stefan Hundhammer