[DRBD-user] drbd lost lvm configuration

Lars Ellenberg lars.ellenberg at linbit.com
Tue Jan 19 13:25:36 CET 2016

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


On Tue, Jan 19, 2016 at 11:02:35AM +0000, EDV at bauerfunken.de wrote:
> >> >> I've setup a drbd cluster of 2 nodes. Both nodes use a physical
> >> >> partition type 8e (Linux LVM) and synced by drbd successfully.
> >> >> The response of drbd-overview seems to be ok, because it say
> >> >> UpToDate/UpToDate on both nodes.
> >> >>
> >> >> Now, when I create a logical volume by pvcreate, vgcreate and lvcreate
> >> >> on this drbd-device it create this volume successfully too, but when
> >> >> I check the configuration by th following way:
> >> >>
> >> >> Primary node:
> >> >>
> >> >> vgchange -a n <vg>
> >> >> drbdadm secondary <drbd>
> >> >>
> >> >> Secondary node:
> >>
> >> >You need to 'drbdadm primary res' before anything can read the
> >> >/dev/drbdX device.
> >>
> >> Sorry,  but I did it before changing the state of this volumegroup.
> >>
> >> So I did:
> >>
> >> drbdadm primary <drbd>
> >> vgchange -a y <vg>
> >>
> >> When I do a pvscan after changing the primary node, no pv's were found
> >> and the same, by changing the primary again.
> >
> >stale lvm meta data cache (daemon)?
> >try a pvscan --cache,
> >see the man page for details.
> 
> Thanks for your response.
> 
> When I create a new pv and test it with
> 
> pvscan --cache
> 
> the response on the primary node is:
> 
>   Found duplicate PV Trs11CMat90PaBJ2lm4YpzEKVXnDtx0P: using /dev/drbd0 not /dev/cciss/c0d0p4
>   Using duplicate PV /dev/drbd0 from subsystem DRBD, ignoring /dev/cciss/c0d0p4

You should have filtered out the cciss path.
also check the "global_filter" in lvm.conf, not just the filter,
and double check that your initramfs knows about lvm device filters as well.

> Erasing this new pv returns nothing on the same node.
> 
> In lvm.conf I've set
> 
> write_cache_state = 0
> 
> so I'm wondering why lvm use a cache.

see lvmetad(8) and use_lvmetad in lvm.conf(5)

> This configuration is used in a openSuSE 42.1 on both nodes.      

-- 
: Lars Ellenberg
: http://www.LINBIT.com | Your Way to High Availability
: DRBD, Linux-HA  and  Pacemaker support and consulting

DRBD® and LINBIT® are registered trademarks of LINBIT, Austria.
__
please don't Cc me, but send to list   --   I'm subscribed



More information about the drbd-user mailing list