两台机器用heartbea做tHA问题???
操作系统为FC 5
两台机器都按照网上的资料配好了,但是启动时候发现两台都是active的?正确吗? 按照常理应该是一台active,另一台是standby才对啊,不知道有没有高人能够给点一下,两台机器配置文件配置的都一样吗? 刚开始是系统怎么判断谁是active,谁是standby的?
配置文件无非就是 /etc/ha.d/haresoures ha.cf ldirectord.cf 和 autheys这四个,可就是感觉不正常,搞晕了!
[root@fc5ha1 ha.d]# ifconfig
eth2 Link encap:Ethernet HWaddr 00:16:35:C4:CE:74
inet addr:10.17.34.128 Bcast:10.17.34.255 Mask:255.255.255.0
inet6 addr: fe80::216:35ff:fec4:ce74/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:11183 errors:0 dropped:0 overruns:0 frame:0
TX packets:3345 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2929148 (2.7 MiB) TX bytes:590143 (576.3 KiB)
Interrupt:19
eth2:0 Link encap:Ethernet HWaddr 00:16:35:C4:CE:74
inet addr:10.17.34.117 Bcast:10.17.34.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:19
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1015 errors:0 dropped:0 overruns:0 frame:0
TX packets:1015 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:52919 (51.6 KiB) TX bytes:52919 (51.6 KiB)
另一台:
[root@fc5ha2 new]# ifconfig
eth2 Link encap:Ethernet HWaddr 00:16:35:C22:B3
inet addr:10.17.34.198 Bcast:10.17.34.255 Mask:255.255.255.0
inet6 addr: fe80::216:35ff:fec2:d2b3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:387270 errors:0 dropped:0 overruns:0 frame:0
TX packets:25949 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:68323087 (65.1 MiB) TX bytes:3844589 (3.6 MiB)
Interrupt:19
eth2:0 Link encap:Ethernet HWaddr 00:16:35:C22:B3
inet addr:10.17.34.117 Bcast:10.17.34.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:19
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:10136 errors:0 dropped:0 overruns:0 frame:0
TX packets:10136 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:508831 (496.9 KiB) TX bytes:508831 (496.9 KiB)
两者eth2:0都起了,是不是意味着都是active的?
用 service heartbeat stop命令后结果如下:
[root@fc5ha2 new]# ifconfig
eth2 Link encap:Ethernet HWaddr 00:16:35:C22:B3
inet addr:10.17.34.198 Bcast:10.17.34.255 Mask:255.255.255.0
inet6 addr: fe80::216:35ff:fec2:d2b3/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:392377 errors:0 dropped:0 overruns:0 frame:0
TX packets:26871 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:69639596 (66.4 MiB) TX bytes:3964632 (3.7 MiB)
Interrupt:19
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:10654 errors:0 dropped:0 overruns:0 frame:0
TX packets:10654 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:534731 (522.1 KiB) TX bytes:534731
正常吗?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
帮顶一下,我也是个情况。
你是切换IP吧?一开始IP应该在一台上的
可能是你哪里配置错了
没有啊 两台机器上只是配了 lo:0
配置的问题,仔细检查一下,特别是小细节。
不应该在两台机器上都ifconfig ethx。
那你从外部访问的结果如何啊?