Developers guide
Chapter 8
Copyright © 2008-2013 Inverse inc.
Operating System Best Practices 71
∏
eth0.z is the name of the NIC configuration file (/etc/sysconfig/network-scripts/ifcfg_eth0.z)
dedicated to IP address in VLAN z (isolation for example).
Create the /etc/ha.d/resource.d/IfUp script that will mount IP addresses in Registration, Isolation
(eth0.y, eth0.z) with the following content:
case "$2" in
start)
echo -n "Mounting $1"
/sbin/ifup $1
echo "."
;;
stop)
echo -n "Unmounting $1"
/sbin/ifdown $1
echo "."
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
and make it executable:
# chmod 755 /etc/ha.d/resource.d/IfUp
Create /etc/ha.d/authkeys with the following content:
auth 1
1 sha1 10b245aa92161294df5126abc5b3b71d
and change its rights like this:
# chmod 600 /etc/ha.d/authkeys
Create /etc/logd.cf with the following content:
debugfile /var/log/ha-debug
logfile /var/log/ha-log
logfacility daemon
Note
Make sure port 694 is opened (through iptables) on both servers
Start Heartbeat:
# service heartbeat start