Dne 29.12.2016 v 21:28 [email protected] napsal(a):
Hi all,
I am using LVM for several years but now I face an issue where I have no clue
how to deal with.
I want to have a VG on top of a drbd device (Distributed Replicated Block
Device) which should not be an issue according to docs:
https://www.drbd.org/en/doc/users-guide-83/s-lvm-drbd-as-pv
Unfortunately I am always getting "duplicate device" errors as LVM recons a pv
on /dev/sdb (underlying device for drbd) as well as on /dev/drbd0
Now I tried to configure filters to match my setup. But it seems I do not
understand the filter rules.
I need to enable /dev/sda incl. all partitions. (for root)
I need to disable /dev/sdb at all as it is the device for drbd!
I need to enable /dev/drbd0 as the "real" PV.
I can disable all others.
So I tried:
filter = [ "r|sdb.*/|","a|drbd0/|","a|.*/|" ]
Hi
Just check the 'comment' for filters in lvm.conf -
there is stated you should NOT mix 'r' & 'a' together
(there is even no need for this in 99.9999%)
So please focus on keeping things simple:
- either use plain list of rejects 'r'
- or set 'white-list' with all 'a' finished with 'r .*'
Every other usage does require quite good understanding how
the devices are scanned and how many accessible paths for them
exists in today's /dev directory.
To to be exact in your case:
Use just: [ "r|/dev/sdb|" ]
OR (if you want to use just drdb0) :
[ "a|drbd0/|", "r|.*/|" ]
(eventually add more 'a' with more PV devices you have)
Regards
Zdenek
_______________________________________________
linux-lvm mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/linux-lvm
read the LVM HOW-TO at http://tldp.org/HOWTO/LVM-HOWTO/