Hi,

I'm trying to setup a database cluster with MySQL/Redis. My problem is, 
the failover is working if I shutdown/reboot one node.
If I shutdown the network on one node(ifdown eth0 or ifdown eth1), the 
failover isn't working. If I shutdown eth0 and eth1
the failover is working but if I reboot the node without network access, 
I get a split-brain. I hope you can help me.

My current setup:
2 nodes with CentOS-6.0
Pacemaker
OpenAIS
Corosync
DRBD
MySQL
Redis

first node:
eth0 10.246.214.225
eth1 10.10.10.1 (DRBD)

second node:
eth0 10.246.214.226
eth1 10.10.10.2(DRBD)

Here is my current configuration:

crm configure
crm(live)configure#property no-quorum-policy=ignore
crm(live)configure#commit
crm(live)configure#exit
crm configure
crm(live)configure#property stonith-enabled=false
crm(live)configure#commit
crm(live)configure#exit

crm configure
crm(live)configure#primitive drbd_mysql ocf:linbit:drbd \
                            params drbd_resource="r0" \
                            op monitor interval="10s" role="Master" \
                            op monitor interval="20s" role="Slave" \
                            op start interval="0" timeout="240" \
                            op stop interval="0" timeout="240"
crm(live)configure#ms ms_drbd_mysql drbd_mysql \
                            meta master-max="1" master-node-max="1" \
                            clone-max="2" clone-node-max="1" \
                            notify="true" target-role="Master"
crm(live)configure#primitive fs_mysql ocf:heartbeat:Filesystem \
                            params device="/dev/drbd/by-res/r0" 
directory="/var/lib/mysql" fstype="xfs" options="noatime" \
                            op start interval="0" timeout="180s" \
                            op stop interval="0" timeout="300s" \
                            op monitor interval="60s"
crm(live)configure#primitive drbd_redis ocf:linbit:drbd \
                            params drbd_resource="r1" \
                            op monitor interval="10s" role="Master" \
                            op monitor interval="20s" role="Slave" \
                            op start interval="0" timeout="240" \
                            op stop interval="0" timeout="240"
crm(live)configure#ms ms_drbd_redis drbd_redis \
                            meta master-max="1" master-node-max="1" \
                            clone-max="2" clone-node-max="1" \
                            notify="true" target-role="Master"
crm(live)configure#primitive fs_redis ocf:heartbeat:Filesystem \
                            params device="/dev/drbd/by-res/r1" 
directory="/var/lib/redis" fstype="xfs" options="noatime" \
                            op start interval="0" timeout="180s" \
                            op stop interval="0" timeout="300s" \
                            op monitor interval="60s"
crm(live)configure#primitive ip_mysql_redis ocf:heartbeat:IPaddr2 \
                            params ip="10.246.214.227" nic="eth0"
crm(live)configure#primitive mysqld lsb:mysql \
                            op monitor interval="15s"
crm(live)configure#primitive redisd lsb:redis \
                            op monitor interval="15s"
crm(live)configure#group mysql_redis fs_mysql ip_mysql_redis mysqld 
fs_redis redisd
crm(live)configure#location cli-prefer-mysql_redis mysql_redis \
                    rule $id="cli-prefer-rule-mysql_redis" inf: #uname 
eq ESCPDB-HA-01v.escapio.local
crm(live)configure#colocation mysql_on_drbd inf: mysql_redis 
ms_drbd_mysql:Master
crm(live)configure#colocation redis_on_drbd inf: mysql_redis 
ms_drbd_redis:Master
crm(live)configure#order mysql_after_drbd inf: ms_drbd_mysql:promote 
mysql_redis:start
crm(live)configure#order redis_after_drbd inf: ms_drbd_redis:promote 
mysql_redis:start
crm(live)configure#commit
crm(live)configure#exit

# Please read the corosync.conf.5 manual page
compatibility: whitetank

totem {
         version: 2
         secauth: off
         threads: 0
         rrp_mode: passive
         interface {
                 ringnumber: 0
                 bindnetaddr: 10.246.214.0
                 mcastaddr: 225.94.1.1
                 mcastport: 5404
         }
         interface {
                 ringnumber: 1
                 bindnetaddr: 10.10.10.0
                 mcastaddr: 225.94.2.1
                 mcastport: 5406
         }
}

logging {
         fileline: off
         to_stderr: no
         to_logfile: yes
         to_syslog: yes
         logfile: /var/log/corosync.log
         debug: off
         timestamp: on
         logger_subsys {
                 subsys: AMF
                 debug: off
         }
}

amf {
         mode: disabled
}

service {
   ver:       0
   name:      pacemaker
   use_mgmtd: yes
}
aisexec {
   user:   root
   group:  root
}

_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to