drbd腦裂徹底解決
發現由於啟動順序錯誤(透過snapshot恢復功能)。好像造成mysql伺服器用的drbd裝置的腦裂。
在選定的非主節點上執行
drbdadm secondary mysql
drbdadm -- --discard-my-data connect mysql
主節點上執行
drbdadm connect mysql
總是不成功
發現兩臺機器確實進行過連線,但是不能正確的決定關係。
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: Handshake successful: Agreed network protocol version 101
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: Agreed to support TRIM on protocol level
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: conn( WFConnection -> WFReportParams )
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: Starting asender thread (from drbd_r_mysql [30139])
Mar 26 09:58:42 hacontroller2 kernel: block drbd0: drbd_sync_handshake:
Mar 26 09:58:42 hacontroller2 kernel: block drbd0: self 5C25C478F3ACE6BE:28E2D98C86D01F89:076A48FD642993B9:076948FD642993B9 bits:75 flags:0
Mar 26 09:58:42 hacontroller2 kernel: block drbd0: peer C596BFE91962551F:076948FD642993B8 F5C06A38B650A2D4:F5BF6A38B650A2D5 bits:4985 flags:0
Mar 26 09:58:42 hacontroller2 kernel: block drbd0: uuid_compare()=-1000 by rule 100 Mar 26 09:58:42 hacontroller2 kernel: block drbd0: Unrelated data, aborting!
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: conn( WFReportParams -> Disconnecting )
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: error receiving ReportState, e: -5 l: 0!
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: asender terminated
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: Terminating drbd_a_mysql
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: Connection closed
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: conn( Disconnecting -> StandAlone )
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: receiver terminated
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: Terminating drbd_r_mysql
察看上面紅字。
最後透過以下方法進行解決。
在secondary接點重新初始化資料。
drbdadm detach mysql
dd if=/dev/zero bs=1M count=100 of=/dev/sdb1
drbdadm down mysql
drbdadm create-md mysql
在主節點上執行
drbdadm connect mysql
後發現開始同步。
[root@hacontroller1 python]# cat /proc/drbd
version: 8.4.4 (api:1/proto:86-101)
GIT-hash: 599f286440bd633d15d5ff985204aff4bccffadd build by phil@Build64R6, 2013-10-14 15:33:06
0: cs:SyncSource ro:Primary/Secondary ds:UpToDate/Inconsistent C r-----
ns:195604 nr:0 dw:784 dr:206856 al:6 bm:11 lo:0 pe:3 ua:0 ap:0 ep:1 wo:f oos:10287976
[>....................] sync'ed: 2.0% (10044/10236)M
finish: 0:17:08 speed: 9,988 (8,820) K/sec
1: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C r-----
ns:484 nr:8 dw:492 dr:841 al:4 bm:1 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0
在選定的非主節點上執行
drbdadm secondary mysql
drbdadm -- --discard-my-data connect mysql
主節點上執行
drbdadm connect mysql
總是不成功
發現兩臺機器確實進行過連線,但是不能正確的決定關係。
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: Handshake successful: Agreed network protocol version 101
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: Agreed to support TRIM on protocol level
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: conn( WFConnection -> WFReportParams )
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: Starting asender thread (from drbd_r_mysql [30139])
Mar 26 09:58:42 hacontroller2 kernel: block drbd0: drbd_sync_handshake:
Mar 26 09:58:42 hacontroller2 kernel: block drbd0: self 5C25C478F3ACE6BE:28E2D98C86D01F89:076A48FD642993B9:076948FD642993B9 bits:75 flags:0
Mar 26 09:58:42 hacontroller2 kernel: block drbd0: peer C596BFE91962551F:076948FD642993B8 F5C06A38B650A2D4:F5BF6A38B650A2D5 bits:4985 flags:0
Mar 26 09:58:42 hacontroller2 kernel: block drbd0: uuid_compare()=-1000 by rule 100 Mar 26 09:58:42 hacontroller2 kernel: block drbd0: Unrelated data, aborting!
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: conn( WFReportParams -> Disconnecting )
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: error receiving ReportState, e: -5 l: 0!
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: asender terminated
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: Terminating drbd_a_mysql
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: Connection closed
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: conn( Disconnecting -> StandAlone )
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: receiver terminated
Mar 26 09:58:42 hacontroller2 kernel: drbd mysql: Terminating drbd_r_mysql
察看上面紅字。
最後透過以下方法進行解決。
在secondary接點重新初始化資料。
drbdadm detach mysql
dd if=/dev/zero bs=1M count=100 of=/dev/sdb1
drbdadm down mysql
drbdadm create-md mysql
在主節點上執行
drbdadm connect mysql
後發現開始同步。
[root@hacontroller1 python]# cat /proc/drbd
version: 8.4.4 (api:1/proto:86-101)
GIT-hash: 599f286440bd633d15d5ff985204aff4bccffadd build by phil@Build64R6, 2013-10-14 15:33:06
0: cs:SyncSource ro:Primary/Secondary ds:UpToDate/Inconsistent C r-----
ns:195604 nr:0 dw:784 dr:206856 al:6 bm:11 lo:0 pe:3 ua:0 ap:0 ep:1 wo:f oos:10287976
[>....................] sync'ed: 2.0% (10044/10236)M
finish: 0:17:08 speed: 9,988 (8,820) K/sec
1: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C r-----
ns:484 nr:8 dw:492 dr:841 al:4 bm:1 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/18455/viewspace-1129709/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- HA腦裂問題解決方案
- 徹底解決Oracle中文亂碼Oracle
- 徹底解決程式亂碼問題
- HA叢集中的腦裂問題解決方案
- 徹底解決Python編碼問題Python
- 徹底解決Hive小檔案問題Hive
- Tomcat下中文的徹底解決(轉)Tomcat
- 徹底解決Linux下mongodb的安裝LinuxMongoDB
- 解決drbd不能啟動問題(Can not load the drbd module.)
- 如何徹底解決pip install慢的問題
- win10如何徹底解決彈窗廣告 win10阻止電腦彈窗廣告Win10
- 徹底解決SpringBoot 介面404異常響應~Spring Boot
- 徹底解決windows標題欄字型變小問題Windows
- Oracle RAC叢集腦裂split-brain概述及解決辦法OracleAI
- 腦裂是什麼?Zookeeper是如何解決的?
- 九種 “姿勢” 讓你徹底解決跨域問題跨域
- Android 效能優化 - 徹底解決記憶體洩漏Android優化記憶體
- Android 效能優化 - 徹底解決記憶體抖動Android優化記憶體
- 利用WebBrowser徹底解決Web列印問題(包括後臺列印)Web
- RAC腦裂的理解
- slub機制徹底圖解分析圖解
- 一次弄懂Event Loop(徹底解決此類面試問題)OOP面試
- 透過 Pulsar 原始碼徹底解決重複消費問題原始碼
- 徹底解決docker build時安裝軟體失敗問題DockerUI
- 徹底解決rman恢復碰到ora-01152錯
- bang 的論壇也沒徹底解決中文搜尋問題
- 徹底搞懂徹底搞懂事件驅動模型 - Reactor事件模型React
- 徹底理解synchronizedsynchronized
- 徹底搞懂 RxJavaRxJava
- 徹底解決關於CSocket類的Receive超時的問題(轉)
- 16.徹底解決Jmap在mac版本無法使用的問題Mac
- 徹底解決SLF4J的日誌衝突的問題
- Sun.com.cn的Java中文問題也沒有徹底解決:Java
- 圖解|這次,徹底理解MySQL的索引圖解MySql索引
- win10系統如何將檔案徹底刪除 win10電腦徹底刪除檔案的方法Win10
- 電腦怎麼找回徹底刪除的檔案?年度方法
- 檔案從電腦中徹底刪除怎麼恢復
- 使用Seata徹底解決Spring Cloud中的分散式事務問題!SpringCloud分散式