求解:redhat HA ip規劃的不解
以下是我在兩台HP-dl380上的實驗:
現在是服務切換都沒有問題,問題是斷心跳線或者斷fence網線,機器沒有想象中的重啟(log中沒看到有fence對方的文字出現)。
如果將配置文件中的node1.com/node2.com 換成nd1/nd2 則兩台機就是,在clustat中互相以為對方offline並相互fence對方重啟。看官方文檔似乎對IP規劃這一塊沒太多的描述:主機IP和心跳IP應處於不同網段。但是為什麼會互相以為對方offline呢?
求解!!!
# 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 ####節點名
# 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>
# 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
《解決方案》
或者說我這個IP 規劃 有問題嗎?請大俠指教!!謝謝!!!
《解決方案》
問題解決!心跳IP一定要和業務ip在同一網段。
《解決方案》
還有這規定?我們生產系統的業務IP很心跳IP分別是192和10網段的,沒發現有此問題
《解決方案》
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 ####心跳線
心跳線不要和業務在一個網段。
《解決方案》
回復 3# lq2003
心跳走私網,業務走外網,不要在同一網段,cluster配置的主機名和你hosts文件中的主機名對應的IP就是心跳IP