Friday, May 07, 2010

heartbeat , drbd 切換節點前注意事項

heartbeat , drbd 在切換節點前注意事項
因為如果不能成功讓 secondary 接手就喪失 heartbeat 的意義
環境: node01 為 primary, node02 為 secondary

若 linux kernel 升級 下次用新的 kernel 開機時 drbd module 會失效
原因是 drbd 是 kernel 編譯的模組 若有和開機相對應的模組

所以 linux kernel 升級 -> 重新開機 -> apt-get remove drbd8-source drbd8-utils –> apt-get install drbd8-source drbd8-utils

2. 關掉 primary 時 請在 secondary 接手的機器做以下確認動作 ,

a. 檢查 /proc/drbd , 如果如下未 sync 完畢 請等待 sync 完畢 (通常是關機一段時間, 有大量的資料待 sync)

drbd driver loaded OK; device status:
version: 8.3.3 (api:88/proto:86-91)
GIT-hash: 49bfeeaf3690ad0b9afd5376feda9e9eb34a30f3 build by nobody@node02, 2010-05-07 10:45:39
m:res cs ro ds p mounted fstype
… sync'ed: 12.2% (4352/4952)M
0:r0 SyncTarget Secondary/Primary Inconsistent/UpToDate C
root@node02:~# more /root/drbd.status
version: 8.3.3 (api:88/proto:86-91)
GIT-hash: 49bfeeaf3690ad0b9afd5376feda9e9eb34a30f3 build by nobody@node02, 2010-04-29 01:22:52
0: cs:SyncSource ro:Primary/Secondary ds:UpToDate/Inconsistent C r—-
ns:9358320 nr:8306688 dw:19144016 dr:20373293 al:36175 bm:35703 lo:0 pe:298 ua:0 ap:0 ep:1 wo:b oos:162604
[===========>........] sync'ed: 64.9% (162604/454208)K
finish: 0:01:41 speed: 1,436 (9,112) K/sec

b. 確認 heartbeat, drbd service

heartbeat
/etc/init.d/heartbeat status
heartbeat OK [pid 1590 et al] is running on node02 [node02]…

drbd
root@node02:~# /etc/init.d/drbd status
drbd driver loaded OK; device status:
version: 8.3.3 (api:88/proto:86-91)
GIT-hash: 49bfeeaf3690ad0b9afd5376feda9e9eb34a30f3 build by nobody@node2, 2010-05-07 10:45:39
m:res cs ro ds p mounted fstype
0:r0 Connected Secondary/Primary UpToDate/UpToDate C

No comments:

Post a Comment