[linux-lvm] WARNING: Ignoring duplicate config node: filter (seeking filter)

Alasdair G Kergon agk at redhat.com
Mon Mar 5 19:35:51 UTC 2007

On Mon, Mar 05, 2007 at 08:16:35PM +0100, Cisco wrote:
> filter = [ "a/.*/", "r|/dev/cdrom|", "r|/dev/hda|", "r|/dev/hdb|",
> "r|/cdrom|" ]
Oops - the first pattern matches everything so the rest will have no effect:-)

The man page says:
              filter  -- List of patterns to apply to devices found by a scan.
              Patterns are regular expressions delimited by any character  and
              preceded  by a (for accept) or r (for reject).  The list is tra-
              versed in order, and the first regex that matches determines  if
              the device will be accepted or rejected (ignored).  Devices that
              don't match any patterns are accepted. If  you  want  to  reject
              patterns  that don't match, end the list with "r/.*/".  If there
              are several names for the same device (e.g.  symbolic  links  in
              /dev),  if  any  name  matches  any  a  pattern,  the  device is
              accepted; otherwise if any name matches  any  r  pattern  it  is
              rejected;  otherwise  it  is accepted.  As an example, to ignore
              /dev/cdrom you could use: devices { filter=["r|cdrom|"] }

agk at redhat.com

More information about the linux-lvm mailing list