时间:2021-07-01 10:21:17 帮助过:11人阅读
欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入 验证crm status Master/Slave Set: ms_mysqldrbd [mysqldrbd] Masters: [ ha1 ] Slaves: [ ha2 ] mystore (ocf::heartbeat:Filesystem):Started ha1 mysql (lsb:mysql):Started ha1 vip (ocf::heartb
欢迎进入Linux社区论坛,与200万技术人员互动交流 >>进入
验证crm status
Master/Slave Set: ms_mysqldrbd [mysqldrbd]
Masters: [ ha1 ]
Slaves: [ ha2 ]
mystore (ocf::heartbeat:Filesystem):Started ha1
mysql (lsb:mysql):Started ha1
vip (ocf::heartbeat:IPaddr):Started ha1
四、验证:
1、客户端mysql验证:
mysql -uroot -p -h 192.168.153.200
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
| test |
| test1 |
+--------------------+
2、模拟故障:
root@ha1:~# crm
crm(live)# node
crm(live)node# standby
crm(live)node# show
ha1: normal
standby: on
ha2: normal
crm(live)node# exit
bye
此时看一下状态:
root@ha1:~# crm status
Node ha1: standby
Online: [ ha2 ]
Master/Slave Set: ms_mysqldrbd [mysqldrbd]
Masters: [ ha2 ]
Stopped: [ mysqldrbd:0 ]
mystore (ocf::heartbeat:Filesystem):Started ha2
mysql (lsb:mysql):Started ha2
vip (ocf::heartbeat:IPaddr):Started ha2
此时,mysql已经运行于ha2上了。
[1] [2] [3]