From: Heming Zhao <heming.zhao@suse.com>
To: "linux-lvm@redhat.com" <linux-lvm@redhat.com>
Subject: [linux-lvm] Question about filter behavior on pvcreate /dev/md0
Date: Thu, 13 Jun 2019 07:41:54 +0000 [thread overview]
Message-ID: <30658b04-07ec-0b28-a6ad-3d78a106010c@suse.com> (raw)
Hello List,
I created a md device, and used pvcreate to format it.
But the pvcreate was failed with filter rules.
the filter in /etc/lvm/lvm.conf:
```
filter = [ "r|/dev/.*/by-path/.*|", "r|/dev/.*/by-id/.*|",
"r|/dev/fd.*|", "r|/dev/cdrom|" ]
```
if I remove the filter, pvcreate will be successful. why?
steps:
```
# rpm -qa | grep lvm2
lvm2-2.02.180-10.el7_6.7.x86_64
lvm2-libs-2.02.180-10.el7_6.7.x86_64
# dd if=/dev/zero of=/dev/sda bs=1M
... ...
# dd if=/dev/zero of=/dev/sdb bs=1M
... ...
# mdadm -C /dev/md0 -l 0 -n 2 -a yes /dev/sda /dev/sdb
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md0 started
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 256M 0 disk
└─md0 9:0 0 508M 0 raid0
sdb 8:16 0 256M 0 disk
└─md0 9:0 0 508M 0 raid0
vda 253:0 0 40G 0 disk
├─vda1 253:1 0 1G 0 part /boot
├─vda2 253:2 0 38G 0 part /
└─vda3 253:3 0 1G 0 part [SWAP]
# pvcreate /dev/md0
Device /dev/md0 excluded by a filter.
```
Thanks
zhm
next reply other threads:[~2019-06-13 9:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-13 7:41 Heming Zhao [this message]
2019-06-14 8:51 ` [linux-lvm] Question about filter behavior on pvcreate /dev/md0 Zdenek Kabelac
2019-06-14 10:01 ` 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=30658b04-07ec-0b28-a6ad-3d78a106010c@suse.com \
--to=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 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).