0
votes

After follow the guide below, i manage to set up a active-passive cluster node. But i notice that when the main fails and come back on, it does not take back the primary role. What setting i should configure in the crm to ensure that when the primary recover after a fail it takes back as primary from the back up machine?

https://www.theurbanpenguin.com/drbd-pacemaker-ha-cluster-ubuntu-16-04/

2

2 Answers

0
votes

You would do this via an infinity location constraint. Something like:

location fs-on-alice fs_res inf: alice

Automatic fail-back is usually not suggested. In an ideal HA configuration it shouldn't matter at all what system is currently primary. Also, I have seen instances where a node is having intermittent panics/reboots every 10-20 minutes. Now you have services failing over, and stopping/restarting, several times an hour. If not for the location constraint and automatic fail-backs you would not have this behavior.

0
votes

well giving a "inf" location rule will always force the resource to run on alice only. And if alice goes down for maintenance then the resource will not run on any other node. What u want to add is called stickiness.

pcs constraint location fs_res prefers alice =50

Refer for more detail: http://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/1.1/html/Clusters_from_Scratch/_prefer_one_node_over_another.html