新聞中心

        EEPW首頁 > 嵌入式系統 > 設計應用 > 多路徑環境下RHCS和GFS的timeout配置

        多路徑環境下RHCS和GFS的timeout配置

        作者: 時間:2016-10-10 來源:網絡 收藏

        適用環境:Cluster or on RHEL4 and later

        本文引用地址:http://www.104case.com/article/201610/306016.htm

        故障現象:日志報錯

        openais[3345]: [CMAN ] lost contact with quorum device

        目前只要客戶有共享存儲,在部署Cluster和的時候,都建議配置quorum disk。而上面這個報錯相信大家都不會陌生吧。這個問題一般是因為qdisk進程太長時間沒有與cman/ais通信,超過了qdisk的poll投票時間,從而此節點被斷開。特別是在配置了multipath、rdac等多路徑軟件環境中做鏈路失效切換測試時,由于failover的時間可能比較長,造成鏈路切換之前qdisk就已經丟失了,節點直接被reboot,而這當然不是我們所期待的結果。那怎么解決這個問題呢?

        先來了解幾個基本概念:

        ① 集群要認為一個節點健康,需要以下3要素

        · CMAN認為該節點online

        · 該節點能足夠連續的讀寫quorum disk

        · 該節點heuristic有足夠的score

        ② qdisk包括兩個主要線程:主線程負責循環和進行I/O操作;第二線程負責heuristic相關。

        主線程另一個工作就是每隔一段時間告訴cman/ais自己還活著。如果qdisk超過quorum_dev_poll的時間而沒有和cman/ais通信,cman就會聲明說此節點與quorum disk斷開連接,此時日志便會有如上報錯。默認的cman.h里

        #define DEFAULT_QUORUMDEV_POLL 10000

        單位是ms,即10秒。修改quorum_dev_poll需要在cluster.conf文件里修改cman標簽:

        cman quorum_dev_poll=50000>/cman>

        ③我們平時指的qdisk 是指連續一段時間對quorum disk的讀寫都是失敗。假如cluster.conf里

        quorumd device=/dev/sdb1 interval=3 min_score=2 tko=13 votes=2>

        其中

        interval=3

        This is the frequency of read/write cycles, in seconds.讀寫quorum disk的頻率

        tko=13

        This is the number of cycles a node must miss in order to be declared dead.連續失敗多少次則判定此節點死掉

        qdisk_ = interval x tko

        ④再來看看RHEL5里cman 是怎么去配置的,

        token

        This timeout specifies in milliseconds until a token loss is declared after not receiving a token. This is the time spent detecting a failure of a processor in the current configuration. Reforming a new configuration takes about 50 milliseconds in addition to this timeout. The default is 1000 milliseconds. 連續多長時間沒有收到token就判定令牌丟失。默認1秒,其中有50ms是生成一個新的配置的時間。

        retransmits_before_loss

        This value identifies how many token retransmits should be attempted before forming a new configuration. If this value is set, retransmit and hold will be automati- cally calculated from retransmits_before_loss and token. The default is 4 retransmissions. 連續丟失幾次token,才會生成新的cluster配置(將丟失token的節點踢出集群)。默認4次。

        token_retransmit

        This timeout specifies in milliseconds after how long before receiving a token the token is retransmitted. This will be automatically calculated if token is modi- fied. It is not recommended to alter this value without guidance from the openais community. The default is 238 milliseconds. 重發token的時間間隔,這個值是由上面的token和token_retransmit自動計算的。(1000-50)/4≈238ms

        如果出現上面說的丟失心跳token的時候,日志會出現如下報錯:

        openais[3345]: [TOTEM] The token was lost in the OPERATIONAL state.

        注意單位為毫秒。另外,也可以修改cman的標簽:

        注:RHEL4并未使用openais的架構,因此只能通過deadnode_timeout來修改。

        好,有了前面的基礎,不難想象到各個timeout值,用T(*)表示,應有如下關系:

        T(MPIO)

        RH官方有如下建議:

        T(qdisk) = T(MPIO) × 1.3

        T(cman) = T(MPIO) × 2.7

        參考文檔:

        Red Hat Knowledgebase

        、man page of

        qdisk(5)

        、

        openais.conf(5)



        評論


        相關推薦

        技術專區

        關閉
        主站蜘蛛池模板: 陆丰市| 罗江县| 佛学| 万源市| 沙河市| 康乐县| 沂源县| 图木舒克市| 东乌珠穆沁旗| 应城市| 黄浦区| 永善县| 隆林| 铜山县| 莱阳市| 遵义县| 汶川县| 从江县| 阜新| 秦安县| 甘谷县| 思南县| 崇仁县| 孟州市| 中牟县| 仙游县| 屯留县| 南和县| 江口县| 灯塔市| 墨竹工卡县| 宜君县| 仙居县| 咸阳市| 清水河县| 北海市| 白银市| 靖江市| 咸宁市| 凌云县| 西宁市|