[DRBD-user] DRBD detects split brain when started with Pacemaker

Jonathan-Marc Lapointe jmlapointe at ccdmd.qc.ca
Tue Jun 25 16:51:41 CEST 2013

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


Actually,

I just found that answer and adding:

---------------------------------------------------------------------------------

  disk {
    fencing resource-only;
  }
  handlers {
    fence-peer "/usr/lib/drbd/crm-fence-peer.sh";
    after-resync-target "/usr/lib/drbd/crm-unfence-peer.sh";
  }

---------------------------------------------------------------------------------

On both server DRBD config, fixed the issue.

I now have to configure STONITH in Pacemaker.

Thanx !


Le 2013-06-25 10:22, Digimer a écrit :
> Fencing (stonith) would prevent split-brains from happening. In chapter
> 9 of Clusters from Scratch on the pacemaker website covers how to
> configure fencing. Once setup, configure DRBD to use
> 'resource-and-stonith' and then use the 'crm-fence-peer.sh' fence
> handler to hook DRBD into pacemaker's fencing.
>
> This is the _only_ reliable way to avoid split-brains.
>
> Cheers
>
> On 06/25/2013 09:00 AM, Jonathan-Marc Lapointe wrote:
>> Hi dear list members !
>>
>> I have a procluster project I'm working on right now and I have a little
>> problem I'd like you to help me with.
>>
>> I'm configuring Pacemaker and Corosync.
>>
>> But when pacemaker starts DRBD, it detects a split brain and the status is:
>>
>> drbd driver loaded OK; device status:
>> version: 8.3.13 (api:88/proto:86-96)
>> srcversion: C0F510A918B92928FB51EE3
>> m:res  cs          ro               ds                 p       mounted 
>> fstype
>> 0:r0   StandAlone  Primary/Unknown  UpToDate/DUnknown  r-----
>>
>> On both servers.
>>
>> But If I start it using the standard init script, it's all fine.
>>
>> Here are my configs:
>>
>> DRBD:
>> ---------------------------------------------------------------------------------
>> resource r0 {
>>   syncer {
>>     rate 1000M;
>>   }
>>   startup {
>>     wfc-timeout 15;
>>     degr-wfc-timeout 60;
>>     become-primary-on both;
>>   }
>>   net {
>>     allow-two-primaries;
>>     after-sb-0pri discard-zero-changes;
>>     after-sb-1pri discard-secondary;
>>     after-sb-2pri disconnect;
>>     cram-hmac-alg sha1;
>>     shared-secret "secret";
>>   }
>>   on web1dev {
>>     device    /dev/drbd0;
>>     disk      /dev/mapper/groupe1-data;
>>     address   192.168.77.212:7789;
>>     meta-disk internal;
>>   }
>>   on web2dev {
>>     device    /dev/drbd0;
>>     disk      /dev/mapper/groupe1-data;
>>     address   192.168.77.213:7789;
>>     meta-disk internal;
>>   }
>> }
>> ---------------------------------------------------------------------------------
>>
>> And Pacemaker:
>>
>> ---------------------------------------------------------------------------------
>> primitive p_drbd ocf:linbit:drbd \
>>     params drbd_resource="r0" \
>>     op start interval="0" timeout="240s" \
>>     op promote interval="0" timeout="90s" \
>>     op demote interval="0" timeout="90s" \
>>     op notify interval="0" timeout="90s" \
>>     op stop interval="0" timeout="100s" \
>>     op monitor interval="20s" role="Slave" timeout="20s" \
>>     op monitor interval="10s" role="Master" timeout="20s"
>> ms ms_drbd p_drbd \
>>     meta master-max="2" clone-max="2" notify="true" is-managed="true"
>> ---------------------------------------------------------------------------------
>>
>> What could be possibly wrong ?
>>
>>
>> CCDMD 20 ans !
>>
>> Jonathan-Marc Lapointe
>> Technicien en informatique,
>> Administrateur système,
>> Administrateur réseau
>>
>> Centre collégial de développement de matériel didactique
>> 6220, rue Sherbrooke Est, bureau 404
>> Montréal (Québec) H1N 1C1
>> 514) 864-8443
>> www.ccdmd.qc.ca <http://www.ccdmd.qc.ca>
>> jmlapointe at ccdmd.qc.ca <mailto:jmlapointe at ccdmd.qc.ca>
>> Skype: jmlccdmd
>>
>>
>> _______________________________________________
>> drbd-user mailing list
>> drbd-user at lists.linbit.com
>> http://lists.linbit.com/mailman/listinfo/drbd-user
>>
>


CCDMD 20 ans !

Jonathan-Marc Lapointe
Technicien en informatique,
Administrateur système,
Administrateur réseau

Centre collégial de développement de matériel didactique
6220, rue Sherbrooke Est, bureau 404
Montréal (Québec) H1N 1C1
514) 864-8443
www.ccdmd.qc.ca <http://www.ccdmd.qc.ca>
jmlapointe at ccdmd.qc.ca <mailto:jmlapointe at ccdmd.qc.ca>
Skype: jmlccdmd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20130625/af57dd7d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Logo_CCDMD_20ans_186_RGB.png
Type: image/png
Size: 2967 bytes
Desc: not available
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20130625/af57dd7d/attachment.png>


More information about the drbd-user mailing list