[Pacemaker] MySQL-resource won't migrate properly.

Dejan Muhamedagic dejanmm at fastmail.fm
Tue Dec 28 12:41:11 EST 2010


Hi,

On Tue, Dec 28, 2010 at 09:57:01AM +0100, Patric Falinder wrote:
> Hi,
>
> I'm setting up a HA-cluster with Corosync and Pacemaker with DRBD and  
> MySQL as resources.
> Right now I just want everything to run smoothly before I implement  
> STONITH and stuff like that.
>
> The problem I have is when I turn of the "Master"-node everything jumps  
> over to the secodary-node just fine except mysqld. I get this error:
>
> mysqld     (lsb:mysql):    Started dbcluster1 (unmanaged) FAILED
>
> Failed actions:
> mysqld_stop_0 (node=dbcluster1, call=70, rc=1, status=complete): unknown  
> error
>
>
> And if I run: crm resource cleanup mysqld
> it starts running normally again.
>
> I noticed that it migrates over just fine sometimes but then fails when  
> it migrates back over again.
>
> Master-node:    dbcluster1
> Secondary-node: dbcluster2
>
> This is my configuration:
>
> crm(live)configure# show
> node dbcluster1 \
>         attributes standby="off"
> node dbcluster2
> primitive drbd_mysql ocf:linbit:drbd \
>         params drbd_resource="dbcluster" \
>         op monitor interval="15s"
> primitive fs_mysql ocf:heartbeat:Filesystem \
>         params device="/dev/drbd/by-res/dbcluster"  
> directory="/mnt/mysql/" fstype="ext3"
> primitive ip_mysql ocf:heartbeat:IPaddr2 \
>         params ip="10.0.0.203" nic="eth1"
> primitive mysqld lsb:mysql \
>         meta target-role="Started"
> group mysql fs_mysql ip_mysql mysqld \
>         meta target-role="Started" is-managed="true"
> ms ms_drbd_mysql drbd_mysql \
>         meta master-max="1" master-node-max="1" clone-max="2"  
> clone-node-max="1" notify="true"
> location cli-prefer-mysql mysql \
>         rule $id="cli-prefer-rule-mysql" inf: #uname eq dbcluster1
> colocation mysql_on_drbd inf: mysql ms_drbd_mysql:Master
> order mysql_after_drbd inf: ms_drbd_mysql:promote mysql:start
> property $id="cib-bootstrap-options" \
>         no-quorum-policy="ignore" \
>         stonith-enabled="false" \
>         expected-quorum-votes="2" \
>         dc-version="1.0.9-74392a28b7f31d7ddc86689598bd23114f58978b" \
>         cluster-infrastructure="openais" \
>         last-lrm-refresh="1293451501"
>
>
> What is the problem here and how can I fix it?

You have to take a look at the logs. Look for messages from
lrmd. It looks like mysqld is not LSB compliant. You should be
better off with ocf:heartbeat:mysql.

> And also, where can I find documentation about the different resources?  
> For example ocf:heartbeat:IPaddr2 and others?

$ crm ra info ocf:heartbeat:IPaddr2

or

$ man ocf_heartbeat_IPaddr2

Thanks,

Dejan

> Thanks,
> -Patric
>
> _______________________________________________
> Pacemaker mailing list: Pacemaker at oss.clusterlabs.org
> http://oss.clusterlabs.org/mailman/listinfo/pacemaker
>
> Project Home: http://www.clusterlabs.org
> Getting started: http://www.clusterlabs.org/doc/Cluster_from_Scratch.pdf
> Bugs: http://developerbugs.linux-foundation.org/enter_bug.cgi?product=Pacemaker




More information about the Pacemaker mailing list