記一次DRBD Unknown故障處理過程

來源:互聯網
上載者:User

標籤:version

配置drbd過程出現Primary/Unknown 故障,最後通過如下方式解決。

1, 節點狀態查看(1) 主節點狀態

[[email protected] drbd.d]# cat /proc/drbd    
version: 8.4.3 (api:1/proto:86-101)    
GIT-hash: 89a294209144b68adb3ee85a73221f964d3ee515 build by [email protected], 2013-11-29 12:28:00    
0: cs:StandAlone ro:Primary/Unknown ds:UpToDate/DUnknown   r-----    
    ns:0 nr:0 dw:0 dr:672 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:d oos:604    
[[email protected] drbd.d]#

(2) 從節點狀態

[[email protected] ~]# cat /proc/drbd    
version: 8.4.3 (api:1/proto:86-101)    
GIT-hash: 89a294209144b68adb3ee85a73221f964d3ee515 build by [email protected], 2013-11-29 12:28:00    
0: cs:StandAlone ro:Secondary/Unknown ds:UpToDate/DUnknown   r-----    
    ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:d oos:548    
[[email protected] ~]#


2. 這裡確認以主節點的資料為準,重新同步到從節點(1) 停止app2 drbd服務

[[email protected] ~]# service drbd stop  
Stopping all DRBD resources: .    
[[email protected] ~]#

(2) 重新初始化中繼資料

[[email protected] ~]# drbdadm create-md data  
You want me to create a v08 style flexible-size internal meta data block.    
There appears to be a v08 flexible-size internal meta data block    
already in place on /dev/sdb1 at byte offset 5364318208    
Do you really want to overwrite the existing v08 meta-data?    
[need to type ‘yes‘ to confirm] yes

Writing meta data...  
md_offset 5364318208    
al_offset 5364285440    
bm_offset 5364121600

Found ext3 filesystem  
     5238400 kB data area apparently used    
     5238400 kB left usable by current configuration

Even though it looks like this would place the new meta data into  
unused space, you still need to confirm, as this is only a guess.

Do you want to proceed?  
[need to type ‘yes‘ to confirm] yes

initializing activity log  
NOT initializing bitmap    
lk_bdev_save(/var/lib/drbd/drbd-minor-0.lkbd) failed: No such file or directory    
New drbd meta data block successfully created.    
lk_bdev_save(/var/lib/drbd/drbd-minor-0.lkbd) failed: No such file or directory

(3) 啟動drbd服務

[[email protected] ~]# service drbd start  
Starting DRBD resources: [    
     create res: data    
   prepare disk: data    
    adjust disk: data    
     adjust net: data    
]    
..........    
***************************************************************    
DRBD‘s startup script waits for the peer node(s) to appear.    
- In case this node was already a degraded cluster before the    
   reboot the timeout is 0 seconds. [degr-wfc-timeout]    
- If the peer was available before the reboot the timeout will    
   expire after 0 seconds. [wfc-timeout]    
   (These values are for resource ‘data‘; 0 sec -> wait forever)    
To abort waiting enter ‘yes‘ [  15]:se

.  
[[email protected] ~]# cat /proc/drbd   
version: 8.4.3 (api:1/proto:86-101)    
GIT-hash: 89a294209144b68adb3ee85a73221f964d3ee515 build by [email protected], 2013-11-29 12:28:00    
0: cs:Connected ro:Secondary/Primary ds:UpToDate/UpToDate C r-----    
    ns:0 nr:5238400 dw:5238400 dr:0 al:0 bm:320 lo:0 pe:0 ua:0 ap:0 ep:1 wo:d oos:0    
[[email protected] ~]#


3. app1主節點下(1) 主節點狀態正常了

[[email protected] ~]# cat /proc/drbd    
version: 8.4.3 (api:1/proto:86-101)    
GIT-hash: 89a294209144b68adb3ee85a73221f964d3ee515 build by [email protected], 2013-11-29 12:28:00    
0: cs:StandAlone ro:Primary/Unknown ds:UpToDate/DUnknown   r-----    
    ns:0 nr:0 dw:0 dr:672 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:d oos:604


(2) 重啟drbd之後,資料重新同步到從節點

[[email protected] ~]# service drbd reload  
Reloading DRBD configuration: .    
[[email protected] ~]# cat /proc/drbd    
version: 8.4.3 (api:1/proto:86-101)    
GIT-hash: 89a294209144b68adb3ee85a73221f964d3ee515 build by [email protected], 2013-11-29 12:28:00    
0: cs:SyncSource ro:Primary/Secondary ds:UpToDate/Inconsistent C r---n-    
    ns:176816 nr:0 dw:0 dr:180896 al:0 bm:10 lo:4 pe:2 ua:8 ap:0 ep:1 wo:d oos:5063296    
        [>....................] sync‘ed:  3.4% (4944/5112)M    
        finish: 0:00:57 speed: 87,552 (87,552) K/sec    
[[email protected] ~]# cat /proc/drbd    
version: 8.4.3 (api:1/proto:86-101)    
GIT-hash: 89a294209144b68adb3ee85a73221f964d3ee515 build by [email protected], 2013-11-29 12:28:00    
0: cs:SyncSource ro:Primary/Secondary ds:UpToDate/Inconsistent C r---n-    
    ns:3541004 nr:0 dw:0 dr:3545760 al:0 bm:215 lo:2 pe:4 ua:6 ap:0 ep:1 wo:d oos:1700480    
        [============>.......] sync‘ed: 67.6% (1660/5112)M    
        finish: 0:00:23 speed: 71,780 (69,368) K/sec    
[[email protected] ~]# cat /proc/drbd    
version: 8.4.3 (api:1/proto:86-101)    
GIT-hash: 89a294209144b68adb3ee85a73221f964d3ee515 build by [email protected], 2013-11-29 12:28:00    
0: cs:Connected ro:Primary/Secondary ds:UpToDate/UpToDate C r-----    
    ns:5238400 nr:0 dw:0 dr:5239072 al:0 bm:320 lo:0 pe:0 ua:0 ap:0 ep:1 wo:d oos:0    
[[email protected] ~]#

本文出自 “koumm的linux技術部落格” 部落格,請務必保留此出處http://koumm.blog.51cto.com/703525/1769112

記一次DRBD Unknown故障處理過程

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.