DRBD Split-brain solution -

DRBD Split-brain solution

Uh oh

[17925926.174277] block drbd0: Handshake successful: Agreed network protocol version 96
[17925926.174325] block drbd0: conn( WFConnection -> WFReportParams )
[17925926.174342] block drbd0: Starting asender thread (from drbd0_receiver [1682])
[17925926.174432] block drbd0: data-integrity-alg: <not-used>
[17925926.174581] block drbd0: drbd_sync_handshake:
[17925926.174586] block drbd0: self 2AAE66AF9252D6DB:2815BF75CBEA0687:E303F24CF2826E13:E302F24CF2826E13 bits:73000 flags:0
[17925926.174591] block drbd0: peer 24F1983D580A1E83:2815BF75CBEA0686:E303F24CF2826E12:E302F24CF2826E13 bits:93874 flags:0
[17925926.174596] block drbd0: uuid_compare()=100 by rule 90
[17925926.174602] block drbd0: helper command: /sbin/drbdadm initial-split-brain minor-0
[17925926.180872] block drbd0: meta connection shut down by peer.
[17925926.181041] block drbd0: conn( WFReportParams -> NetworkFailure )
[17925926.181055] block drbd0: asender terminated
[17925926.181058] block drbd0: Terminating asender thread
[17925926.207698] block drbd0: helper command: /sbin/drbdadm initial-split-brain minor-0 exit code 0 (0x0)
[17925926.207704] block drbd0: Split-Brain detected but unresolved, dropping connection!
[17925926.207876] block drbd0: helper command: /sbin/drbdadm split-brain minor-0
[17925926.209653] block drbd0: helper command: /sbin/drbdadm split-brain minor-0 exit code 0 (0x0)
[17925926.209659] block drbd0: conn( NetworkFailure -> Disconnecting )
[17925926.209668] block drbd0: error receiving ReportState, l: 4!
[17925926.209839] block drbd0: Connection closed
[17925926.209846] block drbd0: conn( Disconnecting -> StandAlone )
[17925926.209862] block drbd0: receiver terminated
[17925926.209865] block drbd0: Terminating receiver thread


[root@box18 ~]# cat /proc/drbd
version: 8.3.13 (api:88/proto:86-96)
GIT-hash: 83ca112086600faacab2f157bc5a9324f7bd7f77 build by root@sighted, 2012-10-09 12:47:51
 0: cs:WFConnection ro:Secondary/Unknown ds:UpToDate/DUnknown A r-----
    ns:0 nr:0 dw:983961744 dr:1225316590 al:3645772 bm:110268 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:1619916
[root@box18 ~]# drbdadm connect r0
DRBD module version: 8.3.13
   userland version: 8.3.16
preferably kernel and userland versions should match.
0: Failure: (125) Device has a net-config (use disconnect first)
Command 'drbdsetup 0 net ipv4:192.168.5.2.18:7788 ipv4:192.168.5.2.17:7788 A --set-defaults --create-device --after-sb-0pri=discard-least-changes --after-sb-1pri=consensus' terminated with exit code 10


[root@box18 ~]# drbdadm connect r0
DRBD module version: 8.3.13
   userland version: 8.3.16
preferably kernel and userland versions should match.
0: Failure: (125) Device has a net-config (use disconnect first)
Command 'drbdsetup 0 net ipv4:192.168.5.2.18:7788 ipv4:192.168.5.2.17:7788 A --set-defaults --create-device --after-sb-0pri=discard-least-changes --after-sb-1pri=consensus' terminated with exit code 10
 

Solution


drbdadm disconnect r0

drbdadm -- --discard-my-data connect r0



#On the main active node


drbdadm connect r0
 cat /proc/drbd
version: 8.3.13 (api:88/proto:86-96)
GIT-hash: 83ca112086600faacab2f157bc5a9324f7bd7f77 build by root@sighted, 2012-10-09 12:47:51
 0: cs:SyncSource ro:Primary/Secondary ds:UpToDate/Inconsistent A r-----
    ns:3580 nr:0 dw:1597648248 dr:12347577 al:12090 bm:58295 lo:13 pe:169 ua:85 ap:1 ep:1 wo:b oos:3289420
    [>....................] sync'ed:  0.2% (3289420/3290212)K
    finish: 1:08:31 speed: 792 (792) K/sec


#on the dead node that is rejoining


 cat /proc/drbd
version: 8.3.13 (api:88/proto:86-96)
GIT-hash: 83ca112086600faacab2f157bc5a9324f7bd7f77 build by root@sighted, 2012-10-09 12:47:51
 0: cs:SyncTarget ro:Secondary/Primary ds:Inconsistent/UpToDate A r-----
    ns:0 nr:151088 dw:984106508 dr:1225316590 al:3645772 bm:110390 lo:61 pe:0 ua:2 ap:0 ep:3 wo:b oos:3170888
    [>....................] sync'ed:  3.8% (3170888/3290212)K
    finish: 0:11:48 speed: 4,472 (3,508) want: 20,480 K/sec
 


  • wget how to resume download!
  • strange vi errors in Linux Mint/Ubuntu line 58: E488: Trailing characters: t_Sbet line 63: E171: Missing :endif
  • MySQL Add multiple IPs for remote user including root howto
  • cPanel error Access denied for user 'root'@'localhost' when adding remote MySQL IP address solution
  • Text Editors - Top Linux Ubuntu/Debian/Mint Options
  • Linux shows my drive as being dead is it really? Buffer I/O error on device sdb, logical block 0 sd 3:0:0:0: [sdb] CDB: Read(10): 28 00 00 00 00 00 00 00 08 00
  • use ffmpeg to watermark videos if mencoder/bmovl fail
  • mencoder bmovl error vf_bmovl: Unknown command: ''. Ignoring.
  • Linux Mint/Ubuntu/Debian Nvidia driver becomes slow graphics performance issue
  • Linux Mint missing ffmpeg solution to install from Ubuntu PPA
  • phpBB3 slow and internal dummy connection
  • check if Apache uses worker MPM or prefork MPM
  • text to speech for Linux
  • How to convert xlsx/xls Excel file into csv
  • Linux bash script how to generate a random password using /dev/urandom
  • ssh forward multiple ports in the same connection and command even works with NAT!
  • How to create openssl md5 password hash to use in /etc/shadow using bash
  • Avocent DSR8020 KVM/IP - Network Connect Error - Solution
  • PHP Parse error: syntax error, unexpected '[' in phpBB3/vendor/react/promise/src/functions.php on line 15
  • tar extraction changes ownership of /root directory