Linux-HA old school

Let’s forget about Corosync and Pacemaker shall we?

tested on Slackware 14.2

Requirements

hostname slack3hb
vi /etc/HOSTNAME

slack3hb

vi /etc/hosts

CLUSTER-IP       slack3hb
CLUSTER-IP       slack4hb

Install

You need three SBo packages

cluster-glue
heartbeat
resource-agents

as follows

groupadd -g 226 haclient
useradd -u 226 -g 226 -c "heartbeat" -d / -s /bin/false hacluster
sbopkg -i cluster-glue
sbopkg -i heartbeat
slackpkg install linuxdoc-tools
sbopkg -i resource-agents

Setup

pwgen 16

mv -i /etc/ha.d/authkeys /etc/ha.d/authkeys.dist
vi /etc/ha.d/authkeys

auth 1
1 sha1 SOME-PASSPHRASE-HERE

mv -i /etc/ha.d/ha.cf /etc/ha.d/ha.cf.dist
grep -vE '^#|^$' /etc/ha.d/ha.cf.dist > /etc/ha.d/ha.cf
vi /etc/ha.d/ha.cf

#logfacility     local0
#auto_failback on
logfile        /var/log/ha-log
auto_failback off

mcast xenbr0 239.0.0.10 694 1 0
warntime 4
deadtime 5
initdead 15
keepalive 2

node slack3hb
node slack4hb

ls -lhF /usr/lib/ocf/resource.d/heartbeat/IPaddr
ls -lhF /usr/lib/ocf/resource.d/heartbeat/IPaddr2
mv -i /etc/ha.d/haresources /etc/ha.d/haresources.dist
#grep -vE '^#|^$' /etc/ha.d/haresources.dist > /etc/ha.d/haresources
vi /etc/ha.d/haresources

slack3hb IPaddr::FACING-IP/24/xenbr0

Ready to go

start and enable

vi /etc/rc.d/rc.local

#self verbose
/etc/init.d/heartbeat start

status

/etc/init.d/heartbeat status

stop

/etc/init.d/heartbeat stop

Acceptance

Proceed with ping -w1 -c1 and arp -a in a loop from the LAN and you should see the MAC address changing, when ever you toast a node. You can also check with ifconfig xenbr0:0 on the active node.

TODO

check passphrase ideal length

Resources

homepages

Cluster Glue http://www.linux-ha.org/wiki/Cluster_Glue

Heartbeat http://www.linux-ha.org/wiki/Heartbeat

Resource Agents http://www.linux-ha.org/wiki/Resource_Agents https://github.com/ClusterLabs/resource-agents

tutorials

Haresources http://www.linux-ha.org/wiki/Haresources

Getting Started with Linux-HA (heartbeat) https://snrg.cs.hku.hk/srg/html/cprobe/ha/GettingStarted.html

Getting Started with Heartbeat https://www.linuxjournal.com/article/9838

Heartbeat configuration http://wiki.kolmisoft.com/index.php/Heartbeat_configuration

slackware packages

Slackbuilds.org (SBo) packages https://github.com/pbraun9/slackbuilds

debian/ubuntu packages

Package: heartbeat (1:3.0.6-10build1) [universe] https://packages.ubuntu.com/focal/heartbeat

heartbeat 1:3.0.6-10 source package in Ubuntu https://launchpad.net/ubuntu/+source/heartbeat/1:3.0.6-10

Package: fence-agents (4.5.2-1) [universe] https://packages.ubuntu.com/focal/fence-agents

fence-agents 4.5.2-1 source package in Ubuntu https://launchpad.net/ubuntu/+source/fence-agents/4.5.2-1


HOME | GUIDES | BENCHMARKS | html