Status and Splitbrain

Show status and fix split-brain situations

Show status

# cat /proc/drbd
 version: 8.4.5 (api:1/proto:86-101)
 GIT-hash: 1d360bde0e095d495786eaeb2a1ac76888e4db96 build by mockbuild@, 2014-08-17 22:54:26
  0: cs:Connected ro:Secondary/Primary ds:UpToDate/UpToDate C r-----
     ns:0 nr:5066752 dw:5068826 dr:4199 al:2 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0

Fix split-brain situations

At this point, unless you configured DRBD to automatically recover from split brain, you must manually intervene by selecting one node whose modifications will be discarded (this node is referred to as the split brain victim). This intervention is made with the following commands.

First of all the split brain victim needs to be in the connection state of ‘StandAlone’ if not do:

# drbdadm disconnect <resource>

Now run the following commands:

# drbdadm secondary <resource>
# drbdadm connect --discard-my-data <resource>

On the other node (the split brain survivor), check if its connection state is ‘StandAlone’ also. If so run:

drbdadm connect <resource>

If your split brain survivor is in status ‘WFConnection’ you can skip the above step, as your survivor will connect automatically.

Leave a Reply