[Pacemaker] re:pacemaker won't start mysql in the second node

jiaju liu liujiaju86 at yahoo.com.cn
Wed Feb 9 08:00:28 UTC 2011


>     >> Liang Ma
>     >> Contractuel | Consultant | SED Systems Inc.
>     >> Ground Systems Analyst
>     >> Agence spatiale canadienne | Canadian Space Agency
>     >> 6767, Route de l'A?roport, Longueuil (St-Hubert), QC, Canada, J3Y 8Y9
>     >> T?l/Tel : (450) 926-5099 | T?l?c/Fax: (450) 926-5083
>     >> Courriel/E-mail : [liang.ma <http://liang.ma>@space.gc.ca
>     <http://space.gc.ca>]
>     >> Site web/Web site : [www.space.gc.ca <http://www.space.gc.ca> ]
>     >>
>     >>
>     >>
>     >>
>     >> -----Original Message-----
>     >> From: Dejan Muhamedagic [mailto:dejanmm at fastmail.fm
>     <mailto:dejanmm at fastmail.fm>]
>     >> Sent: January 28, 2011 8:26 AM
>     >> To: The Pacemaker cluster resource manager
>     >> Subject: Re: [Pacemaker] pacemaker won't start mysql in the
>     second node
>     >>
>     >> Hi,
>     >>
>     >> On Thu, Jan 27, 2011 at 11:51:31AM -0500, Liang.Ma at asc-csa.gc.ca
>     <mailto:Liang.Ma at asc-csa.gc.ca> wrote:
>     >>>
>     >>>
>     >>> Hi There,
>     >>>

HI your LAMP is linux+apache+mysql+php?
>     >>> I have set up a pair of ha LAMP servers using heartbeat,
>     pacemaker and
>     >>> drbd on Ubuntu 10.04 LTS. Everything works fine until I upgraded
>     >>> mysql-server from 5.1.41-3ubuntu12.6 to 5.1.41-3ubuntu12.9. Now
>     node 1
>     >>> (arsvr1) works still fine, but mysql on node 2 (arsvr2) won't start
>     >>> when I switch arsvr1 standby. The error message shown from "crm
>     >>> status" is
>     >>>
>     >>> Failed actions:
>     >>> mysql_start_0 (node=arsvr2, call=32, rc=4, status=complete):
>     >>> insufficient privileges
>     >>>
>     >>> No errors logged in /var/log/mysql/error.log at all.
>     >>
>     >> I think that you should check directory permissions. The log
>     >> file should give you a hint.
>     >>
>     >> Thanks,
>     >>
>     >> Dejan
>     >>
>     >>
>     >>> drbd mysql partition mounted properly. If I go to
>     >>> /usr/lib/ocf/resource.d/heartbeat and set the OCF_RESKEY
>     parameters, I
>     >>> have no problem to start mysql server by "./mysql start". But the
>     >>> resource mysql won't show up in crm status.
>     >>>
>     >>> So looks somehow pacemaker fail to start resource mysql even before
>     >>> running the resource script.
>     >>>
>     >>> Here is the configuration
>     >>>
>     >>> node $id="bc6bf61d-6b5f-4307-85f3-bf7bb11531bb" arsvr2 \
>     >>>     attributes standby="off"
>     >>> node $id="bf0e7394-9684-42b9-893b-5a9a6ecddd7e" arsvr1 \
>     >>>     attributes standby="off"
>     >>> primitive apache2 lsb:apache2 \
>     >>>     op start interval="0" timeout="60" \
>     >>>     op stop interval="0" timeout="120" start-delay="15" \
>     >>>     meta target-role="Started"
>     >>> primitive drbd_mysql ocf:linbit:drbd \
>     >>>     params drbd_resource="r0" \
>     >>>     op monitor interval="15s"
>     >>> primitive drbd_webfs ocf:linbit:drbd \
>     >>>     params drbd_resource="r1" \
>     >>>     op monitor interval="15s" \
>     >>>     op start interval="0" timeout="240" \
>     >>>     op stop interval="0" timeout="100"
>     >>> primitive fs_mysql ocf:heartbeat:Filesystem \
>     >>>     params device="/dev/drbd/by-res/r0"
>     directory="/var/lib/mysql" fstype="ext4" \
>     >>>     op start interval="0" timeout="60" \
>     >>>     op stop interval="0" timeout="120" \
>     >>>     meta target-role="Started"
>     >>> primitive fs_webfs ocf:heartbeat:Filesystem \
>     >>>     params device="/dev/drbd/by-res/r1" directory="/srv"
>     fstype="ext4" \
>     >>>     op start interval="0" timeout="60" \
>     >>>     op stop interval="0" timeout="120" \
>     >>>     meta target-role="Started"
>     >>> primitive ip1 ocf:heartbeat:IPaddr2 \
>     >>>     params ip="10.10.10.193" nic="eth0" \
>     >>>     op monitor interval="5s"
>     >>> primitive ip1arp ocf:heartbeat:SendArp \
>     >>>     params ip="10.10.10.193" nic="eth0"
>     >>> primitive mysql ocf:heartbeat:mysql \
>     >>>     params binary="/usr/bin/mysqld_safe" config="/etc/mysql/my.cnf"
>     >>> user="mysql" group="mysql" log="/var/log/mysql.log"
>     >>> pid="/var/run/mysqld/mysqld.pid" datadir="/var/lib/mysql"
>     >>> socket="/var/run/mysqld/mysqld.sock" \
>     >>>     op monitor interval="30s" timeout="30s" \
>     >>>     op start interval="0" timeout="120" \
>     >>>     op stop interval="0" timeout="120" \
>     >>>     meta target-role="Started"
>     >>> group MySQLDB fs_mysql mysql \
>     >>>     meta target-role="Started"
>     >>> group WebServices ip1 ip1arp fs_webfs apache2 \
>     >>>     meta target-role="Started"
>     >>> ms ms_drbd_mysql drbd_mysql \
>     >>>     meta master-max="1" master-node-max="1" clone-max="2"
>     >>> clone-node-max="1" notify="true"
>     >>> ms ms_drbd_webfs drbd_webfs \
>     >>>     meta master-max="1" master-node-max="1" clone-max="2"
>     >>> clone-node-max="1" notify="true" target-role="Started"
>     >>> colocation apache2_with_ip inf: apache2 ip1
>     >>> colocation apache2_with_mysql inf: apache2 ms_drbd_mysql:Master
>     >>> colocation apache2_with_webfs inf: apache2 ms_drbd_webfs:Master
>     >>> colocation fs_on_drbd inf: fs_mysql ms_drbd_mysql:Master
>     >>> colocation ip_with_ip_arp inf: ip1 ip1arp
>     >>> colocation mysql_on_drbd inf: MySQLDB ms_drbd_mysql:Master
>     >>> colocation web_with_mysql inf: MySQLDB WebServices
>     >>> colocation webfs_on_drbd inf: fs_webfs ms_drbd_webfs:Master
>     >>> colocation webfs_with_fs inf: fs_webfs fs_mysql
>     >>> order apache2-after-arp inf: ip1arp:start apache2:start
>     >>> order arp-after-ip inf: ip1:start ip1arp:start
>     >>> order fs-mysql-after-drbd inf: ms_drbd_mysql:promote fs_mysql:start




      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clusterlabs.org/pipermail/pacemaker/attachments/20110209/066d6773/attachment-0001.html>


More information about the Pacemaker mailing list