<div dir="ltr">Hi Brandon,<br><div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 16, 2016 at 5:17 PM, Brandon Chapman <span dir="ltr"><<a href="mailto:webeindustry@gmail.com" target="_blank">webeindustry@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hello.<br><br>I am trying to integrate MySQL into my cluster currently setup with drbd8.4.5 on ubuntu16.04.1LTS.<br>I have mostly followed this guide here:<br><br><a href="http://www.tokiwinter.com/clustering-with-drbd-corosync-and-pacemaker/" target="_blank">http://www.tokiwinter.com/<wbr>clustering-with-drbd-corosync-<wbr>and-pacemaker/</a><br><br>Adapting for my environment, mainly that I am not running centos.<br>I have successfully configured the resources and user agents listed in this guide, but need to add MySQL HA as well.<br><br>This is a current result of crm configure show:<br><br>node 1: alpha \<br> attributes standby=off<br>node 2: beta \<br> attributes standby=on<br>primitive drbd_res ocf:linbit:drbd \<br> params drbd_resource=r0 \<br> op monitor interval=29s role=Master \<br> op monitor interval=31s role=Slave<br>primitive failover_ip IPaddr2 \<br> params ip=76.213.77.43 cidr_netmask=24 \<br> op monitor interval=30s<br>primitive fs_res Filesystem \<br> params device="/dev/drbd0" directory="/data" fstype=ext4<br>primitive nginx_res nginx \<br> params configfile="/etc/nginx/nginx.<wbr>conf" httpd="/usr/sbin/nginx" \<br> op monitor interval=0<br>ms drbd_master_slave drbd_res \<br> meta master-max=1 master-node-max=1 clone-max=2 clone-node-max=1 notify=true<br>order fs_after_drbd Mandatory: drbd_master_slave:promote fs_res:start<br>colocation fs_drbd_colo inf: fs_res drbd_master_slave:Master<br>order nginx_after_fs inf: fs_res nginx_res<br>order nginx_after_ip Mandatory: failover_ip nginx_res<br>colocation nginx_fs_colo inf: nginx_res fs_res<br>colocation nginx_ip_colo inf: nginx_res failover_ip<br>property cib-bootstrap-options: \<br> have-watchdog=false \<br> dc-version=1.1.14-70404b0 \<br> cluster-infrastructure=<wbr>corosync \<br> cluster-name=debian \<br> stonith-enabled=false \<br> no-quorum-policy=ignore<br><br>I have taken these steps so far:<br><br><br>$$ apt install mysql-server -y<br>$$ service mysql stop<br>$$ systemctl disable mysql<br>$$ sudo rsync -av /var/lib/mysql /data<br>$$ nano /etc/mysql/mysql.conf.d/<wbr>mysqld.cnf<br><br>socket = /data/mysql/mysqld.sock<br>datadir = /data/mysql<br><br>$$ echo "alias /var/lib/mysql/ -> /data/mysql/," >> /etc/apparmor.d/tunables/alias<br>$$ service apparmor reload<br>$$ crm configure primitive mysql_res ocf:heartbeat:mysql params binary="/usr/sbin/mysqld" datadir="/data/mysql" socket="/data/mysql/mysqld.<wbr>sock" op start timeout=60s op stop timeout=60s op monitor interval=15s<br>$$ crm configure colocation mysql_ip_colo INFINITY: mysql_res failover_ip<div>$$ crm configure order mysql_after_ip mandatory: failover_ip mysql_res</div><div><br></div><div>This results in an initial start on the online node, but it attempts to start on standby as well. If I 'crm node standby' to the onine node, it will not start on the other node. </div><div><br></div><div>Shows errors after bringing both nodes to standby, then bringing back online:</div><div><br></div><div><a href="https://i.imgur.com/kOmXGMn.png" target="_blank">https://i.imgur.com/kOmXGMn.<wbr>png</a><br></div><div><br></div><div>How can I go about solving this?</div></div>
<br>______________________________<wbr>_________________<br>
drbd-user mailing list<br>
<a href="mailto:drbd-user@lists.linbit.com">drbd-user@lists.linbit.com</a><br>
<a href="http://lists.linbit.com/mailman/listinfo/drbd-user" rel="noreferrer" target="_blank">http://lists.linbit.com/<wbr>mailman/listinfo/drbd-user</a><br>
<br></blockquote></div>Any errors in the syslog at all?<br><br>Did you test if you can start MySQL manually as configured atm? Rule of thumb, ALWAYS confirm the service can be started manually first before you go with the cluster.<br><br>The "not installed" error suggests using a wrong RA parameter or error in the OCF agent script itself. So, first check if you have all parameters correctly stated in the crm configure commands:<br><br># crm ra meta ocf:heartbeat:mysql<br><br></div><div class="gmail_extra">then run the agent manually and check for errors in the ouptu of the ocf-tester:<br></div><div class="gmail_extra"><br clear="all"># ocf-tester -v -n mysql_res -o OCF_ROOT=/usr/lib/ocf -o binary="/usr/sbin/mysqld" -o datadir="/data/mysql" -o socket="/data/mysql/mysqld.<wbr>sock" /usr/lib/ocf/resource.d/heartbeat/mysql<br><br></div><div class="gmail_extra">Cheers,<br></div><div class="gmail_extra">Igor<br></div></div></div>