wgseligman

/etc/drbd.d/admin.res 20130103

Jan 3rd, 2013
336
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. resource admin {
  2.  
  3. protocol C;
  4.  
  5. on hypatia.nevis.columbia.edu {
  6. device /dev/drbd0;
  7. disk /dev/md2;
  8. flexible-meta-disk internal;
  9. address 192.168.100.7:7788;
  10. }
  11. on orestes.nevis.columbia.edu {
  12. device /dev/drbd0;
  13. disk /dev/md2;
  14. flexible-meta-disk internal;
  15. address 192.168.100.6:7788;
  16. }
  17.  
  18. startup {
  19. }
  20.  
  21. net {
  22. allow-two-primaries yes;
  23. # The following three commands tell DRBD how to react should
  24. # more about these options by reading the drbd.conf man page.
  25. # NOTE! It is not possible to safely recover from a split brain
  26. # where both nodes were primary. This care requires human
  27. # intervention, so 'disconnect' is the only safe policy.
  28. after-sb-0pri discard-zero-changes;
  29. after-sb-1pri discard-secondary;
  30. after-sb-2pri disconnect;
  31.  
  32. # Allow DRBD to auto-tune this parameter.
  33. sndbuf-size 0;
  34. }
  35.  
  36. disk {
  37. resync-rate 100M;
  38. c-max-rate 100M;
  39. al-extents 3389;
  40.  
  41. # 01-Sep-2011 WGS: Let's use resource-level fencing in coordination with
  42. # corosync <http://www.drbd.org/users-guide/s-pacemaker-fencing.html>
  43. fencing resource-and-stonith;
  44. }
  45.  
  46. handlers {
  47. 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";
  48. 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";
  49. local-io-error "/usr/lib/drbd/notify-io-error.sh; /usr/lib/drbd/notify-emergency-shutdown.sh; echo o > /proc/sysrq-trigger ; halt -f";
  50.  
  51. # If the two disks fall out of sync due to a network interruption,
  52. # and the automatic recovery options given above don't solve the
  53. # problem, notify the systems administrator.
  54. split-brain "/usr/lib/drbd/notify-split-brain.sh sysadmin@nevis.columbia.edu";
  55.  
  56. # 01-Sep-2011 WGS: Let's use resource-level fencing in coordination with
  57. # corosync <http://www.drbd.org/users-guide/s-pacemaker-fencing.html>
  58. fence-peer "/home/bin/stonith_admin-fence-peer.sh";
  59. #fence-peer "/home/bin/rhcs_fence";
  60. #fence-peer "/home/bin/obliterate-peer.sh";
  61. #fence-peer "/usr/lib/drbd/crm-fence-peer.sh";
  62. #after-resync-target "/usr/lib/drbd/crm-unfence-peer.sh";
  63. }
  64. }
RAW Paste Data