Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
Rustedt, Florian wrote: >> -----Ursprüngliche Nachricht----- >> Von: drbd-user-bounces at lists.linbit.com >> [mailto:drbd-user-bounces at lists.linbit.com] Im Auftrag von Hari Sekhon >> Gesendet: Freitag, 13. Februar 2009 15:43 >> An: drbd-user at lists.linbit.com >> Betreff: [DRBD-user] LVM on drbd confused? >> # pvs >> Found duplicate PV m8M0tNOCx83QS53D07kybsEDl8oNt4X6: using >> /dev/sdb1 not /dev/drbd0 >> Found duplicate PV m8M0tNOCx83QS53D07kybsEDl8oNt4X6: using >> /dev/drbd0 not /dev/sdb1 >> Found duplicate PV m8M0tNOCx83QS53D07kybsEDl8oNt4X6: using >> /dev/sdb1 not /dev/drbd0 >> > > This is corrected with excluding the "/dev/sda*" entries from lvscan. > Just add a filter to the lvm.conf like: > filter = [ "a|/dev/drbd*|", "r/.*/" ] > > Now do a pvscan and it should bring up no duplicates anymore. > > Please tell us, if it works and if you can add an lv now. > > Explanation: As drbd is similar to a software raid, the "pv-headers" are visible on the underlying device as on the drbd, so it is logical, that both devices show up in pvscan after creation of the labels. The filter includes only drbd for searching.. > I actually did the exact line above other day after posting and it sorted it out, but it also means that my pvs/vgs/lvs on other disks are no longer visible... so it worked but not perfectly. Having done lots of testing the other day though, having this set at the time of pv/vg creation sorts out most of the issues in that new lvs tend to go to the right place afterwards and even after removing the filter the vg is still associated with the right block device when queried. It also seemed that accepting all block devices and then omitting some does not work, once something is allowed, it is allowed, so you cannot allow all of sd* and then block sdb. So I refined the filter to explicitly allow sda as well and then disallow everything else, followed by a rescan and this works perfectly now. Thanks -h -- Hari Sekhon Always open to interesting opportunities http://www.linkedin.com/in/harisekhon