基于Corosync+Pacemaker+DRBD+LNMP实现Web服务器高可用集(3)

 

1 cd /usr/local/drbd/etc/drbd.d/ 2 vim global_common.conf 3 -------------------------------------- 4 global { 5 usage-count no; 6 # minor-count dialog-refresh disable-ip-verification 7 } 8 9 common { 10 protocol C; 11 12 handlers { 13 # These are EXAMPLE handlers only. 14 # They may have severe implications, 15 # like hard resetting the node under certain circumstances. 16 # Be careful when chosing your poison. 17 18 # pri-on-incon-degr "/usr/lib/drbd/notify-pri-on-incon-degr.sh; /usr/lib/drbd/notify-emergency-reboot.sh; echo b > /p 19 roc/sysrq-trigger ; reboot -f"; 20 # pri-lost-after-sb "/usr/lib/drbd/notify-pri-lost-after-sb.sh; /usr/lib/drbd/notify-emergency-reboot.sh; echo b > /p 21 roc/sysrq-trigger ; reboot -f"; 22 # local-io-error "/usr/lib/drbd/notify-io-error.sh; /usr/lib/drbd/notify-emergency-shutdown.sh; echo o > /proc/sysrq- 23 trigger ; halt -f"; 24 # fence-peer "/usr/lib/drbd/crm-fence-peer.sh"; 25 # split-brain "/usr/lib/drbd/notify-split-brain.sh root"; 26 # out-of-sync "/usr/lib/drbd/notify-out-of-sync.sh root"; 27 # before-resync-target "/usr/lib/drbd/snapshot-resync-target-lvm.sh -p 15 -- -c 16k"; 28 # after-resync-target /usr/lib/drbd/unsnapshot-resync-target-lvm.sh; 29 } 30 31 startup { 32 # wfc-timeout degr-wfc-timeout outdated-wfc-timeout wait-after-sb 33 } 34 35 options { 36 # cpu-mask on-no-data-accessible 37 } 38 39 disk { 40 #on-io-error detach; 41 # size max-bio-bvecs on-io-error fencing disk-barrier disk-flushes 42 # disk-drain md-flushes resync-rate resync-after al-extents 43 # c-plan-ahead c-delay-target c-fill-target c-max-rate 44 # c-min-rate disk-timeout 45 } 46 net { 47 #cram-hmac-alg "sha1"; 48 #shared-secret "mydrbd"; 49 # protocol timeout max-epoch-size max-buffers unplug-watermark 50 # connect-int ping-int sndbuf-size rcvbuf-size ko-count 51 # allow-two-primaries cram-hmac-alg shared-secret after-sb-0pri 52 # after-sb-1pri after-sb-2pri always-asbp rr-conflict 53 # ping-timeout data-integrity-alg tcp-cork on-congestion 54 # congestion-fill congestion-extents csums-alg verify-alg 55 # use-rle 56 } 57 }

  5.定义一个资源,web是资源名,可以自己改:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/6d7d2f397db2f5cf5f79b135beae5709.html