Re: confused with lvm2 filter rules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Zdenek,

I totally got your point. Let's close this session.
Thank you for you reply.

Regards,
zhm

On 6/6/19 9:51 PM, Zdenek Kabelac wrote:
> 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@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/




[Index of Archives]     [Gluster Users]     [Kernel Development]     [Linux Clusters]     [Device Mapper]     [Security]     [Bugtraq]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]

  Powered by Linux