[linux-lvm] unable to exclude LVs using global_filter
Marian Csontos
mcsontos at redhat.com
Tue Jan 2 11:03:01 UTC 2018
On 01/02/2018 07:47 AM, Gordon Messmer wrote:
> I'd like to avoid scanning LVs, and I thought I'd set global_filter
> appropriately. The following logs show global_filter set to reject
> ^/dev/VolGroup/vm_, but the system is scanning
> /dev/VolGroup/vm_wiki_data. Any hints as to what I'm doing wrong?
>
>
>
> Dec 06 13:08:37 kvm-test.private lvm[532]: Setting devices/global_filter
> to global_filter = [ "r|^/dev/VolGroup/vm_|", "r|^/dev/dm-|", "a|.*/|" ]
Hi Gordon, remove the last component in the filter: 'a|.*/|'.
Filters accept any device if any of it's "names" (all symbolic links) is
matched by an a pattern ("a|.*/|" in your case) and matches no previous
r pattern - for example anything in /dev/mapper/ is accepted.
When used as a blacklist filter(s) must contain only "r" paterns.
BTW it is usually better to use white list: list "a" patterns for all
disks you wish to accept and add "r|.*|" at the end.
-- Martian
More information about the linux-lvm
mailing list