<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Thank you very much Mike. I tried but it does not seem to work.
    Would you happen to have a doc somewhere that has example crm
    configure show. Thank you - Joe.<br>
    <br>
    On 10/31/2011 12:48 PM, Michael Marrotte wrote:
    <blockquote
cite="mid:CA+EJDnAW7iggRjeA7GR9JSNm+OdaX5LRvzGZB0M=XNm9VWZBXw@mail.gmail.com"
      type="cite">
      <meta http-equiv="Context-Type" content="text/html;
        charset=ISO-8859-1">
      Joe:<br>
      <br>
      Yes.  There is now support for replication (master/slave):<br>
      <ul>
        <li>See if the installed MySQL RA (Resource Agent) includes
          support for replication (your paths might be different)
          <pre>grep -i 'replication capability' /usr/lib/ocf/resource.d/heartbeat/mysql
#               Marian Marinov, Florian Haas: add replication capability
</pre>
        </li>
        <li>If not (grep's empty), then grab the latest from <a
            moz-do-not-send="true"
            href="https://trac.dechocorp.com/wiki/GitHub">GitHub?</a>:
          <pre>wget <a moz-do-not-send="true" href="https://raw.github.com/ClusterLabs/resource-agents/master/heartbeat/mysql">https://raw.github.com/ClusterLabs/resource-agents/master/heartbeat/mysql</a> 
</pre>
        </li>
      </ul>
      <ul>
        <li>Backup the current MySQL RA, move the new one in place
          (paths might be different):
          <pre>mv /usr/lib/ocf/resource.d/heartbeat/mysql /usr/lib/ocf/resource.d/heartbeat/mysql.backup
mv mysql /usr/lib/ocf/resource.d/heartbeat/mysql
chmod +x /usr/lib/ocf/resource.d/heartbeat/mysql
</pre>
        </li>
        <li>You might have to do something like this if your paths are
          off -- Patch the new MySQL RA::
        </li>
      </ul>
      <blockquote>
        <blockquote>
          <blockquote>
            <blockquote>
              <p>
                Open /usr/lib/ocf/resource.d/heartbeat/mysql and
                replace:
              </p>
              <pre>: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat}
. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs
</pre>
              <p>
                with
              </p>
              <pre>: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/resource.d/heartbeat}
. ${OCF_FUNCTIONS_DIR}/.ocf-shellfuncs
</pre>
            </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
      <br>
      ~Mike<br>
      <br>
      <br>
      <div>On Mon, Oct 31, 2011 at 1:39 PM, Joe <span><<a
            moz-do-not-send="true" href="mailto:weester@hotmail.com">weester@hotmail.com</a>></span>
        wrote:<br>
        <blockquote>
          <div> <span>I have a quick question is the Master Slave
              setting in pacemaker only allowed in regards to a DRBD
              device? Can you use it to create other Master Slave
              relationships such as mysql . What I am trying to do is to
              failover mysql service on a primary to a secondary if the
              mysql service fails on the primary . Here is my RA Mysql
              Service.<br>
            </span><br>
            crm configure show <br>
            node mysqldrbd01 \<br>
                    attributes standby="off"<br>
            node mysqldrbd02 \<br>
                    attributes standby="off"<br>
            primitive DRBD ocf:linbit:drbd \<br>
                    params drbd_resource="QD-RES" \<br>
                    operations $id="DRBD-operations" \<br>
                    op start interval="0" timeout="240" \<br>
                    op stop interval="0" timeout="100" \<br>
                    op monitor interval="120" \<br>
                    meta target-role="started"<br>
            primitive FAILOVER-ADDR ocf:heartbeat:IPaddr2 \<br>
                    params ip="192.168.1.160" nic="eth1" \<br>
                    operations $id="FAILOVER-ADDR-operations" \<br>
                    op monitor start-delay="0" interval="10" \<br>
                    meta target-role="started"<br>
            primitive PING-NET ocf:pacemaker:ping \<br>
                    params multiplier="100" host_list="192.168.1.5" \<br>
                    operations $id="PING-NET-operations" \<br>
                    op start interval="0" timeout="60" \<br>
                    op stop interval="0" timeout="60" \<br>
                    op monitor interval="60" timeout="60"
            start-delay="0" \<br>
                    meta target-role="started"<br>
            primitive SRV-MOUNT ocf:heartbeat:Filesystem \<br>
                    params device="/dev/drbd0" directory="/data/"
            fstype="ext3" \<br>
                    operations $id="SRV-MOUNT-operations" \<br>
                    op start interval="0" timeout="60" \<br>
                    op stop interval="0" timeout="60" \<br>
                    meta target-role="started"<br>
            primitive res_mysqld_MYSQL_SRV lsb:mysqld \<br>
                    operations $id="res_mysqld_MYSQL_SRV-operations" \<br>
                    op start interval="0" timeout="15" \<br>
                    op stop interval="0" timeout="15" \<br>
                    op monitor interval="15" timeout="15"
            start-delay="15"<br>
            group AP-CLUST SRV-MOUNT FAILOVER-ADDR<br>
            ms DRBD-DATA DRBD \<br>
                    meta clone-max="2" notify="true"
            target-role="started"<br>
            ms MYSQ_MASTER_SLAVE res_mysqld_MYSQL_SRV \<br>
                    meta clone-max="2" notify="true"
            target-role="started"<br>
            clone PING-NET-CLONE PING-NET \<br>
                    meta clone-max="2"<br>
            location connected_node DRBD-DATA \<br>
                    rule $id="connected_node-rule" -inf: not_defined
            pingd or pingd lte 0<br>
            colocation AP-CLUST_on_DRBD inf: AP-CLUST DRBD-DATA:Master<br>
            order AP-CLUST_after_DRBD-DATA inf: DRBD-DATA:promote
            AP-CLUST:start<br>
            property $id="cib-bootstrap-options" \<br>
                    expected-quorum-votes="2" \<br>
                    stonith-enabled="false" \<br>
                   
            dc-version="1.0.11-1554a83db0d3c3e546cfd3aaff6af1184f79ee87"
            \<br>
                    no-quorum-policy="ignore" \<br>
                    cluster-infrastructure="openais" \<br>
                    last-lrm-refresh="1320082592"<br>
            rsc_defaults $id="rsc-options" \<br>
                    resource-stickiness="100"<br>
            <br>
            <div>
              <br>
              <br>
              <br>
              thank you very much,<br>
              Joe<br>
            </div>
            <br>
          </div>
          <br>
          _______________________________________________<br>
          Pacemaker mailing list: <a moz-do-not-send="true"
            href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a><br>
          <a moz-do-not-send="true"
            href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a><br>
          <br>
          Project Home: <a moz-do-not-send="true"
            href="http://www.clusterlabs.org">http://www.clusterlabs.org</a><br>
          Getting started: <a moz-do-not-send="true"
            href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a><br>
          Bugs: <a moz-do-not-send="true"
href="http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker">http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker</a><br>
          <br>
        </blockquote>
      </div>
      <br>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Pacemaker mailing list: <a class="moz-txt-link-abbreviated" href="mailto:Pacemaker@oss.clusterlabs.org">Pacemaker@oss.clusterlabs.org</a>
<a class="moz-txt-link-freetext" href="http://oss.clusterlabs.org/mailman/listinfo/pacemaker">http://oss.clusterlabs.org/mailman/listinfo/pacemaker</a>

Project Home: <a class="moz-txt-link-freetext" href="http://www.clusterlabs.org">http://www.clusterlabs.org</a>
Getting started: <a class="moz-txt-link-freetext" href="http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf">http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf</a>
Bugs: <a class="moz-txt-link-freetext" href="http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker">http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>