You can test your DRBD resource hierarchy by initiating a manual switchover. This will simulate a failover of the resource instances from the primary server to the backup server.

Performing a Manual Switchover from the LifeKeeper GUI

You can initiate a manual switchover from the LifeKeeper GUI by selecting Edit, Resource, and In Service. For example, an in-service request executed on a backup server causes the DRBD resource hierarchy to be taken out-of-service on the primary server and placed in-service on the backup server. At this point, the original backup server is now the primary server and the original primary server has now become the backup server.

If the test is done with the DRBD in-sync then the in-service server status is “Primary” and the backup server status is “UpToDate”. The state of the DRBD resource on the new primary server is set to “Primary” in the LifeKeeper GUI. During the switchover, the state of the DataKeeper resource on each server is initially set to “UpToDate” to show both servers have up to date data.

If the test is done while DRBD is synchronizing data then the in-service server status is “Primary” and the backup server status is “Resyncing – Target”. The DRBD_TAKE_DOWN_ON_REMOVE setting in /etc/default/LifeKeeper will affect the switchover behavior.

The default setting for DRBD_TAKE_DOWN_ON_REMOVE is 0. When LifeKeeper takes the DRBD resource out of service, it will not take down the resource. This lets DRBD continue synchronizing data while the resource is out of service. If a switchover is done while synchronizing from the in-service server to the secondary server then the in-service server status is “Primary” and the backup server status is “Resyncing – Target”. During the switchover, the state of the in-service server changes from “Primary” to “Resyncing – Source”. This shows that it is the source of the resync. The backup server status does not change (still “Resyncing – Target”). When the backup server becomes in-service then the status becomes “Primary” while the new backup server status is “Resyncing – Source”. Once the data has been fully synchronized, the backup server status changes to “UpToDate”.

If DRBD_TAKE_DOWN_ON_REMOVE is set to 1 then when LifeKeeper takes the DRBD resource out of service during the switchover it will “down” the resource on all nodes. This will stop synchronization. The status of the server that was the in-service server will change from “Primary” to “Consistent (down)”. The status of the backup server will change from “Resyncing – Target” to “Inconsistent (down)”. When the switchover brings the resource in-service on the previous backup server the resource is brought “up” on both servers where they will determine which server has the “up to date” data and resume synchronization. The in-service server status will be “Primary” and the backup server status will be “Resyncing – Source”.

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment