- 论坛徽章:
- 0
|
操作系统:centos 5.6 64bit
机器2台:MYSQLM1 和MYSQLM2
MYSQLM1 为primary
MYSQLM2 为secondary
2台机器etc/hosts的配置如下
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 MYSQLM2 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
172.17.94.210 MYSQLM2 node2 #MYSQLM1 此处修改下。
172.17.94.209 node1
heartbeat在2台机器的ha.cf配置如下:
debugfile /var/log/ha-debug
logfile /var/log/ha-log
logfacility local0
keepalive 2
deadtime 20
warntime 10
initdead 60
udpport 693
#ucast eht0 172.17.94.210
ping_group group1 172.17.94.209 172.17.94.210
auto_failback off
node MYSQLM1
node MYSQLM2
#respawn hacluster /usr/lib/heartbeat/ipfail
#apiauth ipfail gid=haclient uid=hacluster
hopfudge 1
haresources的配置文件如下:
2台机器的配置都一样。默认MYSQLM1为primary.虚拟IP为172.17.94.208,IP都设在eth0:0上。
MYSQLM1 drbddisk Filesystem::/dev/drbd0::/data::ext3 mysqld 172.17.94.208
heartbeat的resource.d目录下写的mysql如下:
#!/bin/bash
. /etc/ha.d/shellfuncs
case "$1" in
start)
res='/etc/init.d/mysqld start'
ret=$?
ha_log $res
exit $ret
;;
stop)
res='/etc/init.d/mysqld stop'
ret=$?
ha_log $res
exit $ret
;;
status)
if [['ps -ef|grep '[m]ysqld''>1]];then
echo "running"
else
echo "stopped"
fi
;;
*)
echo "Usage:mysqld {start|stop|status}"
exit 1
;;
esac
exit 0
问题:
MYSQLM2的heartbeat日志:
heartbeat[2829]: 2011/08/31_10:57:26 CRIT: send_to_all_media: No working comm channels to write to.
heartbeat[2829]: 2011/08/31_10:57:28 CRIT: send_to_all_media: No working comm channels to write to.
heartbeat[2829]: 2011/08/31_10:57:30 CRIT: send_to_all_media: No working comm channels to write to.
heartbeat[2829]: 2011/08/31_10:57:32 CRIT: send_to_all_media: No working comm channels to write to.
heartbeat[2829]: 2011/08/31_10:57:34 CRIT: send_to_all_media: No working comm channels to write to.
heartbeat[2829]: 2011/08/31_10:57:34 CRIT: send_to_all_media: No working comm channels to write to.
heartbeat[2829]: 2011/08/31_10:57:36 CRIT: send_to_all_media: No working comm channels to write to.
heartbeat[2829]: 2011/08/31_10:57:38 CRIT: send_to_all_media: No working comm channels to write to.
heartbeat[2829]: 2011/08/31_10:57:40 CRIT: send_to_all_media: No working comm channels to write to.
heartbeat[2829]: 2011/08/31_10:57:42 CRIT: send_to_all_media: No working comm channels to write to.
1,为什么MYSQLM1我ifdown eth0之后,MYSQLM2的权限从secondary升级到primary需要重起机器才能获得权限?
希望路过有经验的能帮忙看看。
谢谢! |
|