Drbd
drbd 無法啟動重新同步
這是我的情況
在兩個節點上
cat /etc/drbd.d/* resource clustervol { device /dev/drbd1; disk /dev/sdb1; meta-disk internal; on iscsi1 { address 192.168.0.30:7790; } on iscsi2 { address 192.168.0.41:7790; } } global { usage-count yes; # minor-count dialog-refresh disable-ip-verification } common { protocol C; handlers { # The following 3 handlers were disabled due to #576511. # Please check the DRBD manual and enable them, if they make sense in your setup. # pri-on-incon-degr "/usr/lib/drbd/notify-pri-on-incon-degr.sh; /usr/lib/drbd/notify-emergency-reboot.sh; echo b > /proc/sysrq-trigger ; reboot -f"; # pri-lost-after-sb "/usr/lib/drbd/notify-pri-lost-after-sb.sh; /usr/lib/drbd/notify-emergency-reboot.sh; echo b > /proc/sysrq-trigger ; reboot -f"; # local-io-error "/usr/lib/drbd/notify-io-error.sh; /usr/lib/drbd/notify-emergency-shutdown.sh; echo o > /proc/sysrq-trigger ; halt -f"; # fence-peer "/usr/lib/drbd/crm-fence-peer.sh"; # split-brain "/usr/lib/drbd/notify-split-brain.sh root"; # out-of-sync "/usr/lib/drbd/notify-out-of-sync.sh root"; # before-resync-target "/usr/lib/drbd/snapshot-resync-target-lvm.sh -p 15 -- -c 16k"; # after-resync-target /usr/lib/drbd/unsnapshot-resync-target-lvm.sh; } startup { # wfc-timeout degr-wfc-timeout outdated-wfc-timeout wait-after-sb } disk { # on-io-error fencing use-bmbv no-disk-barrier no-disk-flushes # no-disk-drain no-md-flushes max-bio-bvecs } net { # sndbuf-size rcvbuf-size timeout connect-int ping-int ping-timeout max-buffers # max-epoch-size ko-count allow-two-primaries cram-hmac-alg shared-secret # after-sb-0pri after-sb-1pri after-sb-2pri data-integrity-alg no-tcp-cork } syncer { # rate after al-extents use-rle cpu-mask verify-alg csums-alg }
}
在 node1 上可以正常工作
version: 8.3.11 (api:88/proto:86-96) srcversion: F937DCB2E5D83C6CCE4A6C9 1: cs:StandAlone ro:Primary/Unknown ds:UpToDate/DUnknown r----s ns:0 nr:0 dw:0 dr:996 al:0 bm:0 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:29359164
在 node2 上沒有
cat /proc/drbd version: 8.3.11 (api:88/proto:86-96) srcversion: F937DCB2E5D83C6CCE4A6C9 1: cs:WFConnection ro:Secondary/Unknown ds:Diskless/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:f oos:0
我嘗試了很多命令:斷開連接,無效,丟棄節點2上的數據,但情況沒有改變是“原始”dbrd配置,我在磁碟上沒有數據如何強制重新同步?謝謝
刪除骯髒且快速的解決方案並重新創建虛擬磁碟(我在 vm 上進行測試)然後在主磁碟上
drbdadm create-md clustervol drbdadm primary --force clustervol drbdadm -- --overwrite-data-of-peer primary clustervol service drbd restart
在中學
drbdadm secondary all service drbd restart