[DRBD-user] reconnect after interface down/up

Martin Gombac martin at isg.si
Tue Jan 8 11:50:55 CET 2008

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


O.K.
Just to be sure that everything is as it's supposed to be i rebooted  
both nodes then did the same test again.

As it happens you are right. If i do it with ifconfig eth3 down they  
go to WFConnection. But if i do /etc/init.d/net.eth3 stop they go to  
StandAlone. Seems like gentoo scripts do something unexpected to drbd.

Sorry for bothering you. I didn't expect gentoo scripts to behave  
like that and i still don't have a clue what they do.

Regards,
M.


veliki ~ # cat /proc/drbd
version: 8.0.8 (api:86/proto:86)
GIT-hash: bd3e2c922f95c4fa0dca57a4f8c24bf8b249cc02 build by  
root at veliki, 2008-01-07 13:18:31
  0: cs:Connected st:Primary/Secondary ds:UpToDate/UpToDate C r---
     ns:260 nr:180 dw:440 dr:277 al:0 bm:5 lo:0 pe:0 ua:0 ap:0
         resync: used:0/31 hits:29 misses:5 starving:0 dirty:0 changed:5
         act_log: used:0/257 hits:65 misses:0 starving:0 dirty:0  
changed:0
  1: cs:Connected st:Secondary/Primary ds:UpToDate/UpToDate C r---
     ns:0 nr:840 dw:840 dr:0 al:0 bm:10 lo:0 pe:0 ua:0 ap:0
         resync: used:0/31 hits:42 misses:10 starving:0 dirty:0  
changed:10
         act_log: used:0/257 hits:0 misses:0 starving:0 dirty:0  
changed:0
veliki ~ # ifconfig eth3 down
veliki ~ # cat /proc/drbd
version: 8.0.8 (api:86/proto:86)
GIT-hash: bd3e2c922f95c4fa0dca57a4f8c24bf8b249cc02 build by  
root at veliki, 2008-01-07 13:18:31
  0: cs:WFConnection st:Primary/Unknown ds:UpToDate/Outdated C r---
     ns:328 nr:180 dw:512 dr:277 al:0 bm:5 lo:0 pe:0 ua:0 ap:0
         resync: used:0/31 hits:29 misses:5 starving:0 dirty:0 changed:5
         act_log: used:0/257 hits:83 misses:0 starving:0 dirty:0  
changed:0
  1: cs:WFConnection st:Secondary/Unknown ds:UpToDate/DUnknown C r---
     ns:0 nr:884 dw:884 dr:0 al:0 bm:10 lo:0 pe:0 ua:0 ap:0
         resync: used:0/31 hits:42 misses:10 starving:0 dirty:0  
changed:10
         act_log: used:0/257 hits:0 misses:0 starving:0 dirty:0  
changed:0
veliki ~ # ifconfig eth3 up
veliki ~ # cat /proc/drbd
version: 8.0.8 (api:86/proto:86)
GIT-hash: bd3e2c922f95c4fa0dca57a4f8c24bf8b249cc02 build by  
root at veliki, 2008-01-07 13:18:31
  0: cs:SyncSource st:Primary/Secondary ds:UpToDate/Inconsistent C r---
     ns:444 nr:180 dw:616 dr:393 al:0 bm:5 lo:2 pe:5 ua:2 ap:0
         [===================>] sync'ed:100.0% (116/124)K
         finish: 0:00:00 speed: 8 (8) K/sec
         resync: used:2/31 hits:35 misses:8 starving:0 dirty:0 changed:8
         act_log: used:0/257 hits:109 misses:0 starving:0 dirty:0  
changed:0
  1: cs:Connected st:Secondary/Primary ds:UpToDate/UpToDate C r---
     ns:0 nr:1064 dw:1064 dr:0 al:0 bm:14 lo:0 pe:0 ua:0 ap:0
         resync: used:0/31 hits:62 misses:14 starving:0 dirty:0  
changed:14
         act_log: used:0/257 hits:0 misses:0 starving:0 dirty:0  
changed:0
veliki ~ # /etc/init.d/net.eth3 stop
  * Stopping eth3
  *   Bringing down eth3
  *     Shutting down  
eth3 ...                                                                 
                                                                       
[ ok ]
veliki ~ # cat /proc/drbd
version: 8.0.8 (api:86/proto:86)
GIT-hash: bd3e2c922f95c4fa0dca57a4f8c24bf8b249cc02 build by  
root at veliki, 2008-01-07 13:18:31
  0: cs:StandAlone st:Primary/Unknown ds:UpToDate/Outdated   r---
     ns:576 nr:180 dw:776 dr:401 al:0 bm:8 lo:0 pe:0 ua:0 ap:0
         resync: used:0/31 hits:42 misses:8 starving:0 dirty:0 changed:8
         act_log: used:0/257 hits:149 misses:0 starving:0 dirty:0  
changed:0
  1: cs:StandAlone st:Secondary/Unknown ds:UpToDate/DUnknown   r---
     ns:0 nr:1232 dw:1232 dr:0 al:0 bm:14 lo:0 pe:0 ua:0 ap:0
         resync: used:0/31 hits:62 misses:14 starving:0 dirty:0  
changed:14
         act_log: used:0/257 hits:0 misses:0 starving:0 dirty:0  
changed:0


On 2008.1.8, at 11:12, Florian Haas wrote:

> Martin
>
> what seems odd is the fact that one of your devices went into  
> StandAlone mode.
> That should only happen in one of two cases:
>
> 1. Deliberate disconnect (drbdadm disconnect, or drbdadm attach  
> without
> connect initially)
> 2. Split brain.
>
> If you just down the replication interface, the device on both  
> nodes will go
> into NetworkFailure (transient) and then WFConnection. Upon  
> reconnection,
> they will just go back into Connected mode. And no point should one  
> of them
> become StandAlone.
>
> If that isn't working in your setup, please provide relevant config  
> and log
> snippets for people to be able to help you out.
>
> Cheers,
> Florian
>
>
> On Tuesday 08 January 2008 10:53:52 Martin Gombac wrote:
>> No split brain.
>>
>> veliki ~ # dmesg | grep -i "split-brain"
>> veliki ~ #
>> mali ~ # dmesg | grep -i "split-brain"
>> mali ~ #
>>
>> On 2008.1.8, at 10:50, Florian Haas wrote:
>>> dmesg | grep -i "split-brain"
>>>
>>> hth,
>>> Florian
>>>
>>> On Tuesday 08 January 2008 10:46:51 Martin Gombac wrote:
>>>> Hi,
>>>>
>>>> is DRBD supposed to reconnect automatically after network comes
>>>> back up?
>>>>
>>>> I did a test for my network status script and had to ifconfig eth3
>>>> down for one day.
>>>> eth3 is used for drbd syncing. After i brought eth3 back up i
>>>> expected for drbd to resync data again without me
>>>> doing drbdadm connect all. Was i wrong?
>>>
>
> -- 
> : Florian G. Haas
> : LINBIT Information Technologies GmbH
> : Vivenotgasse 48, A-1120 Vienna, Austria
> _______________________________________________
> drbd-user mailing list
> drbd-user at lists.linbit.com
> http://lists.linbit.com/mailman/listinfo/drbd-user




More information about the drbd-user mailing list