MySQL Forums
Forum List  »  General

Heartbeat and Failover not working
Posted by: Anchal Bhasker
Date: April 01, 2009 05:05AM

Hello

I have configures 2 node drbd 8.3.0 with mysql mysql-5.0.22-2.1

If i stop heartbeat everything seems to work fine but then the failover has to be done manually .
But when i start heartbeat service it gives the below error.


[root@testdrbd1 ha.d]# /etc/init.d/heartbeat start
Starting High-Availability services:
/etc/drbd.conf: line 2: resource: command not found
/etc/drbd.conf: line 4: protocol: command not found
/etc/drbd.conf: line 5: startup: command not found
/etc/drbd.conf: line 5: degr-wfc-timeout: command not found
/etc/drbd.conf: line 6: syntax error near unexpected token `}'
/etc/drbd.conf: line 6: `disk { on-io-error detach; } # or panic, ...'
2009/04/01_13:59:15 CRITICAL: Resource drbddisk::mysql is active, and should not be!
2009/04/01_13:59:15 CRITICAL: Non-idle resources can affect data integrity!
2009/04/01_13:59:15 info: If you don't know what this means, then get help!
2009/04/01_13:59:15 info: Read the docs and/or source to /usr/share/heartbeat/ResourceManager for more details.
CRITICAL: Resource drbddisk::mysql is active, and should not be!
CRITICAL: Non-idle resources can affect data integrity!
info: If you don't know what this means, then get help!
info: Read the docs and/or the source to /usr/share/heartbeat/ResourceManager for more details.
2009/04/01_13:59:15 CRITICAL: Non-idle resources will affect resource takeback!
2009/04/01_13:59:15 CRITICAL: Non-idle resources may affect data integrity!
[ OK ]


My drbd.conf looks like this.


resource mysql
{
protocol C;
startup { wfc-timeout 5; degr-wfc-timeout 10; }
disk { on-io-error detach; } # or panic, ...
syncer {
rate 20M;
}
net{
after-sb-0pri discard-least-changes;
after-sb-1pri call-pri-lost-after-sb;
}
on testdrbd1 {
device /dev/drbd0;
disk /dev/cciss/c0d0p3;
address 10.0.3.11:8000;
meta-disk internal;
}
on testdrbd2 {
device /dev/drbd0;
disk /dev/cciss/c0d0p3;
address 10.0.3.22:8000;
meta-disk internal;
}
}

I dont know what is wrong with heartbeat configuration.
My ha.cf file looks like




logfacility local0 # This is deprecated
keepalive 2 # Interval between heartbeat (HB) packets.
deadtime 120 # How quickly HB determines a dead node.
warntime 5 # Time HB will issue a late HB.
initdead 120 # Time delay needed by HB to report a dead node.
udpport 694 # UDP port HB uses to communicate between nodes.
ping 10.0.0.70 # Ping VMware Server host to simulate network resource.
bcast eth0 # Which interface to use for HB packets.
auto_failback off # Auto promotion of primary node upon return to cluster.
node testdrbd1 # Node name must be same as uname -r.
node testdrbd2 # Node name must be same as uname -r.
udp eth0
baud 9600

respawn hacluster /usr/lib/heartbeat/ipfail
# Specifies which programs to run at startup

use_logd yes # Use system logging.
logfile /var/log/hb.log # Heartbeat logfile.
debugfile /var/log/heartbeat-debug.log # Debugging logfile.

The heartbeat rpms installed on my machine is



[root@testdrbd1 ha.d]# rpm -qa heartbeat*
heartbeat-2.99.0-3.1
heartbeat-common-devel-2.99.0-3.1
heartbeat-common-2.99.0-3.1
heartbeat-resources-2.99.0-3.1


The moment i start heartbeat it starts showing me secondary/secondary.

and also during failover

Options: ReplyQuote


Subject
Written By
Posted
Heartbeat and Failover not working
April 01, 2009 05:05AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.