[DRBD-user] Recover primary node from disk failure.

Digimer linux at alteeve.com
Fri Jul 29 16:44:52 CEST 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 07/29/2011 07:46 AM, Caspar Smit wrote:
> Hi all,
> 
> My primary node suffered a raid (md) failure and the drbd state is now:
> 
> cs:Connected ro:Primary/Secondary ds:Diskless/UpToDate C r----
>     ns:76247848 nr:316725148 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0
> ep:1 wo:b oos:0
> 
> So drbd is passing all IO to the second node.
> 
> In the meantime I fixed the md and now i'm ready to attach the md again.
> 
> But here's my question:
> 
> Do i NEED a failover so the secondary node becomes primary/uptodate or
> can drbd handle the fact that when I attach the md again the primary
> becomes synctarget / inconsistent, will it stil pass all IO to the
> secondary node first until the primary is uptodate again?
> 
> in short:
> 
> Will "drbdadm attach <resource>" be sufficient to recover from
> Primary/Diskless or do I need to do a failover first?
> 
> Met vriendelijke groet,

Simply reconnecting should be fine.

As I understand Protocol C, writes will go to both nodes, and reads will
come from the UpToDate node. The details are probably best answered by a
dev or Linbit person directly though, as I am somewhat guessing. I am
sure you don't need to fail-over though.

You may *want* to fail over though, if you can do so without downtime
(ie: live-migrate a VM, is that is what is using the DRBD storage). The
reason being that if anything happens to the communication with the
secondary, the primary will drop to Secondary until it's local storage
is UpToDate.

-- 
Digimer
E-Mail:              digimer at alteeve.com
Freenode handle:     digimer
Papers and Projects: http://alteeve.com
Node Assassin:       http://nodeassassin.org
"At what point did we forget that the Space Shuttle was, essentially,
a program that strapped human beings to an explosion and tried to stab
through the sky with fire and math?"



More information about the drbd-user mailing list