Dne 06. 06. 19 v 15:30 Heming Zhao napsal(a):
Hello,

the filter is:
filter = [ "r|/dev/.*/by-path/.*|", "r|/dev/.*/by-id/.*|",
"r|/dev/fd.*|", "r|/dev/cdrom|", "a/.*/" ]

if filter doesn't contain "a/.*/":
- pvcreate, vgcreate & vgextend use regex filter to reject the disk.
(correct logic)
 > if filter contains "a/.*/":
- regex fileter pass the disk under pvcreate/vgcreate, create successfully.
- regex filter reject the disk under vgextend. (wrong. should create
successfuly)
- vgextend should do the same action as pvcreate/vgcreate.

Hi

As has been said - when you put a|.*| as the last rule - it's doing something different then you may think. So please do NOT test with such filter (I've been even planning to add 'WARNING:' message when lvm2 would spot such filter....)

log as below (with filter contain: "a/.*/"):

Not really interesting trace - the filter works correctly for this case.

The best advice is - DO NOT USE IT set this way.

Code is correct and there is no bug - it's just non-trivial to understand what just filter is doing. Behavior cannot be changed without causing regression for other users that set filters correctly.

So do you have any buggy trace for correctly set filter ?

Regards

Zdenek

_______________________________________________
linux-lvm mailing list
linux-lvm@redhat.com
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/

Reply via email to