--On Monday, April 11, 2011 02:14:44 PM +0200 Patric Falinder <patric.falin...@omg.nu> wrote:
> The problem I have is when I need to migrate/move the resources to the > other node, or unmove it, I get this error message and mysqld won't > start/move properly: [snip] > primitive mysqld lsb:mysql > colocation mysql_on_drbd inf: mysql ms_drbd_mysql:Master > order mysql_after_drbd inf: ms_drbd_mysql:promote mysql:start Try ocf:heartbeat:mysql instead of lsb:mysql. Also, have a look at the colocation and order constraints, and adjusting your start/stop timeouts for mysqld (compare with the values below). The following is a configuration that has been rock-solid for me (ymmv, especially wrt timeouts -- depends on db workload): primitive drbd_mysql ocf:linbit:drbd \ params drbd_resource="mysql" \ op monitor interval="30s" \ op start interval="0" timeout="240s" \ op stop interval="0" timeout="100s" primitive fs_mysql ocf:heartbeat:Filesystem \ params device="/dev/drbd/by-res/mysql" directory="/cluster/mysql" fstype="ext3" \ op monitor interval="20s" timeout="40s" \ op start interval="0" timeout="60s" \ op stop interval="0" timeout="60s" primitive ip_mysql ocf:heartbeat:IPaddr2 \ params ip="a.b.c.d" primitive mysqld ocf:heartbeat:mysql \ params binary="/usr/bin/mysqld_safe" pid="/var/run/mysqld/mysqld.pid" datadir="/cluster/mysql/data" test_passwd="password" \ op start interval="0" timeout="120" \ op stop interval="0" timeout="120" \ op monitor interval="60" timeout="30" group mysql fs_mysql ip_mysql mysqld colocation mysql_on_drbd inf: mysql:Started ms_drbd_mysql:Master order mysql_after_drbd inf: ms_drbd_mysql:promote mysql:start symmetrical=true > I also have one more question. When I run "move mysql dbcluster2" for > example, I need to run "unmove mysql" otherwise it won't migrate back > over if that server fails, right!? Then can I see somewhere if I need to > run "unmove" or if it will migrate over as it should? Correct. If you want a daily (or whatever) reminder of anything that hasn't been un-moved, check out my cluster-migration-check script available as part of gno-cluster-tools at <ftp://ftp.gno.org//pub/tools/cluster-tools>. Consider it as an early release pending additions, more docs, crypto sigs, etc, but I've had it in production for a while and it seems to be fine. Tested only on CentOS 5.x. Devin _______________________________________________ Pacemaker mailing list: Pacemaker@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