11-检查整个复制环境状况
通过masterha_check_repl脚本查看整个集群的状态:
masterha_check_repl --conf=/etc/masterha/app1.cnf
192.168.7.81 (current master)
+--192.168.7.83
+--192.168.7.185
Fri Jul 19 18:27:20 2013 - [info] Checking replication health on 192.168.7.83..
Fri Jul 19 18:27:20 2013 - [info] ok.
Fri Jul 19 18:27:20 2013 - [info] Checking replication health on 192.168.7.185..
Fri Jul 19 18:27:20 2013 - [info] ok.
MySQL Replication Health is OK.
注意,在进行集群检查时,0.53版本中存在相应的bug,所以在检查过程中可能会报下列错误:
[error][/usr/lib/perl5/site_perl/5.8.8/MHA/ManagerUtil.pm, ln178] Got ERROR: Use of uninitialized value in scalar chomp at /usr/lib/perl5/site_perl/5.8.8/MHA/ManagerConst.pm line 90.
要解决这个问题,可以在/usr/lib/perl5/site_perl/5.8.8/MHA/ManagerConst.pm 文件的第 90行添加以下代码:
$msg = "" unless($msg);