免费注册 查看新帖 |

Chinaunix

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

heartbeat 2.x好复杂啊! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-11-30 17:48 |只看该作者 |倒序浏览
今天在作试验,基于heartbeat 2.x上的HA。
如果使用haresources只能做到系统级别的HA,不能监测到服务状态。于是改用了cib.xml。
用haresources2cib.py 转换haresources出来cib.xml。在ha.conf加了个crm yes。结果其相关的服务(smb)就不一定能起来。为什么说不一定呢?因为在2台都重启后,过个几分钟有几次smb服务启动了。

看了一天的heartbeat官方网站,头晕了!哪位高手帮帮忙看看!

cib.xml
主机2台 lvs lvs1 服务是smb 没有共享磁盘。heartbeat的VIP192.168.67.222/16 eth1
<cib admin_epoch="0" epoch="1" num_updates="16" have_quorum="true" generated="true" num_peers="1" ccm_transition="1" cib_feature_revision="1.3" dc_uuid="3f471282-3136-4564-87a9-6c612290c8e1" cib-last-written="Thu Nov 30 14:42:47 2006">
   <configuration>
     <crm_config>
       <cluster_property_set id="cib-bootstrap-options">
         <attributes>
           <nvpair id="cib-bootstrap-options-symmetric_cluster" name="symmetric_cluster" value="true"/>
           <nvpair id="cib-bootstrap-options-no_quorum_policy" name="no_quorum_policy" value="stop"/>
           <nvpair id="cib-bootstrap-options-default_resource_stickiness" name="default_resource_stickiness" value="0"/>
           <nvpair id="cib-bootstrap-options-default_resource_failure_stickiness" name="default_resource_failure_stickiness" value="0"/>
           <nvpair id="cib-bootstrap-options-stonith_enabled" name="stonith_enabled" value="false"/>
           <nvpair id="cib-bootstrap-options-stonith_action" name="stonith_action" value="reboot"/>
           <nvpair id="cib-bootstrap-options-stop_orphan_resources" name="stop_orphan_resources" value="true"/>
           <nvpair id="cib-bootstrap-options-stop_orphan_actions" name="stop_orphan_actions" value="true"/>
           <nvpair id="cib-bootstrap-options-remove_after_stop" name="remove_after_stop" value="false"/>
           <nvpair id="cib-bootstrap-options-short_resource_names" name="short_resource_names" value="true"/>
           <nvpair id="cib-bootstrap-options-transition_idle_timeout" name="transition_idle_timeout" value="5min"/>
           <nvpair id="cib-bootstrap-options-default_action_timeout" name="default_action_timeout" value="5s"/>
           <nvpair id="cib-bootstrap-options-is_managed_default" name="is_managed_default" value="true"/>
         </attributes>
       </cluster_property_set>
     </crm_config>
     <nodes>
       <node id="af8c5837-cad6-4adc-aaf9-61340c730e96" uname="lvs" type="normal"/>
       <node id="3f471282-3136-4564-87a9-6c612290c8e1" uname="lvs1" type="normal"/>
     </nodes>
     <resources>
       <group id="group_1">
         <primitive class="ocf" id="IPaddr_192_168_67_222" provider="heartbeat" type="IPaddr">
           <operations>
             <op id="IPaddr_192_168_67_222_mon" interval="5s" name="monitor" timeout="5s"/>
           </operations>
           <instance_attributes id="IPaddr_192_168_67_222_inst_attr">
             <attributes>
               <nvpair id="IPaddr_192_168_67_222_attr_0" name="ip" value="192.168.67.222"/>
               <nvpair id="IPaddr_192_168_67_222_attr_1" name="netmask" value="16"/>
               <nvpair id="IPaddr_192_168_67_222_attr_2" name="nic" value="eth1"/>
             </attributes>
           </instance_attributes>
         </primitive>
         <primitive class="lsb" id="smb_2" provider="heartbeat" type="smb">
           <operations>
             <op id="smb_2_mon" 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" id="prefered_location_group_1_expr" operation="eq" value="lvs1"/>
         </rule>
       </rsc_location>
           <rsc_location id="rsc_location_group_2" rsc="group_2">
         <rule id="prefered_location_group_2" score="50">
           <expression attribute="#uname" id="prefered_location_group_2_expr" operation="eq" value="lvs"/>
         </rule>
       </rsc_location>
     </constraints>
   </configuration>
</cib>

论坛徽章:
0
2 [报告]
发表于 2006-12-01 10:12 |只看该作者
谁能贴一个已经能实际使用的完整的cib.xml参考一下!!!

忽然发现cib.xml内容会被改变,神奇啊~
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP