From: Heming Zhao <heming.zhao@suse.com>
To: Zdenek Kabelac <zkabelac@redhat.com>,
LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] confused with lvm2 filter rules
Date: Thu, 6 Jun 2019 06:42:30 +0000 [thread overview]
Message-ID: <a0a7f1d8-9f0c-bc77-f30f-0b6b6a79ef53@suse.com> (raw)
In-Reply-To: <662c133e-cebe-1882-a086-edb2219af7f0@redhat.com>
Hello Zdenek,
Thank you very much for your explanation.
Regards,
zhm
On 6/5/19 6:20 PM, Zdenek Kabelac wrote:
> Dne 03. 06. 19 v 15:03 Heming Zhao napsal(a):
>> Hello,
>>
>> I met below filter action when executed 'vgextend'.
>> why the filter take no effect on executing pvcreate or vgcreate?
>
>> # rpm -qa | grep lvm2
>> lvm2-clvm-2.02.180-8.16.x86_64
>> lvm2-cmirrord-2.02.180-8.16.x86_64
>> lvm2-2.02.180-8.16.x86_64
>>
>> the filter rules:� (you can see all the disk in /dev/disk/by-id/ are
>> rejected)
>> # grep filter /etc/lvm/lvm.conf | grep -v "#"
>> ����� filter = [ "r|/dev/.*/by-path/.*|", "r|/dev/.*/by-id/.*|",
>> "r|/dev/fd.*|", "r|/dev/cdrom|", "a/.*/" ]
>
>
> Hi
>
> Filter with 'a|.*|' at the end will almost always never work.
> As devices do have several names so if you reject it by one name,
> you will likely accept it with another name.
>
>
> So I'd highly recommend only these 2 variants that are 'easy to follow'.
>
>
> 1. White-list devices you want to see and add r|.*|� as the last rule.
> ^^^^^^^^^^^^^^^ most recommended.
>
> 2. Pure list of reject rules (do not add any 'a' rule).
>
> Regards
>
> Zdenek
>
>
>
next prev parent reply other threads:[~2019-06-06 6:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-03 13:03 [linux-lvm] confused with lvm2 filter rules Heming Zhao
2019-06-05 2:41 ` Heming Zhao
2019-06-05 10:20 ` Zdenek Kabelac
2019-06-06 6:42 ` Heming Zhao [this message]
2019-06-06 8:16 ` Heming Zhao
2019-06-06 8:43 ` Zdenek Kabelac
2019-06-06 13:30 ` Heming Zhao
2019-06-06 13:51 ` Zdenek Kabelac
2019-06-10 2:43 ` Heming Zhao
[not found] ` <60982841-fabc-71d9-b8b1-6d98b87ba738@suse.com>
2019-06-25 7:56 ` Martin Wilck
2019-06-25 8:56 ` Zdenek Kabelac
2019-06-25 9:13 ` Heming Zhao
2019-06-26 6:49 ` Heming Zhao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a0a7f1d8-9f0c-bc77-f30f-0b6b6a79ef53@suse.com \
--to=heming.zhao@suse.com \
--cc=linux-lvm@redhat.com \
--cc=zkabelac@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).