/etc/init.d/mysqld stop
umount /data
netstat -lntup|grep 330
ps -ef|grep mysql
drbdadm up data
cat /proc/drbd
================================
[root@MYSQL_S ~]# umount /data
[root@MYSQL_S ~]# !net
netstat -lntup|grep 330
[root@MYSQL_S ~]# !ps
ps -ef|grep mysql
root 61384 50623 0 10:01 pts/1 00:00:00 grep mysql
[root@MYSQL_S ~]# drbdadm up data
[root@MYSQL_S ~]# !cat
cat /proc/drbd
version: 8.4.4 (api:1/proto:86-101)
GIT-hash: 74402fecf24da8e5438171ee8c19e28627e1c98a build by root@MYSQL_S, 2015-11-04 22:59:05
0: cs:Connected ro:Secondary/Primary ds:UpToDate/UpToDate C r-----
ns:0 nr:12 dw:12 dr:0 al:0 bm:1 lo:0 pe:0 ua:0 ap:0 ep:1 wo:f oos:0
[root@MYSQL_S ~]#
================================
下面用heartbeat管理drbd和mysql数据库,
#####实现mysql自动接管