[linux-lvm] LVM filter ignored?

Zdenek Kabelac zkabelac at redhat.com
Mon Jan 2 20:18:46 UTC 2017


Dne 2.1.2017 v 20:20 knebb at knebb.de napsal(a):
> Hi,
>
>
>>> So I tried:
>>> filter = [ "r|sdb.*/|","a|drbd0/|","a|.*/|" ]
>>>
>>
>> Just check the 'comment' for filters in lvm.conf -
>> there is stated you should NOT mix  'r' & 'a' together
>> (there is even no need for this in 99.9999%)
>>
> Well....it writes "be careful mixing" but in the examples mixing is
> shown. Appeared not to be soooo important.

Yep looking at the example it's actually bad one ;) will be fixed.

>
>> - either use plain list of rejects  'r'
>> - or set 'white-list' with all 'a'  finished with 'r .*'
>>
>> To to be exact in your case:
>>
>> Use just:    [ "r|/dev/sdb|" ]
>>
> I set this not as you recommended and indeed it appears to be working,

When you reject a device - and then you accept everything - device will
be accepted via 'different' link/mknod whatever it finds...
And there are now many links to reference the same device.

When you just reject  sdb  - you will reject all it's symlink (implicit)
But when you then in the same filter row later  'accept'  sdb as some 
'/dev/disk-by...' you explicitly overrule this 'implicit' reject.

By default what is NOT reject is 'accepted' by default in sence 'it's been
not rejected' by any previous filter.

It's almost similar to having explicit 'a|.*|' at the end, but will not accept 
rejected 'implicit' symlinks ;)

OK - enough - I'm pretty sure noone can actually understand this :)

Clear message is -  use  either  WHITE-LIST,  or  plain REJECT LIST
follow this rule and you have always clear logic.

That's basically all you need ;)


> Thanks, even I do not have a clue what I did wrong as I remember I had
> it this way. But I moght be wrong as it did not work as I configured it.

As said - it's hard to explain :)
And no - I've not been designing this logic...

Regards

Zdenek




More information about the linux-lvm mailing list