1. node test1 \
  2. attributes standby="off"
  3. node test2 \
  4. attributes standby="off"
  5. primitive p_drbd_mysql ocf:linbit:drbd \
  6. params drbd_resource="mysql" \
  7. op start interval="0" timeout="90s" \
  8. op stop interval="0" timeout="180s" \
  9. op promote interval="0" timeout="180s" \
  10. op demote interval="0" timeout="180s" \
  11. op monitor interval="30s" role="Slave" \
  12. op monitor interval="29s" role="Master"
  13. primitive p_fs_mysql ocf:heartbeat:Filesystem \
  14. params device="/dev/drbd/by-res/mysql" directory="/var/lib/mysql" fstype="xfs" options="relatime" \
  15. op start interval="0" timeout="60s" \
  16. op stop interval="0" timeout="180s" \
  17. op monitor interval="60s" timeout="60s"
  18. primitive p_ip_mysql ocf:heartbeat:IPaddr2 \
  19. params ip="10.21.1.1" cidr_netmask="16" \
  20. op monitor interval="30s"
  21. primitive p_mysql ocf:heartbeat:mysql \
  22. params additional_parameters="--bind-address=10.21.1.1" config="/etc/mysql/my.cnf" pid="/var/run/mysqld/mysqld.pid" socket="/var/run/mysqld/mysqld.sock" log="/var/log/mysql/mysqld.log" \
  23. op monitor interval="20s" timeout="10s" \
  24. op start interval="0" timeout="120s" \
  25. op stop interval="0" timeout="120s"
  26. group g_mysql p_ip_mysql p_fs_mysql p_mysql \
  27. meta target-role="Started" is-managed="true"
  28. location cli-prefer-g_mysql g_mysql \
  29. rule $id="cli-prefer-rule-g_mysql" inf: #uname eq test2
  30. colocation c_mysql_on_drbd inf: g_mysql ms_drbd_mysql:Master
  31. order o_drbd_before_mysql inf: ms_drbd_mysql:promote g_mysql:start
  32. property $id="cib-bootstrap-options" \
  33. dc-version="1.1.6-9971ebba4494012a93c03b40a2c58ec0eb60f50c" \
  34. cluster-infrastructure="openais" \
  35. expected-quorum-votes="2" \
  36. no-quorum-policy="ignore" \
  37. pe-warn-series-max="1000" \
  38. pe-input-series-max="1000" \
  39. pe-error-series-max="1000" \
  40. cluster-recheck-interval="5min" \
  41. stonith-enabled="false" \
  42. last-lrm-refresh="1362760143"
Comments powered by Disqus