DRBD environment, a brain crack solution

Source: Internet
Author: User

Environment:
Primary node: Node1
Secondary node: Node2

Causes of brain fissure in DRBD:
(1. When the HA environment is used, the automatic switch causes the brain fissure;
(2) Human operation or configuration error, resulting in brain fissure;
(3. Experience is limited, ashamed of it, only to encounter the cause of brain fissure in the above 2.

How to judge the brain crack behavior?
(1. The connection state of one of the nodes is always StandAlone
(2. The connection state of one of the nodes is always wfconnection

1. View by CAT/PROC/DRBD command, secondary node display unknown [brain fissure]

[Email protected] ~]# CAT/PROC/DRBD version:8.4.4 (api:1/proto:86-101) Git-hash: 74402fecf24da8e5438171ee8c19e28627e1c98a build by [email protected], 2015-08-07 11:47:47 0:cs:standalone ro:primary/ Unknown ds:UpToDate/Outdated   r----s    ns:0 nr:0 dw:48214 dr:1725 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:104392

--DRBD the solution to the brain fissure

--primary node

2. If the primary node is viewing a connection status of StandAlone, you need to manually connect the Execute command: Drbdadm connect r0

[[email protected] ~]# Drbdadm connect r0[[email protected] ~]# CAT/PROC/DRBD version:8.4.4 (api:1/proto:86-101) git-h ash:74402fecf24da8e5438171ee8c19e28627e1c98a build by [email protected], 2015-08-07 11:47:47 0:cs:wfconnection ro: Primary/Unknown ds:UpToDate/Outdated C r----s    ns:0 nr:0 dw:48214 dr:1725 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:10 4392

--secondary node operation

1. Disconnect the connection

[Email protected] ~]# Drbdadm disconnect R0

2. Set to secondary status

[Email protected] ~]# Drbdadm secondary r0

3. Tell Slave,secondary that the data on the primary is incorrect, whichever is the data on the

[Email protected] ~]# drbdadm--discard-my-data connect r0

--primary node

1. View by CAT/PROC/DRBD command

 [[email protected] ~]# cat /proc/drbd    version: 8.4.4   (api:1/proto:86-101) git-hash: 74402fecf24da8e5438171ee8c19e28627e1c98a build by [ Email protected], 2015-08-07 11:47:47 0: cs:syncsource ro:primary/secondary  ds:uptodate/inconsistent c r-----    ns:15016 nr:0 dw:48214  dr:66237 al:0 bm:3 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:39880         [============&gt, ...]  sync ' ed: 65.4%  (39880/104392) k        finish:  0:00:02 speed: 16,128  (16,128)  k/sec[[email protected] ~]# cat /proc/ drbd version: 8.4.4  (api:1/proto:86-101) git-hash: 74402fecf24da8e5438171ee8c19e28627e1c98a  build by [email protected], 2015-08-07  11:47:47 0: cs:connected ro:primary/secondary ds:uptodate/uptodate c r-----     ns:16040 nr:0 dw:48214 dr:106117 al:0 bm:7 lo:0 pe : 0 ua:0 ap:0 ep:1 wo:f oos:0

At this point, the brain crack problem solved successfully.

This article is from the "ˉt, Stand Wentao ┃﹎" blog, please be sure to keep this source http://hypocritical.blog.51cto.com/3388028/1682610

DRBD environment, a brain crack solution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.