From: Zdenek Kabelac <zkabelac@redhat.com>
To: Heming Zhao <heming.zhao@suse.com>,
LVM general discussion and development <linux-lvm@redhat.com>
Subject: Re: [linux-lvm] confused with lvm2 filter rules
Date: Thu, 6 Jun 2019 15:51:15 +0200 [thread overview]
Message-ID: <d94cb5bd-b327-89e7-ceba-1f53060d060e@redhat.com> (raw)
In-Reply-To: <c7b1ca31-b1b5-4964-1263-65b97ec3ed8d@suse.com>
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
next prev parent reply other threads:[~2019-06-06 13:51 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
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 [this message]
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=d94cb5bd-b327-89e7-ceba-1f53060d060e@redhat.com \
--to=zkabelac@redhat.com \
--cc=heming.zhao@suse.com \
--cc=linux-lvm@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.