The configuration of the DRBD process occurs with primary/unknown failures, which are finally resolved by the following method.
1, node Status View (1) Master node status
[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) from the node state
[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. Confirm that the data on the master node is the same and resynchronize to the Slave node (1) to stop the APP2 DRBD service
[[Email protected] ~]# service DRBD stop
Stopping all DRBD resources:.
[Email protected] ~]#
(2) reinitialization of meta-data
[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
Does 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.
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) Start the DRBD service
[[email protected] ~]# service DRBD start
Starting DRBD resources: [
&nbs p; Create Res:data ,
prepare disk:data
Adjust disk : Data
adjust net:data
]
... &N Bsp
***************************************************************
DRBD ' s startup script waits for The peer node (s) to appear.
-In case this node is already a degraded cluster before the
reboot the T Imeout is 0 seconds. [Degr-wfc-timeout]
-If The peer was available before the reboot the timeout would
; expire after 0 seconds. [Wfc-timeout]
(These values is 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 primary Node (1) The primary node is in a normal state.
[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) After restarting DRBD, the data is resynchronized to the slave node
[[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
[A]. ..... ......... 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] ~]#
This article is from the "Koumm Linux Technology blog" blog, be sure to keep this source http://koumm.blog.51cto.com/703525/1769112
Remember the DRBD unknown fault handling process