Advertisement
amartin

storage pacemaker config

Nov 1st, 2012
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.37 KB | None | 0 0
  1. node $id="16777343" localhost
  2. node $id="2483106826" storage0
  3. node $id="2499884042" storage1
  4. node $id="402732042" storagequorum \
  5. attributes standby="on"
  6. primitive p_daemon_nfs-kernel-server lsb:nfs-kernel-server \
  7. op monitor interval="30s"
  8. primitive p_daemon_nmbd upstart:nmbd \
  9. op monitor interval="30s"
  10. primitive p_daemon_smbd upstart:smbd \
  11. op monitor interval="30s" \
  12. meta target-role="Started"
  13. primitive p_drbd_drives ocf:linbit:drbd \
  14. params drbd_resource="drives" \
  15. op start interval="0" timeout="240" \
  16. op stop interval="0" timeout="100" \
  17. op monitor interval="10" role="Master" timeout="30" \
  18. op monitor interval="20" role="Slave" timeout="30"
  19. primitive p_exportfs_storage ocf:heartbeat:exportfs \
  20. params fsid="1" directory="/mnt/storage" options="rw,no_root_squash,no_all_squash,sync,no_subtree_check" clientspec="10.0.0.0/255.0.0.0" wait_for_leasetime_on_stop="false" \
  21. op start interval="0" timeout="40s" \
  22. op monitor interval="30s" \
  23. meta target-role="Started"
  24. primitive p_fs_bind_opt ocf:heartbeat:Filesystem \
  25. params device="/mnt/storage/opt" directory="/opt" fstype="none" options="bind" \
  26. op start interval="0" timeout="60" \
  27. op stop interval="0" timeout="60" \
  28. op monitor interval="20" timeout="40"
  29. primitive p_fs_drives ocf:heartbeat:Filesystem \
  30. params device="/dev/drbd0" directory="/mnt/storage" fstype="ext4" options="noatime" \
  31. op start interval="0" timeout="60" \
  32. op stop interval="0" timeout="60" \
  33. op monitor interval="20" timeout="40"
  34. primitive p_ip_drives0 ocf:heartbeat:IPaddr2 \
  35. params ip="10.xxx.xxx.xxx" cidr_netmask="16" nic="eth3" \
  36. op monitor interval="30s"
  37. primitive p_ip_drives1 ocf:heartbeat:IPaddr2 \
  38. params ip="10.xxx.xxx.xxx" cidr_netmask="16" nic="eth3" \
  39. op monitor interval="30s"
  40. primitive p_ip_drives2 ocf:heartbeat:IPaddr2 \
  41. params ip="10.xxx.xxx.xxx" cidr_netmask="16" nic="eth3" \
  42. op monitor interval="30s"
  43. primitive p_ip_drives3 ocf:heartbeat:IPaddr2 \
  44. params ip="10.xxx.xxx.xxx" cidr_netmask="16" nic="eth3" \
  45. op monitor interval="30s"
  46. primitive p_ip_storage ocf:heartbeat:IPaddr2 \
  47. params ip="10.xxx.xxx.xxx" cidr_netmask="16" nic="eth3" \
  48. op monitor interval="30s"
  49. primitive p_ping ocf:pacemaker:ping \
  50. params name="p_ping" host_list="10.xxx.xxx.xxx 10.xxx.xxx.xxx" dampen="25s" multiplier="1000" \
  51. op start interval="0" timeout="60" \
  52. op monitor interval="10s" timeout="60"
  53. primitive p_sysadmin_notify ocf:heartbeat:MailTo \
  54. params email="me@example.com" \
  55. params subject="Storage Pacemaker Change" \
  56. op start interval="0" timeout="10" \
  57. op stop interval="0" timeout="10" \
  58. op monitor interval="10" timeout="20"
  59. primitive stonithstorage0 stonith:external/webpowerswitch \
  60. ...
  61. primitive stonithstorage1 stonith:external/webpowerswitch \
  62. ...
  63. primitive stonithstoragequorum stonith:external/webpowerswitch \
  64. ...
  65. group g_store p_fs_drives p_fs_bind_opt p_exportfs_storage p_daemon_smbd p_daemon_nmbd p_ip_storage p_ip_drives0 p_ip_drives1 p_ip_drives2 p_ip_drives3
  66. ms ms_drbd_drives p_drbd_drives \
  67. meta master-max="1" master-node-max="1" clone-max="2" clone-node-max="1" notify="true"
  68. clone cl_daemon_nfs-kernel-server p_daemon_nfs-kernel-server
  69. clone cl_ping p_ping \
  70. meta interleave="true"
  71. clone cl_sysadmin_notify p_sysadmin_notify
  72. location drbd-fence-by-handler-ms_drbd_drives ms_drbd_drives \
  73. rule $id="drbd-fence-by-handler-rule-ms_drbd_drives" $role="Master" -inf: #uname ne storage0
  74. location loc_run_on_most_connected g_store \
  75. rule $id="loc_run_on_most_connected-rule" -inf: not_defined p_ping or p_ping lte 0
  76. location loc_st_storage0 stonithstorage0 -inf: storage0
  77. location loc_st_storage1 stonithstorage1 -inf: storage1
  78. location loc_st_storagequorum stonithstoragequorum -inf: storagequorum
  79. colocation c_drbd_fs_services inf: g_store ms_drbd_drives:Master
  80. order o_drbd_fs_services inf: ms_drbd_drives:promote g_store:start
  81. property $id="cib-bootstrap-options" \
  82. dc-version="1.1.8-1f8858c" \
  83. cluster-infrastructure="corosync" \
  84. stonith-enabled="true" \
  85. no-quorum-policy="freeze" \
  86. last-lrm-refresh="1351654492"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement