refer: http://gentoo-overlays.zugaina.org/scarabeus/sys-cluster.html.en
refer: http://www.linux-ha.org
emerge -upDN git
NOTE: at the moment the init scripts (heartbeat-logd) does not support openrc. (looks like we dont need it.)
/etc/make.conf
PORTDIR_OVERLAY="/usr/local/portage"
Get the overlay
mkdir /usr/local/portage/
mkdir /usr/local/git/
cd /usr/local/git
git --git-dir=/usr/local/git/ clone git://git.overlays.gentoo.org/dev/scarabeus.git
note: it may ignore --git-dir so: mv /root/scarabeus /usr/local/git/
ln -s /usr/local/git/scarabeus/sys-cluster /usr/local/portage/
/etc/portage/package.keywords
sys-cluster/heartbeat ~amd64
sys-cluster/cluster-glue ~amd64
sys-cluster/resource-agents ~amd64
sys-cluster/pacemaker ~amd64
emerge -upDN heartbeat pacemaker
all good then:
emerge -uDN heartbeat pacemaker
get heartbeat configured: all the directory install locations are messed up.
ln -s /usr/share/heartbeat/ResourceManager /usr/lib64/heartbeat/ResourceManager
ln -s /etc/ha.d /var/ha.d
/etc/ha.d/haresources
pegproxy01 192.168.103.5/24/eth0 squid
/etc/ha.d/ha.cf
logfile /var/log/ha-log
use_logd on
#logfacility daemon
bcast eth0
keepalive 2
warntime 10
deadtime 30
auto_failback off
node pegproxy01 pegproxy02
#crm respawn
/etc/ha.d/authkeys
auth 1
1 sha1 some-really-clever-password
chmod 600 /etc/ha.d/authkeys
/etc/ha.d/ha_logd.cf
debugfile /var/log/ha-debug
logfile /var/log/ha-log
rc-update add heartbeat default
/etc/hosts : add the other node
/etc/init.d/heartbeat start
ln -s /usr/share/heartbeat/hb_standby /root/hb_standby
ln -s /usr/share/heartbeat/hb_takeover /root/hb_takeover
If cloning remember to:
Delete /var/lib/heartbeat/hb_uuid on either one of the machines and try again.