Drbd

Aus SchnallIchNet
Wechseln zu: Navigation, Suche

State's and Splitbrain

see state and fix splitbrain situations...


show state

# 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 splitbrain

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:

Achtung.jpeg The split brain victim needs to be in the connection state of StandAlone or the following commands will return an error. You can ensure it is standalone by issuing: drbdadm disconnect <resource>
drbdadm secondary <resource>
drbdadm connect --discard-my-data <resource>

On the other node (the split brain survivor), if its connection state is also StandAlone, you would enter:

drbdadm connect <resource>

You may omit this step if the node is already in the WFConnection state; it will then reconnect automatically.