[DRBD-user] FAQ: Reconnecting after a temporary primary node failure

Mauricio Tavares raubvogel at gmail.com
Tue Mar 8 12:37:30 CET 2011

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


On 3/8/11 3:34 AM, Felix Frank wrote:
>> Mar  7 18:31:41 db1 kernel: [ 1186.440928] e1000: eth0 NIC Link is Up
>> 1000 Mbps Full Duplex, Flow Control: RX
>> root at db1:~#
>>
>> Shouldn't the two nodes re-establish connectivity?
>
> It looks to me like you need to "drbdadm connect" your primary once
> more. It does seem strange, though. What does its proc/drbd say?
>
	Original primary node (I have not touched it since yesterday):
root at db1:~# cat /proc/drbd
version: 8.3.7 (api:88/proto:86-91)
GIT-hash: ea9e28dbff98e331a62bcbcc63a6135808fe2917 build by root at db1, 
2011-03-07 15:01:39
  0: cs:StandAlone ro:Primary/Unknown ds:UpToDate/DUnknown   r----
     ns:79451 nr:131104 dw:240977 dr:37649 al:36 bm:20 lo:0 pe:0 ua:0 
ap:0 ep:1 wo:b oos:18588
root at db1:~#

Secondary:
root at db2:~# cat /proc/drbd
version: 8.3.7 (api:88/proto:86-91)
GIT-hash: ea9e28dbff98e331a62bcbcc63a6135808fe2917 build by root at db2, 
2011-03-07 10:22:02
  0: cs:WFConnection ro:Secondary/Unknown ds:UpToDate/DUnknown C r----
     ns:32 nr:79448 dw:364538 dr:271064 al:8 bm:54 lo:0 pe:0 ua:0 ap:0 
ep:1 wo:b oos:0
root at db2:~#

Note I did not set db2 to primary. In fact, I did not touch either of 
them. The drdb partition is still mounted in db1 since my test was just 
a network down issue as opposite of db1 crashing completely:

root at db1:~# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1              12G  7.2G  3.6G  67% /
none                  998M  252K  998M   1% /dev
none                 1005M  164K 1005M   1% /dev/shm
none                 1005M   88K 1005M   1% /var/run
none                 1005M  4.0K 1005M   1% /var/lock
none                 1005M     0 1005M   0% /lib/init/rw
/dev/drbd0            494M  120M  349M  26% /mnt/drbd
root at db1:~#

I do not know if that is important but I just want to mention that. 
Doing a dbrdadm connect in db1 did not seem to have persuaded it to 
reconnect.

root at db1:~# drbdadm connect r0
root at db1:~# cat /proc/drbd
version: 8.3.7 (api:88/proto:86-91)
GIT-hash: ea9e28dbff98e331a62bcbcc63a6135808fe2917 build by root at db1, 
2011-03-07 15:01:39
  0: cs:StandAlone ro:Primary/Unknown ds:UpToDate/DUnknown   r----
     ns:0 nr:0 dw:240977 dr:37746 al:36 bm:20 lo:0 pe:0 ua:0 ap:0 ep:1 
wo:b oos:18588
root at db1:~# drbdadm role r0
Primary/Unknown
root at db1:~#

Do I also need to do drbdadm -- --discard-my-data connect r0 in db2? I 
thought that would be only for split brain situation.

> Regards,
> Felix




More information about the drbd-user mailing list