歡迎您光臨本站 註冊首頁

HA 雙機,怎樣配置active/passive?求助!求助!

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

HA 雙機,怎樣配置active/passive?求助!求助!

heartbeat v2配置,具體配置如下。
運行結果是兩個node都acitve,怎樣可以使active/passive?而且passive的node上資源是不運行的。
謝謝!

ha.cf
=============================
debugfile /var/log/ha-debug
logfile        /var/log/ha-log
logfacility        local0
keepalive 2
deadtime 30
warntime 10
initdead 120
udpport        694
ucast eth1 192.168.0.2
auto_failback off
traditional_compression false
node appsvr
node catsvr
ping 192.168.1.1
respawn hacluster /usr/lib/heartbeat/ipfail
compression        zlib
compression_threshold 2
crm yes
==========================================

haresources
==========================================
appsvr 192.168.1.77 paygo
==========================================

cib.xml
==========================================
<cib generated="true" admin_epoch="0" epoch="3" num_updates="63" have_quorum="true" ccm_transition="1" num_peers="1" cib_feature_revision="1.2" crm_feature_set="1.0.4" debug_source="create_node_entry" dc_uuid="2b6ee980-493b-42db-8c19-b23c75e7e1f3" last_written="Tue Aug 29 15:56:21 2006">
   <configuration>
     <crm_config>
       <cluster_property_set id="deafult">
         <attributes>
           <nvpair id="symmetric_cluster" name="symmetric_cluster" value="true"/>
           <nvpair id="no_quorum_policy" name="no_quorum_policy" value="stop"/>
           <nvpair id="default_resource_stickiness" name="default_resource_stickiness" value="0"/>
           <nvpair id="stonith_enabled" name="stonith_enabled" value="false"/>
           <nvpair id="stop_orphan_resources" name="stop_orphan_resources" value="false"/>
           <nvpair id="stop_orphan_actions" name="stop_orphan_actions" value="true"/>
           <nvpair id="remove_after_stop" name="remove_after_stop" value="false"/>
           <nvpair id="short_resource_names" name="short_resource_names" value="true"/>
           <nvpair id="transition_idle_timeout" name="transition_idle_timeout" value="5min"/>
           <nvpair id="is_managed_default" name="is_managed_default" value="true"/>
         </attributes>
       </cluster_property_set>
     </crm_config>
     <nodes>
       <node name="appsvr" type="normal" id="addaf379-b849-4c4d-8c9d-0da6193e95f8"/>
       <!--node name="catsvr" type="normal" id="70b00b14-ca73-43ff-aeb8-cb4ca567aaf5"/-->
       <node id="2b6ee980-493b-42db-8c19-b23c75e7e1f3" uname="catsvr" type="normal"/>
     </nodes>
     <resources>
       <group id="group_1">
         <primitive class="ocf" id="IPaddr_1" provider="heartbeat" type="IPaddr">
           <operations>
             <op id="IPaddr_1_mon" interval="5s" name="monitor" timeout="5s"/>
           </operations>
           <instance_attributes>
             <attributes>
               <nvpair id="IPaddr_1_attr_0" name="ip" value="192.168.1.77"/>
             </attributes>
           </instance_attributes>
         </primitive>
         <primitive class="ocf" id="paygo_2" provider="heartbeat" type="paygo">
           <operations>
             <op id="paygo_2_mon" interval="30s" 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="appsvr"/>
         </rule>
       </rsc_location>
     </constraints>
   </configuration>
</cib>
===============================================================

[ 本帖最後由 mooncui 於 2006-9-1 17:07 編輯 ]
《解決方案》

頂一下
《解決方案》

為什麼沒人幫忙一下?
《解決方案》

原帖由 mooncui 於 2006-8-30 11:41 發表
heartbeat v2配置,具體配置如下。
ucast eth1 192.168.0.2
auto_failback off
traditional_compression false
node appsvr
node catsvr
ping 192.168.1.1

auto_failback on
ucast eth1 192.168.0.2 和ping 192.168.1.1
後面一句樓主的意思是否是:當主調度機ping不通網關,就判斷主調度機掛了,讓從調度機接手呢?

那麼,如果是這樣,請問,單憑這句,從調度機又如何來判斷主調度機是掛了的呢?

[火星人 ] HA 雙機,怎樣配置active/passive?求助!求助!已經有506次圍觀

http://coctec.com/docs/service/show-post-9067.html