免费注册 查看新帖 |

Chinaunix

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

求解:redhat HA ip规划的不解 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-05-23 14:01 |只看该作者 |倒序浏览
以下是我在两台HP-dl380上的实验:

现在是服务切换都没有问题,问题是断心跳线或者断fence网线,机器没有想象中的重启(log中没看到有fence对方的文字出现)。
如果将配置文件中的node1.com/node2.com 换成nd1/nd2 则两台机就是,在clustat中互相以为对方offline并相互fence对方重启。看官方文档似乎对IP规划这一块没太多的描述:主机IP和心跳IP应处于不同网段。但是为什么会互相以为对方offline呢?

求解!!!

[root@node2 ~]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
::1             localhost6.localdomain6 localhost6
127.0.0.1               localhost.localdomain localhost

192.168.25.11  fence_nd1   ####hp ilo
192.168.25.10  fence_nd2   ####hp ilo
192.168.25.111   nd1       ####心跳线
192.168.25.112   nd2       ####心跳线
#192.168.25.5   node1  nd1
#192.168.25.6   node2  nd2
192.168.22.3    node1.com   ####节点名     
192.168.22.4    node2.com   ####节点名  

[root@node2 ~]# cat /etc/cluster/cluster.conf
<?xml version="1.0"?>
<cluster alias="bee" config_version="23" name="bee">
        <fence_daemon clean_start="0" post_fail_delay="0" post_join_delay="3"/>
        <clusternodes>
                <clusternode name="node1.com" nodeid="1" votes="1">
                        <fence>
                                <method name="1">
                                        <device name="fence_nd1"/>
                                </method>
                        </fence>
                </clusternode>
                <clusternode name="node2.com" nodeid="2" votes="1">
                        <fence>
                                <method name="1">
                                        <device name="fence_nd2"/>
                                </method>
                        </fence>
                </clusternode>
        </clusternodes>
        <cman expected_votes="1" two_node="1"/>
        <fencedevices>
                <fencedevice agent="fence_ilo" hostname="192.168.25.11" login="Administrator" name="fence_nd1" passwd="beemedia"/>
                <fencedevice agent="fence_ilo" hostname="192.168.25.10" login="Administrator" name="fence_nd2" passwd="beemedia"/>
        </fencedevices>
        <rm>
                <failoverdomains>
                        <failoverdomain name="www" nofailback="1" ordered="1" restricted="1">
                                <failoverdomainnode name="node1.com" priority="1"/>
                                <failoverdomainnode name="node2.com" priority="2"/>
                        </failoverdomain>
                        <failoverdomain name="ftp" nofailback="1" ordered="1" restricted="1">
                                <failoverdomainnode name="node1.com" priority="2"/>
                                <failoverdomainnode name="node2.com" priority="1"/>
                        </failoverdomain>
                </failoverdomains>
                <resources>
                        <ip address="192.168.22.8" monitor_link="1"/>
                        <ip address="192.168.22.9" monitor_link="1"/>
                        <script file="/etc/init.d/httpd" name="www"/>
                        <script file="/etc/init.d/vsftpd" name="ftp"/>
                </resources>
                <service autostart="1" domain="www" exclusive="0" name="www" recovery="relocate">
                        <ip ref="192.168.22.8">
                                <script ref="www"/>
                        </ip>
                </service>
                <service autostart="1" domain="ftp" exclusive="0" name="ftp" recovery="relocate">
                        <ip ref="192.168.22.9">
                                <script ref="ftp"/>
                        </ip>
                </service>
        </rm>
        <totem consensus="4800" join="60" token="10000" token_retransmits_before_loss_const="20"/>
</cluster>
[root@node2 ~]# clustat
Cluster Status for bee @ Thu May 19 12:03:29 2011
Member Status: Quorate

Member Name                                                     ID   Status
------ ----                                                     ---- ------
node1.com                                                           1 Online, rgmanager
node2.com                                                           2 Online, Local, rgmanager

Service Name              Owner (Last)                                   State         
------- ----                   ----- ------                                     -----         
service:ftp                   node2.com                                started      
service:www                 node1.com                                started

论坛徽章:
0
2 [报告]
发表于 2011-05-23 14:11 |只看该作者
或者说我这个IP 规划  有问题吗?请大侠指教!!谢谢!!!

论坛徽章:
0
3 [报告]
发表于 2011-05-23 15:19 |只看该作者
问题解决!心跳IP一定要和业务ip在同一网段。

论坛徽章:
0
4 [报告]
发表于 2011-05-23 22:08 |只看该作者
还有这规定?我们生产系统的业务IP很心跳IP分别是192和10网段的,没发现有此问题

论坛徽章:
0
5 [报告]
发表于 2011-05-26 15:26 |只看该作者
192.168.25.11  fence_nd1   ####hp ilo
192.168.25.10  fence_nd2   ####hp ilo
192.168.25.111   nd1       ####心跳线
192.168.25.112   nd2       ####心跳线
心跳线不要和业务在一个网段。

论坛徽章:
0
6 [报告]
发表于 2011-05-26 19:12 |只看该作者
回复 3# lq2003


    心跳走私网,业务走外网,不要在同一网段,cluster配置的主机名和你hosts文件中的主机名对应的IP就是心跳IP
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP