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 two Ubuntu 12.04 servers, which run mysql in a master-master setup, with mmm as manager. How can I set up heartbeat to make sure that mmm only runs at one node at the time?

*Edit to explain more clearly

My setup:

  ---------VIP (10.0.0.123)------
  |                             |
Node1                         Node2

Where bot Node1 and Node2 run:

  • Mysql
  • Multi-Master Replication Manager for MySQL (mmm)
  • Heartbeat

I only want a single write enabled Mysql node, and I can only have one mmm running at the time, else I'll get collision between the managers.

share|improve this question
    
First of all mysql and heartbeat are not the same. So please describe what you are doing a little bit deeper. mysql has its own clustering abilities with no need for heartbeat... –  Nils Oct 24 '12 at 19:34
add comment

1 Answer

As it turns out, heartbeat treats any script found in /etc/init.d/ as a service. As long as it has start and stop functions, with correct exit codes, I can just add on the service on the same line as the vIP definition:

loadbalancer1 10.0.0.123 service

Default behavior of heartbeat is then to make sure only a single node runs the service

share|improve this answer
add comment

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.