我想使用 heartbeat 在三个节点上设置虚拟 IP。目前,我有以下配置:
ha.cf:
# Facility to use for syslog()/logger (alternative to log/debugfile)
logfacility local0
# keepalive: how many seconds between heartbeats
keepalive 2
# deadtime: seconds-to-declare-host-dead
deadtime 10
# What UDP port to use for udp or ppp-udp communication?
udpport 694
# What interfaces to broadcast heartbeats over?
ucast eth0 192.168.20.22
ucast eth0 192.168.20.23
ucast eth0 192.168.20.24
# What interfaces to heartbeat over?
udp eth0
# Tell what machines are in the cluster
# node nodename ... -- must match uname -n
node prx2
node prx3
node prx4
资源:
prx2 192.168.20.25
当我启动机器时,prx2获取虚拟 IP。但当我关闭prx2,两个都 prx3和prx4获取虚拟IP,这意味着我的服务不再可访问。
我究竟做错了什么?
附言:我使用的是 Debian Squeeze
答案1
很抱歉,我无法回答你的具体问题,但根据我的经验,我建议使用起搏器它是已终止项目 Heartbeat 的后继者。