MHA 手动故障转移(二)

2015-07-16 12:09:26 · 作者: · 浏览: 3
ves) log-bin:enabled
Wed Apr 22 11:48:39 2015 - [info]? ? Replicating from 192.168.1.6(192.168.1.6:3306)
Master vdbsrv1(192.168.1.6:3306) is dead. Proceed? (yes/NO): yes
Wed Apr 22 11:48:54 2015 - [info] Starting Non-GTID based failover.
Wed Apr 22 11:48:54 2015 - [info]
Wed Apr 22 11:48:54 2015 - [info] ** Phase 1: Configuration Check Phase completed.
Wed Apr 22 11:48:54 2015 - [info]
Wed Apr 22 11:48:54 2015 - [info] * Phase 2: Dead Master Shutdown Phase..
Wed Apr 22 11:48:54 2015 - [info]
Wed Apr 22 11:48:54 2015 - [info] HealthCheck: SSH to vdbsrv1 is reachable.
Wed Apr 22 11:48:55 2015 - [info] Forcing shutdown so that applications never connect to the current master..
Wed Apr 22 11:48:55 2015 - [info] Executing master IP deactivation script:
Wed Apr 22 11:48:55 2015 - [info]? /tmp/master_ip_failover --orig_master_host=vdbsrv1 --orig_master_ip=192.168.1.6
? --orig_master_port=3306 --command=stopssh --ssh_user=root?


IN SCRIPT TEST====/sbin/ifconfig eth0:0 down==/sbin/ifconfig eth0:0 192.168.1.13/24===


To:
vdbsrv3(192.168.1.8:3306) (new master)
?+--vdbsrv2(192.168.1.7:3306)


Starting master switch from vdbsrv1(192.168.1.6:3306) to vdbsrv3(192.168.1.8:3306)? (yes/NO): yes
Wed Apr 22 11:48:58 2015 - [info] New master decided manually is vdbsrv3(192.168.1.8:3306)
Wed Apr 22 11:48:58 2015 - [info]
Wed Apr 22 11:48:58 2015 - [info] * Phase 3.3: New Master Diff Log Generation Phase..
Wed Apr 22 11:48:58 2015 - [info]
Wed Apr 22 11:48:58 2015 - [info]? This server has all relay logs. No need to generate diff files from the latest slave.
Wed Apr 22 11:48:58 2015 - [info] Sending binlog..

? ? saved_master_binlog_from_vdbsrv1_3306_20150422114839.binlog? ? ? ? ? 100%? 143? ? 0.1KB/s? 00:00? ?
Wed Apr 22 11:48:58 2015 - [info] scp from local:/var/log/masterha/app1/saved_master_binlog_from_vdbsrv1_3306_20150422114839.binlog to
? root@vdbsrv3:/var/tmp/saved_master_binlog_from_vdbsrv1_3306_20150422114839.binlog succeeded.
Wed Apr 22 11:48:58 2015 - [info]
Wed Apr 22 11:48:58 2015 - [info] * Phase 3.4: Master Log Apply Phase..
Wed Apr 22 11:48:58 2015 - [info]
Wed Apr 22 11:48:58 2015 - [info] *NOTICE: If any error happens from this phase, manual recovery is needed.
Wed Apr 22 11:48:58 2015 - [info] Starting recovery on vdbsrv3(192.168.1.8:3306)..
Wed Apr 22 11:48:58 2015 - [info]? Generating diffs succeeded.
Wed Apr 22 11:48:58 2015 - [info] Waiting until all relay logs are applied.
Wed Apr 22 11:48:58 2015 - [info]? done.
Wed Apr 22 11:48:58 2015 - [info] Getting slave status..
Wed Apr 22 11:48:58 2015 - [info] This slave(vdbsrv3)'s Exec_Master_Log_Pos equals to Read_Master_Log_Pos(mysql-bin.000027:432).
? No need to recover from Exec_Master_Log_Pos.
Wed Apr 22 11:48:58 2015 - [info] Connecting to the target slave host vdbsrv3, running recover script..
Wed Apr 22 11:48:58 2015 - [info] Executing command: apply_diff_relay_logs --command=apply --slave_user='mha' --slave_host=vdbsrv3
? --slave_ip=192.168.1.8? --slave_port=3306 --apply_files=/var/tmp/saved_master_binlog_from_vdbsrv1_3306_20150422114839.binlog
? --workdir=/var/tmp --target_version=5.6.22-log --timestamp=20150422114839 --handle_raw_binlog=1 --disable_log_bin=0
? --manager_version=0.56 --slave_pass=xxx
Wed Apr 22 11:48:59 2015 - [info]
Applying differential binary/relay log files /var/tmp/saved_master_binlog_from_vdbsrv1_3306_20150422114839.binlog on vdbsrv3:3306.
? This may take long time...
Applying log files succeeded.
Wed Apr 22 11:48:5