#DRBD: Gracious role switching of live sites configured with DRBD replication

By | March 6, 2017

This is a follow up tutorial on the DRBD replication posts about gracious role switching of live sites configured with DRBD replication.

More than a year ago I described in a long tutorial how to use DRBD in a real production environment and the challenges associated to it. See: DRBD based disk replication of a production cluster to a remote cluster on RHEL6

When doing a site switch from the live site to the standby site the following steps must be
performed:

1. Stop the Application_Service on the live site


#clusvcadm -s Applications_Service

2. Check that the sites are synchronized.
If sites are not synchronized, wait for the standby site to receive all the replication data. This can be checked by executing on the standby site:


# service drbd status

3. Stop the Database_Service on the live site


#clusvcadm -s Database_Service

4. Stop the DRBD_Slave_Service on the standby site


#clusvcadm -s DRBD_Slave_Service

5. Start the DRBD_Slave_Service on the live site


#clusvcadm -e DRBD_Slave_Service -F

6. Start the Database_Service on the standby site


#clusvcadm -e Database_Service -F

7. Start the Application_Service on the standby site


#clusvcadm -e Applications_Service -F

8. Check that the sites are in sync.


# watch -n 1 cat /proc/drbd

This can be also checked by executing on the standby site and live site:


# service drbd status

The site switch is now complete.

[paypal_donation_button]

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.