How to fix DRBD recovery from split brain

In this article i will show U how to solve DRBD split brain error.

Problem
DRBD does not connect between server

#/proc/drbd
version: 8.4.0 (api:1/proto:86-100)
GIT-hash: 28753f559ab51b549d16bcf487fe625d5919c49c build by gardner@, 2011-12-1
2 23:52:00
0: cs:StandAlone ro:Secondary/Unknown ds:UpToDate/DUnknown   r—–
ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:76

#log message on the node1
Mar  7 15:38:05 node1 kernel: block drbd0: Split-Brain detected but unresolved, dropping connection!

#/proc/drbd on the node2
version: 8.4.0 (api:1/proto:86-100)
GIT-hash: 28753f559ab51b549d16bcf487fe625d5919c49c build by gardner@, 2011-12-1
2 23:52:00
0: cs:StandAlone ro:Primary/Unknown ds:UpToDate/DUnknown   r—–
ns:0 nr:0 dw:144 dr:4205 al:5 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:100

Solution:
Step 1: Define one node as secondary and discard data on this (all = resource name )

drbdadm secondary all
drbdadm disconnect all
drbdadm — –discard-my-data connect all

Step 2: Define anoher node as primary and connect

drbdadm primary all
drbdadm disconnect all
drbdadm connect all

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

About Us

Our company implements projects for digital telephony any complexity. Also we conduct courses for IP telephony based on Asterisk PBX. Asterisk technology was founded in 2010. Since 2013 our company is autorized partner Digium in Ukraine.

Contacts

Asterisk Technology
© ТОВ "Астериск Украина"