This topology provides a High Availability service with minimal hardware requirements.
The documentation that follows assumes that all nodes on the network are set up with correct interfaces and routes for each network they are connected to as per the diagram above.
Heartbeat runs on the two Real-Servers and handles bringing up the interface for the virtual address. This is the address to which end-users should connect and is typically advertised using DNS.
To configure heartbeat, /etc/ha.d/ha.cf, /etc/ha.d/haresources and /etc/ha.d/authkeys must be installed. The node names in /etc/ha.d/ha.cf
and /etc/ha.d/haresources have to be set according to the output of the uname -n command on each real-server. The key ultramonkey in /etc/ha.d/authkeys, should be modified to something confidential to the site. The /etc/ha.d/authkeys must be mode 600, this can be done using the chmod command.chmod 600 /etc/ha.d/authkeysThe configuration files supplied expect that the real-servers are connected via eth0 and by a null modem connected to /dev/ttyS0. This may be modified but it is highly recommended that heartbeat be run over at least two links as per notes on communication-media failure.
It is important to ensure that heartbeat will start up on system boot.
Red Hat Enterprise Linux 3:
/sbin/chkconfig --level 2345 heartbeat on
On Debian (note the trailing "."):
/usr/sbin/update-rc.d heartbeat start 75 2 3 4 5 . stop 05 0 1 6 .
To start heartbeat on both Debian and Red Hat Enterprise Linux, run:
/etc/init.d/heartbeat startAfter a few moments heartbeat should add the virtual address to eth0 on the first real-server that heartbeat is started on, the master. This can be verified using the ip command.
/sbin/ip addr sh eth0
3: eth0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether 00:50:56:4f:30:07 brd ff:ff:ff:ff:ff:ff
inet 192.168.6.4/16 brd 192.168.6.255 scope global eth0
inet 192.168.6.240/16 brd 192.168.6.255 scope global secondary eth0
The other server should become the standby and stopping heartbeat on the
master with the following command should effect a fail over:
/etc/init.d/heartbeat stopHeartbeat logs debugging and status information to /var/log/messages and this log should be inspected if problems occur. Please see notes on logging to ensure that all logs are written to disk by syslog.
Copyright © 2000-2005,
Horms
Last Updated: Sat Mar 4 16:33:56 2006 +0900
Debian is a registered trademark of Software in the Public Interest, Inc.
Red Hat, the Red Hat Shadowman logo and Fedora are
registered trademarks of Red Hat, Inc.
Red Hat may also be refered to as RedHat on this site.
Linux is a registered trademark of Linus Torvalds.
All other trademarks are the property of their respective owners.