How to Recover DRDB from Split Brain

Objective

Recover DRBD from split brain condition (both devices set to primary) by setting either one as a secondary device.

Prerequisites

None.

Steps

Step 1: Start DRBD Service on Both Devices

On both machines, start the DRBD services using either of the following commands.

For versions below CentOS 7:

/etc/init.d/drbd start

For CentOS 7:

systemctl start drbd

Step 2: Set Secondary Device

Login to the server you want to set as secondary.

Define the server as secondary and discard the data on that server using the following commands.

drbdadm secondary all
drbdadm disconnect all
drbdadm -- --discard-my-data connect all

Define the other server as primary and reset the connection.

drbdadm primary all 
drbdadm disconnect all 
drbdadm connect all
Updated on February 5, 2021

Was this article helpful?

Related Articles

Need Help?
Submit a ticket to us and let our professional team assists you

Support Billing Sales
Support
Billing
Sales