[DRBD-user] Help with drbddisk modification to block takeover when the local resource is not in a safe state

Lars Ellenberg lars.ellenberg at linbit.com
Mon Sep 6 14:48:33 CEST 2010

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


On Mon, Sep 06, 2010 at 08:34:40PM +0800, jan gestre wrote:
> Hi Everyone,
> 
> I've found this drbddisk modification that will block takeover when
> the local resource is not in a safe state, however it only works if
> you only have one resource, but since I have two resources namely r0
> and r1, it would not work.
> 
> case "$CMD" in
>    start)
>      # forbid to become primary if ressource is not clean
>      DRBDSTATEOK=`cat /proc/drbd | grep ' cs:Connected ' | grep '
> ds:UpToDate/' | wc -l`
>      if [ $DRBDSTATEOK -ne 1 ]; then
>        echo >&2 "drbd is not in Connected/UpToDate state. refusing to
> start resource"
>        exit 1
>      fi
> 
> I would be truly grateful if anyone could care to show how to effect
> said modification.
> 
> I'm trying to prevent a Split Brain scenario here, and I'm still
> testing my setup; I was in a predicament earlier wherein one of the
> resource r1 is in healthy state and r0 is in standalone
> Primary/Unknown state, I had to issue drdbadm -- --discard-my-data r0
> to resolve the split brain.

No Sir.

What if the Primary dies? Hard?
You now want your Secondary to take over, no?
Well, you cannot anymore. Because it is not Connected.
How could it, you just lost the peer ;-)

Don't focus only on one specific scenario.
Because, if you just "fix" that specific scenario,
you break a truckload of others.

Maybe it helps a bit to read
http://www.mail-archive.com/pacemaker@oss.clusterlabs.org/msg04312.html

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

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