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

jan gestre ipcopper.ph at gmail.com
Mon Sep 6 16:02:51 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 6, 2010 at 8:48 PM, Lars Ellenberg
<lars.ellenberg at linbit.com> wrote:
> 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
>

Thanks Lars, but now I am confused, maybe you can enlighten me, you're
saying that I would be better off without modifying, what then would
you recommend to prevent Split Brain? Add a stonith device, e.g. IBM
RSA? Add handlers like dopd?

BTW, I got the modification from this url -->
http://lemonnier.se/erwan/blog/item/53/



More information about the drbd-user mailing list