Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have 2 CentOS machines with Heartbeat. If node01 has a problem or reboots, node02 takes over -- this works.

After node01 comes back up, node01 is no longer my primary which is great (node02 has taken over). But when I reboot node02, node01 becomes the primary again.

I don't want node01 to become primary again. I want to wait for node02 to come up as the primary. How can I achieve this?

share|improve this question
1  
Why would you want a HA configuration to not fail over to a working node when the other node goes away? –  womble Mar 25 '12 at 19:37
    
they are both Mysql servers. I don't want to take any chances. If my Master server goes down (reboot, service goes up and down) I want node02 to take over and in the meantime I'll fix Node01 but I prefer that if for some reason node02 goes down then I lose the HA. is that possible? –  edotan Mar 25 '12 at 19:47
    
I seriously doubt it. You probably want to do manually-triggered failovers (stop one, start the other) anyway, given that want to take no chances. –  womble Mar 25 '12 at 19:52
1  
I think this question is valid and good. There might be reasons to prevent a failback until the source of the problem has been found and eliminated. –  Nils Mar 25 '12 at 20:32

1 Answer 1

up vote 1 down vote accepted

If you want to avoid a "ping-pong" situation or want to check the system before it is ready to take over services again, I would recommend to

  • Start heartbeat manually after system boot chkconfig heartbeat off
  • Stop heartbeat after failover on the failed node.

The latter is a little bit tricky - but you could define a resource in your mysql-resource-group that stops heartbeat (but I would not recommend that - since you are shooting at your own feet that way).

This might be better outside heartbeat-control (perhaps a script that checks if cl_status rscstatus returns none and then stops heartbeat.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.