Heartbeat and DRBD are the same as they were before. Here fine-tuned the next DRBD communication with a dedicated network card, so consider the speed limit is only IO .
about MySQL:
Yum install mysql-server MySQL
back up the previous /var/lib/mysql data and configuration file /etc/my.cnf, and Note that the permissions are MySQL
then DRBD mounts to the/var/lib/mysql to copy the data to this directory.
Mkdir/backupcd/var/lib/mysql/cp-ar */BACKUP/CP/ETC/MY.CNF/BACKUP/RM-FR/ETC/MY.CNFMOUNT/DEV/DRBD2/VAR/LIB/MYSQ l/rm-fr/var/lib/mysql/*cp-ra/backup/*
Ln-s/var/lib/mysql/my.cnf/etc/my.cnf
server2.example.com ipaddr::192.168.88.200/24/eth0drbddisk::d ata1 FILESYSTEM::/DEV/DRBD2::/VAR/LIB/MYSQL::EXT4 MYSQLD (Note that there's a d in the back)
When high availability,MySQL mount, must be normal to stop the heartbeat , so that MySQL will stop normally. Otherwise it will remain Mysql.scoket. The next time in its HA centralization will not be successful.
always reported the wrong: Another MySQL daemon already running with the same UNIX socket.
Workaround: DRBD hangs, removes mysql.scoket, restarts HA.
MySQL high availability (drbd+heartbeat+mysql)