[DRBD-user] Procedure for making secondary server primary if primary is destroyed?

Tom Pride tom.pride at gmail.com
Thu May 20 12:28:21 CEST 2010

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


Hi There,

I have a 2 node corosnyc/pacemaker cluster with a drbd file system running
in Primary/Secondary mode. I have compiled RPMs using the latest DRBD
source  drbd-8.3.7-1.

I'm currently trying to put together a runbook which spells out the
procedures to follow depending on what potential failures might occur on the
cluster.  I need some help on what to do in the following scenario:

If the Primary server in the 2 node cluster completely fails and the drbd
partition/data is lost, how do I force the Secondary server to become the
Primary drbd resource?
I have simulated this by shutting down the switch port that the Primary
server is connected to.  I did hope that the pacemaker would just
automatically failover to the secondary server and promote the DRBD resource
as primary, but this did not occur and if I cat /proc/drbd on the secondary
server, this is the state it is currently in:

# cat /proc/drbd
version: 8.3.7 (api:88/proto:86-91)
GIT-hash: ea9e28dbff98e331a62bcbcc63a613


 1: cs:WFConnection ro:Secondary/Unknown ds:Inconsistent/DUnknown C r----
    ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:564835

So lets pretend that the above state was a result of the Primary getting
destroyed, how do I force the Secondary (inconsistent resource) to become
the Primary?  How do I get drbd to ignore the fact that it is in an
inconsistent state and force to be primary so that the cluster can mount the
partition and service can resume?  Sure, there might be some lost data, but
that's better than losing all the data.  I have tried running "drbdadm
primary r0" but get the following error:

# drbdadm primary r0
1: State change failed: (-2) Refusing to be Primary without at least one
UpToDate disk
Command 'drbdsetup 1 primary' terminated with exit code 17

I have read through the DRBD documentation, but have not been able to find
instructions on how to resolve this problem.

Any help would be very much appreciated.

Cheers,
Tom
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linbit.com/pipermail/drbd-user/attachments/20100520/37966bdb/attachment.htm>


More information about the drbd-user mailing list