1

I'm looking for a way to have a master/slave fail-over that share 2 common virtual-IPs (on Ubuntu):

  • vip1: 10.0.0.171
  • vip2: 10.0.0.172
  • master: 10.0.0.181
  • slave: 10.0.0.182

I need the following functionality:

  • If both master & slave machines are up, master gets both VIPs
  • If master goes down, slave gets both VIPs
  • If master goes back up, it gets back both VIPs
  • If only master is up, well, master gets the VIPs (of course.)

I was able to achieve this easily with heartbeat, but it seems like corosync+pacemaker is "the future." Unfortunately, finding good, concise documentation has proven difficult for me to find...

This is my heartbeat setup:

/etc/hosts:

10.0.0.181  master-host
10.0.0.182  slave-host

/etc/ha.d/ha.cf:

deadtime 3
warntime 5
initdead 10
bcast eth0
auto_failback on
node master-host
node slave-host
use_logd yes

/etc/ha.d/haresources:

master-host IPaddr::10.0.0.171/24/eth0 IPaddr::10.0.0.172/24/eth0 

As a bonus (something that heartbeat seems to be unable to do on its own) it would be nice to be able to:

  • Have both the master & slave be unaware of one another (i.e. they don't know each other IPs)
    • they can share a password
    • each knows if it's a master or a slave

Extra bonus:

  • being able to add a second slave, such as slave: 10.0.0.183

Is this something that can be accomplished with corosync & pacemaker?

0

You must log in to answer this question.

Browse other questions tagged .