免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 6990 | 回复: 7
打印 上一主题 下一主题

hearbeat配置问题(R0NALDO) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-10-31 15:37 |只看该作者 |倒序浏览
两虚拟机:
192.168.100.25    node1
192.168.100.108  bogon

共享磁盘:/dev/sdc

预期结果:node1挂载共享磁盘,bogon做standby。node1断电,bogon自动接上

实际结果:node1 shutdown后,bogob没有自动挂载。


bogon节点ha.cf配置:

logfile        /var/log/ha-log
logfacility        local0
keepalive 2
deadtime 30
warntime 10
initdead 120
udpport        694
bcast        eth0                # Linux
node        node1  bogon
ping 192.168.100.1
respawn hacluster /usr/lib64/heartbeat/ipfai

bogon节点haresource配置:
bogon 192.168.100.108  Filesystem::/dev/sdc::/mnt/mdt::ext3

node1 节点ha.cf配置:
logfile        /var/log/ha-log
logfacility        local0
keepalive 2
deadtime 30
warntime 10
initdead 120
udpport        694
bcast        eth0                # Linux
auto_failback off
node        node1 bogon
ping 192.168.100.1
respawn hacluster /usr/lib64/heartbeat/ipfail

node1节点haresource配置:
node1 192.168.100.25  Filesystem::/dev/sdc::/mnt/mdt::ext3

论坛徽章:
3
处女座
日期:2014-11-05 11:02:4315-16赛季CBA联赛之四川
日期:2015-12-10 14:37:4015-16赛季CBA联赛之天津
日期:2017-09-08 18:39:34
2 [报告]
发表于 2011-10-31 16:01 |只看该作者
回复 1# R0NALDO


        换 一下 心跳配置试试:
bcast eth0  和 node配置改为以下配置:

node1 ha.cf配置:
ucast eth0 192.168.100.108
node node1
node bogon

bogon ha.cf配置:
ucast eth0 192.168.100.25
node node1
node bogon

ping配置可以去掉

论坛徽章:
0
3 [报告]
发表于 2011-10-31 16:15 |只看该作者
还是不行。
down掉node1后,bogon HA-log如下:
ResourceManager[4751]:        2011/10/31_12:13:11 info: Running /etc/ha.d/resource.d/IPaddr 192.168.100.108 stop
IPaddr[5062]:        2011/10/31_12:13:11 INFO:  Success
heartbeat[4105]: 2011/10/31_12:13:19 info: Local Resource acquisition completed. (none)
heartbeat[4105]: 2011/10/31_12:13:19 info: local resource transition completed.
hb_standby[5150]:        2011/10/31_12:13:40 Going standby [foreign].
heartbeat[4105]: 2011/10/31_12:13:40 info: bogon wants to go standby [foreign]
hb_standby[5173]:        2011/10/31_12:13:41 Going standby [foreign].
heartbeat[4105]: 2011/10/31_12:13:41 WARN: Standby in progress- new request from bogon ignored [9 seconds left]
heartbeat[4105]: 2011/10/31_12:13:52 WARN: No reply to standby request.  Standby request cancelled.

论坛徽章:
0
4 [报告]
发表于 2011-10-31 16:18 |只看该作者
两台机器的心跳有问题。

论坛徽章:
3
处女座
日期:2014-11-05 11:02:4315-16赛季CBA联赛之四川
日期:2015-12-10 14:37:4015-16赛季CBA联赛之天津
日期:2017-09-08 18:39:34
5 [报告]
发表于 2011-10-31 23:17 |只看该作者
heartbeat要一下3个文件:
authkeys
cib.xml
ha.cf

两个主机上的ha.cf是配置不一样的,剩下两个文件,双机上一样

cib.xml应该是配置资源组的,具体怎么配置的,google上都查的到

论坛徽章:
3
处女座
日期:2014-11-05 11:02:4315-16赛季CBA联赛之四川
日期:2015-12-10 14:37:4015-16赛季CBA联赛之天津
日期:2017-09-08 18:39:34
6 [报告]
发表于 2011-10-31 23:39 |只看该作者
Heartbeat.pdf (207.81 KB, 下载次数: 123)

论坛徽章:
3
处女座
日期:2014-11-05 11:02:4315-16赛季CBA联赛之四川
日期:2015-12-10 14:37:4015-16赛季CBA联赛之天津
日期:2017-09-08 18:39:34
7 [报告]
发表于 2011-10-31 23:48 |只看该作者
参考这个帖子:
http://bbs.chinaunix.net/thread-2089195-1-1.html
配置比较详细

论坛徽章:
0
8 [报告]
发表于 2011-11-02 16:14 |只看该作者
两台机的haresource都得写node1的,另外以我的理解你这两台机都是常活的,IP本来都是配好的,所以haresource里不用加IPaddr,haresource里一般都是用来加虚IP的

两台机的haresource都应该写成:
node1 Filesystem::/dev/sdc::/mnt/mdt::ext3
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP