HeartBeat2+DRBD構築 【DRBD障害対応】
DRBDにおいて、スプリットブレインが発生した場合の障害対応を説明します。DRBDのスプリットブレインを確認
■障害側サーバでスプリットブレインを確認# cat /proc/drbd version: 8.3.8 (api:88/proto:86-94) GIT-hash: d78846e52224fd00562f7c225bcc25b2d422321d build by mockbuild@builder10.centos.org, 2010-06-04 08:04:09 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:b oos:516
# cat /var/log/messages May 18 13:03:46 dev-db02 kernel: block drbd0: Split-Brain detected but unresolved, dropping connection!
# cat /proc/drbd version: 8.3.8 (api:88/proto:86-94) GIT-hash: d78846e52224fd00562f7c225bcc25b2d422321d build by mockbuild@builder10.centos.org, 2010-06-04 08:04:09 0: cs:StandAlone ro:Primary/Unknown ds:UpToDate/DUnknown r---- ns:0 nr:0 dw:1110652 dr:4109 al:52 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:132684
DRBDのスプリットブレインから復旧する手順
■スプリットブレインからの復旧手順(方法1)[db2 ~]# drbdadm down all # drbdadm down all # cat /proc/drbd version: 8.3.8 (api:88/proto:86-94) GIT-hash: d78846e52224fd00562f7c225bcc25b2d422321d build by mockbuild@builder10.centos.org, 2010-06-04 08:04:09 0: cs:Unconfigured
[db2 ~]# drbdadm attach all # drbdadm attach all # cat /proc/drbd version: 8.3.8 (api:88/proto:86-94) GIT-hash: d78846e52224fd00562f7c225bcc25b2d422321d build by mockbuild@builder10.centos.org, 2010-06-04 08:04:09 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:b oos:516
[db2 ~]# drbdadm invalidate all # drbdadm invalidate all # cat /proc/drbd version: 8.3.8 (api:88/proto:86-94) GIT-hash: d78846e52224fd00562f7c225bcc25b2d422321d build by mockbuild@builder10.centos.org, 2010-06-04 08:04:09 0: cs:StandAlone ro:Secondary/Unknown ds:Inconsistent/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:b oos:6152896
[db2 ~]# drbdadm connect all # drbdadm connect all # cat /proc/drbd version: 8.3.8 (api:88/proto:86-94) GIT-hash: d78846e52224fd00562f7c225bcc25b2d422321d build by mockbuild@builder10.centos.org, 2010-06-04 08:04:09 0: cs:WFConnection ro:Secondary/Unknown ds:Inconsistent/DUnknown C r---- ns:0 nr:0 dw:0 dr:0 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:b oos:6152896【正常側サーバ】
[db1 ~]# drbdadm connect all # drbdadm connect all # cat /proc/drbd version: 8.3.8 (api:88/proto:86-94) GIT-hash: d78846e52224fd00562f7c225bcc25b2d422321d build by mockbuild@builder10.centos.org, 2010-06-04 08:04:09 0: cs:SyncSource ro:Primary/Secondary ds:UpToDate/Inconsistent C r---- ns:13420 nr:0 dw:1110652 dr:23181 al:52 bm:0 lo:58 pe:30 ua:234 ap:0 ep:1 wo:b oos:6140416 [>....................] sync'ed: 0.3% (5996/6008)M delay_probe: 0 finish: 0:31:58 speed: 3,120 (3,120) K/sec同期が開始される
PaceMaker+DRBDの運用関連記事
PaceMaker+DRBDの実践運用手順HeartBeat2+DRBD構築【目次】
01. HeartBeat2+DRBD構築 【DRBD構築手順】