歡迎您光臨本站 註冊首頁

redhat集群問題

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

redhat集群問題

我的cluster.conf配置如下

<?xml version="1.0"?>
<cluster alias="http_cluster" config_version="6" name="http_cluster">
        <quorumd device="/dev/sdb5" interval="1" label="myqdisk2" min_score="1" tko="10" votes="1">
                <heuristic interval="1" program="ping -c1 -t1 192.168.18.1" score="1"/>
        </quorumd>
        <fence_daemon post_fail_delay="0" post_join_delay="3"/>
        <clusternodes>
                <clusternode name="cluster1.example.com" nodeid="1" votes="1">
                        <fence/>
                </clusternode>
                <clusternode name="cluster2.example.com" nodeid="2" votes="1">
                        <fence/>
                </clusternode>
        </clusternodes>
        <cman/>
        <fencedevices/>
        <rm>
                <failoverdomains>
                        <failoverdomain name="http-fail-domain" ordered="1" restricted="1">
                                <failoverdomainnode name="cluster1.example.com" priority="1"/>
                                <failoverdomainnode name="cluster2.example.com" priority="1"/>
                        </failoverdomain>
                </failoverdomains>
                <resources>
                        <ip address="192.168.18.111" monitor_link="1"/>
                        <clusterfs device="/dev/vg01/lv01" force_unmount="0" fsid="31096" fstype="gfs" mountpoint="/var/www/html" name="my-gfs" options=""/>
                        <script file="/etc/init.d/httpd" name="http"/>
                </resources>
                <service autostart="1" domain="http-fail-domain" name="http-server" recovery="relocate">
                        <ip ref="192.168.18.111"/>
                        <clusterfs ref="my-gfs"/>
                        <script ref="http"/>
                </service>
        </rm>
</cluster>

誰能幫忙解釋一下
<quorumd device="/dev/sdb5" interval="1" label="myqdisk2" min_score="1" tko="10" votes="1">
                <heuristic interval="1" program="ping -c1 -t1 192.168.18.1" score="1"/>
        </quorumd>
這裡邊參數的意思,我不明白這些參數的作用。

另外,我沒有配置fence,用的是qdisk,但在實際測試的時候,如果把master上ifdown eth0,那master馬上會沒有任何反應,但不會自己重啟,在slave上clustat -i 1發現slave沒有變成master,原來的master現在還是 master,必須手動將master重啟,master啟動完成之後slave才會變成master

但用iptables -A OUTPUT -d 192.168.18.1 -j REJECT這樣的方法,master馬上就會重啟!!!slave也不會馬上變成master,必須等master重啟完成後,slave才會變

成master!!!

為什麼會這樣呢?是我的配置有問題嗎?我想在master上ifdown eth0之後,slave應該馬上就接管服務,但情況不是這樣。如圖
《解決方案》

頂起來
《解決方案》

我覺得紅帽是必須fence,而且還不能是直接用IP地址來作,用硬體的就正常,比如ilo, perc, rsa, ups等等
《解決方案》

<quorumd device="/dev/sdb5" interval="1" label="myqdisk2" min_score="1" tko="10" votes="1">
                <heuristic interval="1" program="ping -c1 -t1 192.168.18.1" score="1"/>
        </quorumd>

tko=10, if "ping -c1 -t1 192.168.18.1" failed 10 times, declare node  failure.

if you shutdown eth0,  try "ping -c1 -t1 192.168.18.1" manually, how long does it take to complete the command?

[火星人 ] redhat集群問題已經有572次圍觀

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