免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: archangle

再问一个heartbeat2.0的问题 [复制链接]

论坛徽章:
0
发表于 2005-08-19 08:20 |显示全部楼层

再问一个heartbeat2.0的问题

从这里看你只佩了一个ip呀,把你的haresource 和刚出炉的cib.xml给我

论坛徽章:
0
发表于 2005-08-19 08:27 |显示全部楼层

再问一个heartbeat2.0的问题

#-------------------------------------------------------------------
#
#       One service address, with the subnet, interface and bcast addr
#       explicitly defined.
#
#just.linux-ha.org      135.9.216.3/28/eth0/135.9.216.12 httpd
#
#-------------------------------------------------------------------
#
#       An example where a shared filesystem is to be used.
#       Note that multiple aguments are passed to this script using
#       the delimiter '::' to separate each argument.
#
#node1  10.0.0.170 Filesystem::/dev/sda1::/data1::ext2
#
#       Regarding the node-names in this file:
#
#       They must match the names of the nodes listed in ha.cf, which in turn
#       must match the `uname -n` of some node in the cluster.  So they aren't
#       virtual in any sense of the word.

cluster1 192.168.10.3 httpd
cluster2 192.168.10.5 httpd


这是我的haresources文件~~~~~

论坛徽章:
0
发表于 2005-08-19 08:35 |显示全部楼层

再问一个heartbeat2.0的问题

这个是我生成的,你是不是把输入文件位置搞错了? 转换的是另一个haresources文件?
<?xml version="1.0" ?>;
<cib>;
        <configuration>;
                <crm_config>;
                        <nvpair id="transition_idle_timeout" name="transition_idle_timeout" value="120s"/>;
                        <nvpair id="symmetric_cluster" name="symmetric_cluster" value="true"/>;
                        <nvpair id="no_quorum_policy" name="no_quorum_policy" value="stop"/>;
                </crm_config>;
                <nodes/>;
                <resources>;
                        <group id="group_1">;
                                <primitive class="ocf" id="IPaddr_1" provider="heartbeat" type="IPaddr">;
                                        <operations>;
                                                <op id="1" interval="5s" name="monitor" timeout="5s"/>;
                                        </operations>;
                                        <instance_attributes>;
                                                <attributes>;
                                                        <nvpair name="ip" value="192.168.10.3"/>;
                                                </attributes>;
                                        </instance_attributes>;
                                </primitive>;
                                <primitive class="heartbeat" id="httpd_2" provider="heartbeat" type="httpd">;
                                        <operations>;
                                                <op id="1" interval="120s" name="monitor" timeout="60s"/>;
                                        </operations>;
                                </primitive>;
                        </group>;
                        <group id="group_4">;
                                <primitive class="ocf" id="IPaddr_4" provider="heartbeat" type="IPaddr">;
                                        <operations>;
                                                <op id="1" interval="5s" name="monitor" timeout="5s"/>;
                                        </operations>;
                                        <instance_attributes>;
                                                <attributes>;
                                                        <nvpair name="ip" value="192.168.10.5"/>;
                                                </attributes>;
                                        </instance_attributes>;
                                </primitive>;
                                <primitive class="heartbeat" id="httpd_5" provider="heartbeat" type="httpd">;
                                        <operations>;
                                                <op id="1" interval="120s" name="monitor" timeout="60s"/>;
                                        </operations>;
                                </primitive>;
                        </group>;
                </resources>;
                <constraints>;
                        <rsc_location id="rsc_location_group_1" rsc="group_1">;
                                <rule id="prefered_location_group_1" score="100">;
                                        <expression attribute="#uname" operation="eq" value="cluster1"/>;
                                </rule>;
                        </rsc_location>;
                        <rsc_location id="rsc_location_group_4" rsc="group_4">;
                                <rule id="prefered_location_group_4" score="100">;
                                        <expression attribute="#uname" operation="eq" value="cluster2"/>;
                                </rule>;
                        </rsc_location>;
                </constraints>;
        </configuration>;
        <status/>;
</cib>;

论坛徽章:
0
发表于 2005-08-19 08:42 |显示全部楼层

再问一个heartbeat2.0的问题

没有理由的,我三台机器都是这样,很郁闷~~~~

论坛徽章:
0
发表于 2005-08-19 09:03 |显示全部楼层

再问一个heartbeat2.0的问题

我CP一个CIB的文件,这下好了,一个IP都起不来,而且服务也没有起来

论坛徽章:
0
发表于 2005-08-19 09:10 |显示全部楼层

再问一个heartbeat2.0的问题

我发现在了,不是我的CIB的文件没有做对,是因为我只要把服务重起,那个文件自己就变成了上面的那样~~~~

论坛徽章:
0
发表于 2005-08-19 09:18 |显示全部楼层

再问一个heartbeat2.0的问题

我觉得你可以在3个节点上都把httpd服务器跑起来.
在集群里面的资源只放ip地址.这样测试一下.

论坛徽章:
0
发表于 2005-08-19 09:26 |显示全部楼层

再问一个heartbeat2.0的问题

再问一个问题,我假设做一个4+2的集群,4台正常服务,2台备份.正常服务的机器上只能跑一个vip,而备份的机器上可以跑多个vip.但是不能让备份的2个节点跑同一个vip.
这个需要怎么配置呢?
我觉得用Locational Constraints可以完成第一个目标.
但是第二个目标如何实现呢?
另外用Locational Constraints完成第一个目标的话,感觉会很烦琐.能不能有更高级的规则可以实用呢?

论坛徽章:
0
发表于 2005-08-19 11:24 |显示全部楼层

再问一个heartbeat2.0的问题

在下面的这个规则里面.vip2,节点是不是比backup更适合运行这个资源?如果让vip2比backup有更高的优先级,如何做呢?
      <rsc_location id="rsc_location_IPaddr_2" rsc="IPaddr_2">;
         <rule id="prefered_location_IPaddr_2" score="100" boolean_op="or">;
           <expression attribute="cluster_group" operation="eq" value="vip2" id="3ce1189a-f5fc-47cb-b2ae-9ff448f4d97d"/>;
           <expression attribute="cluster_group" operation="eq" value="backup" id="5fa8a144-6139-4df6-bc15-abe8b1841eaf"/>;
         </rule>;
       </rsc_location>;

论坛徽章:
0
发表于 2005-08-19 15:15 |显示全部楼层

再问一个heartbeat2.0的问题

你的vip们是平等的吗?
你写的那个不能使vip2比backup有更高的优先级,应当这样,
    <rsc_location id="rsc_location_IPaddr_2" rsc="IPaddr_2">;
        <rule id="prefered_location_IPaddr_2" score="100" boolean_op="or">;
          <expression attribute="cluster_group" operation="eq" value="vip2" id="3ce1189a-f5fc-47cb-b2ae-9ff448f4d97d"/>;
        </rule>;
        <rule id="prefered_location_IPaddr_3" score="50" boolean_op="or">;
          <expression attribute="cluster_group" operation="eq" value="backup" id="5fa8a144-6139-4df6-bc15-abe8b1841eaf"/>;
        </rule>;
      </rsc_location>;
然后资源之间的关系是用rsc_order表示的
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP