服务器 频道

SUSE Linux企业服务器搭建双机集群配置

  四、测试HA系统

  首先,关闭linux1的网络服务(也可以使用shutdown):

  #/etc/init.d/network stop

  然后,查看linux2的log文件。正确结果是HA系统发现linux1已经dead,由linux2接替其工作。

  #tail -f /var/log/ha-log

  heartbeat: 2010/4/02_14:18:16 WARN: node 10.1.1.1:is dead

  heartbeat: 2010/4/02_14:18:16 info: Link 10.1.1.1:10.1.1.1 dead................

  heartbeat: 2010/4/02_14:18:27 info: mach_down takeover complete.

  heartbeat: 2010/4/02_14:18:27 info: mach_down takeober complete for node linux1.

  heartbeat: 2010/4/02_14:18:27 ERROR: Both machines own our resources!

  同时,在linux2上面检查浮动IP,此时浮动IP应该绑定在linux2上。用"ifconfig"查看如图3示。

  这时,通过Client端访问浮动IP:192.168.8.112,HTTP服务正常。

  Eth0:0 Link encap:Ethernet HWaddr 00:0C:29:35:E6:63

  Inet addr:192.168.0.112 bcast:192.168.9.255 Mask:255.255.254.0

  Interrupt:9 Base address:0x1000

  重新启动linux1的网络服务,浮动IP将又重新绑定到linux1。此时通过Client端访问浮动IP:192.168.8.112,HTTP服务同样正常。

0
相关文章