自动failover


slave1:
stop slave io_thread slave2
stop slave io_thread server1:

  create database sbtest;

  /usr/local/bin/sysbench --test=/root/sysbench-0.5/sysbench/tests/db/oltp.lua --oltp-table-size=10000 --oltp-tables-count=1 --mysql-user=root --mysql-password=123 --   mysql-
  host=10.24.220.232 --mysql-port=3306 --num-threads=4 --max-requests=0 --max-time=30 --report-interval=3 prepare

  /usr/local/bin/sysbench --test=/root/sysbench-0.5/sysbench/tests/db/oltp.lua --oltp-table-size=10000 --oltp-tables-count=1 --mysql-user=root --mysql-password=123 --  mysql- 
host=10.24.220.232 --mysql-port=3306 --num-threads=4 --max-requests=0 --max-time=30 --report-interval=3 run

slave2:
start slave io_thread slave1
start slave io_thread

  server1

  service mysql.server stop


  Sun May  ::  - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.
Sun May :: - [info] Reading application default configuration from /etc/masterha/app1.conf..
Sun May :: - [info] Reading server configuration from /etc/masterha/app1.conf..
Sun May :: - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.
Sun May :: - [info] Reading application default configuration from /etc/masterha/app1.conf..
Sun May :: - [info] Reading server configuration from /etc/masterha/app1.conf..
:):
Sun May :: - [debug] Connected to: slave1(10.24.220.70:), user=root
Sun May :: - [debug] Number of slave worker threads on host slave1(10.24.220.70:):
Sun May :: - [debug] Connected to: slave2(10.169.214.33:), user=root
Sun May :: - [debug] Number of slave worker threads on host slave2(10.169.214.33:):
Sun May :: - [debug] Comparing MySQL versions..
Sun May :: - [debug] Comparing MySQL versions done.
Sun May :: - [debug] Connecting to servers done.
Sun May :: - [info] GTID failover mode =
Sun May :: - [info] Dead Servers:
Sun May :: - [info] Alive Servers:
Sun May :: - [info] server1(10.24.220.232:)
Sun May :: - [info] slave1(10.24.220.70:)
Sun May :: - [info] slave2(10.169.214.33:)
Sun May :: - [info] Alive Slaves:
Sun May :: - [info] slave1(10.24.220.70:) Version=5.7.-log (oldest major version between slaves) log-bin:enabled
Sun May :: - [info] GTID ON
Sun May :: - [debug] Relay log info repository: FILE
Sun May :: - [info] Replicating from 10.24.220.232(10.24.220.232:)
Sun May :: - [info] Primary candidate for the new Master (candidate_master is set)
Sun May :: - [info] slave2(10.169.214.33:) Version=5.7.-log (oldest major version between slaves) log-bin:enabled
Sun May :: - [info] GTID ON
Sun May :: - [debug] Relay log info repository: FILE
Sun May :: - [info] Replicating from 10.24.220.232(10.24.220.232:)
Sun May :: - [info] Not candidate for the new Master (no_master is set)
Sun May :: - [info] Current Alive Master: server1(10.24.220.232:)
Sun May :: - [info] Checking slave configurations..
Sun May :: - [info] Checking replication filtering settings..
Sun May :: - [info] binlog_do_db= , binlog_ignore_db=
Sun May :: - [info] Replication filtering check ok.
Sun May :: - [info] GTID (with auto-pos) is supported. Skipping all SSH and Node package checking.
Sun May :: - [info] Checking SSH publickey authentication settings on the current master..
Sun May :: - [debug] SSH connection test to server1, option -o StrictHostKeyChecking=no -o PasswordAuthentication=no -o BatchMode=yes -o ConnectTimeout=, timeout
Sun May :: - [info] HealthCheck: SSH to server1 is reachable.
Sun May :: - [info]
server1(10.24.220.232:) (current master)
+--slave1(10.24.220.70:)
+--slave2(10.169.214.33:) Sun May :: - [info] Checking master_ip_failover_script status:
Sun May :: - [info] /usr/local/bin/master_ip_failover --command=status --ssh_user=root --orig_master_host=server1 --orig_master_ip=10.24.220.232 --orig_master_port= IN SCRIPT TEST====/sbin/ifconfig eth0: down==/sbin/ifconfig eth0: 10.24.220.100/=== Checking the Status of the script.. OK
Sun May :: - [info] OK.
Sun May :: - [warning] shutdown_script is not defined.
Sun May :: - [debug] Disconnected from server1(10.24.220.232:)
Sun May :: - [debug] Disconnected from slave1(10.24.220.70:)
Sun May :: - [debug] Disconnected from slave2(10.169.214.33:)
Sun May :: - [debug] SSH check command: exit
Sun May :: - [info] Set master ping interval seconds.
Sun May :: - [info] Set secondary check script: /usr/bin/masterha_secondary_check -s 10.169.214.33 -s 10.24.220.70 --user=root --master_host=10.24.220.232 --master_port=
Sun May :: - [info] Starting ping health check on server1(10.24.220.232:)..
Sun May :: - [debug] Connected on master.
Sun May :: - [debug] Set short wait_timeout on master: seconds
Sun May :: - [debug] Trying to get advisory lock..
Sun May :: - [info] Ping(SELECT) succeeded, waiting until MySQL doesn't respond..
Sun May :: - [warning] Got error on MySQL select ping: (MySQL server has gone away)
Sun May :: - [info] Executing SSH check script: exit
Sun May :: - [debug] SSH connection test to server1, option -o StrictHostKeyChecking=no -o PasswordAuthentication=no -o BatchMode=yes -o ConnectTimeout=, timeout
Sun May :: - [info] Executing secondary network check script: /usr/bin/masterha_secondary_check -s 10.169.214.33 -s 10.24.220.70 --user=root --master_host=10.24.220.232 --master_port= --user=root --master_host=server1 --master_ip=10.24.220.232 --master_port= --master_user=root --master_password= --ping_type=SELECT
Sun May :: - [info] HealthCheck: SSH to server1 is reachable.
Monitoring server 10.169.214.33 is reachable, Master is not reachable from 10.169.214.33. OK.
Monitoring server 10.24.220.70 is reachable, Master is not reachable from 10.24.220.70. OK.
Sun May :: - [info] Master is not reachable from all other monitoring servers. Failover should start.
Sun May :: - [warning] Got error on MySQL connect: (Lost connection to MySQL server at 'reading initial communication packet', system error: )
Sun May :: - [warning] Connection failed time(s)..
Sun May :: - [warning] Got error on MySQL connect: (Lost connection to MySQL server at 'reading initial communication packet', system error: )
Sun May :: - [warning] Connection failed time(s)..
Sun May :: - [warning] Got error on MySQL connect: (Lost connection to MySQL server at 'reading initial communication packet', system error: )
Sun May :: - [warning] Connection failed time(s)..
Sun May :: - [warning] Master is not reachable from health checker!
Sun May :: - [warning] Master server1(10.24.220.232:) is not reachable!
Sun May :: - [warning] SSH is reachable.
Sun May :: - [info] Connecting to a master server failed. Reading configuration file /etc/masterha_default.cnf and /etc/masterha/app1.conf again, and trying to connect to all servers to check server status..
Sun May :: - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.
Sun May :: - [info] Reading application default configuration from /etc/masterha/app1.conf..
Sun May :: - [info] Reading server configuration from /etc/masterha/app1.conf..
Sun May :: - [debug] Skipping connecting to dead master server1(10.24.220.232:).
Sun May :: - [debug] Connecting to servers..
Sun May :: - [debug] Connected to: slave1(10.24.220.70:), user=root
Sun May :: - [debug] Number of slave worker threads on host slave1(10.24.220.70:):
Sun May :: - [debug] Connected to: slave2(10.169.214.33:), user=root
Sun May :: - [debug] Number of slave worker threads on host slave2(10.169.214.33:):
Sun May :: - [debug] Comparing MySQL versions..
Sun May :: - [debug] Comparing MySQL versions done.
Sun May :: - [debug] Connecting to servers done.
Sun May :: - [info] GTID failover mode =
Sun May :: - [info] Dead Servers:
Sun May :: - [info] server1(10.24.220.232:)
Sun May :: - [info] Alive Servers:
Sun May :: - [info] slave1(10.24.220.70:)
Sun May :: - [info] slave2(10.169.214.33:)
Sun May :: - [info] Alive Slaves:
Sun May :: - [info] slave1(10.24.220.70:) Version=5.7.-log (oldest major version between slaves) log-bin:enabled
Sun May :: - [info] GTID ON
Sun May :: - [debug] Relay log info repository: FILE
Sun May :: - [info] Replicating from 10.24.220.232(10.24.220.232:)
Sun May :: - [info] Primary candidate for the new Master (candidate_master is set)
Sun May :: - [info] slave2(10.169.214.33:) Version=5.7.-log (oldest major version between slaves) log-bin:enabled
Sun May :: - [info] GTID ON
Sun May :: - [debug] Relay log info repository: FILE
Sun May :: - [info] Replicating from 10.24.220.232(10.24.220.232:)
Sun May :: - [info] Not candidate for the new Master (no_master is set)
Sun May :: - [info] Checking slave configurations..
Sun May :: - [info] Checking replication filtering settings..
Sun May :: - [info] Replication filtering check ok.
Sun May :: - [info] Master is down!
Sun May :: - [info] Terminating monitoring script.
Sun May :: - [info] Got exit code (Master dead).
Sun May :: - [info] MHA::MasterFailover version 0.56.
Sun May :: - [info] Starting master failover.
Sun May :: - [info]
Sun May :: - [info] * Phase : Configuration Check Phase..
Sun May :: - [info]
Sun May :: - [debug] Skipping connecting to dead master server1.
Sun May :: - [debug] Connecting to servers..
Sun May :: - [debug] Connected to: slave1(10.24.220.70:), user=root
Sun May :: - [debug] Number of slave worker threads on host slave1(10.24.220.70:):
Sun May :: - [debug] Connected to: slave2(10.169.214.33:), user=root
Sun May :: - [debug] Number of slave worker threads on host slave2(10.169.214.33:):
Sun May :: - [debug] Comparing MySQL versions..
Sun May :: - [debug] Comparing MySQL versions done.
Sun May :: - [debug] Connecting to servers done.
Sun May :: - [info] GTID failover mode =
Sun May :: - [info] Dead Servers:
Sun May :: - [info] server1(10.24.220.232:)
Sun May :: - [info] Checking master reachability via MySQL(double check)...
Sun May :: - [info] ok.
Sun May :: - [info] Alive Servers:
Sun May :: - [info] slave1(10.24.220.70:)
Sun May :: - [info] slave2(10.169.214.33:)
Sun May :: - [info] Alive Slaves:
Sun May :: - [info] slave1(10.24.220.70:) Version=5.7.-log (oldest major version between slaves) log-bin:enabled
Sun May :: - [info] GTID ON
Sun May :: - [debug] Relay log info repository: FILE
Sun May :: - [info] Replicating from 10.24.220.232(10.24.220.232:)
Sun May :: - [info] Primary candidate for the new Master (candidate_master is set)
Sun May :: - [info] slave2(10.169.214.33:) Version=5.7.-log (oldest major version between slaves) log-bin:enabled
Sun May :: - [info] GTID ON
Sun May :: - [debug] Relay log info repository: FILE
Sun May :: - [info] Replicating from 10.24.220.232(10.24.220.232:)
Sun May :: - [info] Not candidate for the new Master (no_master is set)
Sun May :: - [info] Starting GTID based failover.
Sun May :: - [info]
Sun May :: - [info] ** Phase : Configuration Check Phase completed.
Sun May :: - [info]
Sun May :: - [info] * Phase : Dead Master Shutdown Phase..
Sun May :: - [info]
Sun May :: - [info] Forcing shutdown so that applications never connect to the current master..
Sun May :: - [info] Executing master IP deactivation script:
Sun May :: - [info] /usr/local/bin/master_ip_failover --orig_master_host=server1 --orig_master_ip=10.24.220.232 --orig_master_port= --command=stopssh --ssh_user=root
Sun May :: - [debug] Stopping IO thread on slave2(10.169.214.33:)..
Sun May :: - [debug] Stopping IO thread on slave1(10.24.220.70:).. IN SCRIPT TEST====/sbin/ifconfig eth0: down==/sbin/ifconfig eth0: 10.24.220.100/=== Disabling the VIP on old master: server1
Sun May :: - [debug] Stop IO thread on slave2(10.169.214.33:) done.
Sun May :: - [debug] Stop IO thread on slave1(10.24.220.70:) done.
SIOCSIFFLAGS: Cannot assign requested address
Sun May :: - [info] done.
Sun May :: - [warning] shutdown_script is not set. Skipping explicit shutting down of the dead master.
Sun May :: - [info] * Phase : Dead Master Shutdown Phase completed.
Sun May :: - [info]
Sun May :: - [info] * Phase : Master Recovery Phase..
Sun May :: - [info]
Sun May :: - [info] * Phase 3.1: Getting Latest Slaves Phase..
Sun May :: - [info]
Sun May :: - [debug] Fetching current slave status..
Sun May :: - [debug] Fetching current slave status done.
Sun May :: - [info] The latest binary log file/position on all slaves is log.:
Sun May :: - [info] Retrieved Gtid Set: 191f7a9f-ffa2-11e5-a825-00163e00242a:-
Sun May :: - [info] Latest slaves (Slaves that received relay log files to the latest):
Sun May :: - [info] slave1(10.24.220.70:) Version=5.7.-log (oldest major version between slaves) log-bin:enabled
Sun May :: - [info] GTID ON
Sun May :: - [debug] Relay log info repository: FILE
Sun May :: - [info] Replicating from 10.24.220.232(10.24.220.232:)
Sun May :: - [info] Primary candidate for the new Master (candidate_master is set)
Sun May :: - [info] slave2(10.169.214.33:) Version=5.7.-log (oldest major version between slaves) log-bin:enabled
Sun May :: - [info] GTID ON
Sun May :: - [debug] Relay log info repository: FILE
Sun May :: - [info] Replicating from 10.24.220.232(10.24.220.232:)
Sun May :: - [info] Not candidate for the new Master (no_master is set)
Sun May :: - [info] The oldest binary log file/position on all slaves is log.:
Sun May :: - [info] Retrieved Gtid Set: 191f7a9f-ffa2-11e5-a825-00163e00242a:-
Sun May :: - [info] Oldest slaves:
Sun May :: - [info] slave1(10.24.220.70:) Version=5.7.-log (oldest major version between slaves) log-bin:enabled
Sun May :: - [info] GTID ON
Sun May :: - [debug] Relay log info repository: FILE
Sun May :: - [info] Replicating from 10.24.220.232(10.24.220.232:)
Sun May :: - [info] Primary candidate for the new Master (candidate_master is set)
Sun May :: - [info] slave2(10.169.214.33:) Version=5.7.-log (oldest major version between slaves) log-bin:enabled
Sun May :: - [info] GTID ON
Sun May :: - [debug] Relay log info repository: FILE
Sun May :: - [info] Replicating from 10.24.220.232(10.24.220.232:)
Sun May :: - [info] Not candidate for the new Master (no_master is set)
Sun May :: - [info]
Sun May :: - [info] * Phase 3.3: Determining New Master Phase..
Sun May :: - [info]
Sun May :: - [info] Searching new master from slaves..
Sun May :: - [info] Candidate masters from the configuration file:
Sun May :: - [info] slave1(10.24.220.70:) Version=5.7.-log (oldest major version between slaves) log-bin:enabled
Sun May :: - [info] GTID ON
Sun May :: - [debug] Relay log info repository: FILE
Sun May :: - [info] Replicating from 10.24.220.232(10.24.220.232:)
Sun May :: - [info] Primary candidate for the new Master (candidate_master is set)
Sun May :: - [info] Non-candidate masters:
Sun May :: - [info] slave2(10.169.214.33:) Version=5.7.-log (oldest major version between slaves) log-bin:enabled
Sun May :: - [info] GTID ON
Sun May :: - [debug] Relay log info repository: FILE
Sun May :: - [info] Replicating from 10.24.220.232(10.24.220.232:)
Sun May :: - [info] Not candidate for the new Master (no_master is set)
Sun May :: - [info] Searching from candidate_master slaves which have received the latest relay log events..
Sun May :: - [info] New master is slave1(10.24.220.70:)
Sun May :: - [info] Starting master failover..
Sun May :: - [info]
From:
server1(10.24.220.232:) (current master)
+--slave1(10.24.220.70:)
+--slave2(10.169.214.33:) To:
slave1(10.24.220.70:) (new master)
+--slave2(10.169.214.33:)
Sun May :: - [info]
Sun May :: - [info] * Phase 3.3: New Master Recovery Phase..
Sun May :: - [info]
Sun May :: - [info] Waiting all logs to be applied..
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [info] done.
Sun May :: - [debug] Stopping slave IO/SQL thread on slave1(10.24.220.70:)..
Sun May :: - [debug] done.
Sun May :: - [info] Getting new master's binlog name and position..
Sun May :: - [info] log.:
Sun May :: - [info] All other slaves should start replication from here. Statement should be: CHANGE MASTER TO MASTER_HOST='slave1 or 10.24.220.70', MASTER_PORT=, MASTER_AUTO_POSITION=, MASTER_USER='repl', MASTER_PASSWORD='xxx';
Sun May :: - [info] Master Recovery succeeded. File:Pos:Exec_Gtid_Set: log., , 191f7a9f-ffa2-11e5-a825-00163e00242a:-
Sun May :: - [info] Executing master IP activate script:
Sun May :: - [info] /usr/local/bin/master_ip_failover --command=start --ssh_user=root --orig_master_host=server1 --orig_master_ip=10.24.220.232 --orig_master_port= --new_master_host=slave1 --new_master_ip=10.24.220.70 --new_master_port= --new_master_user='root' --new_master_password=''
Unknown option: new_master_user
Unknown option: new_master_password IN SCRIPT TEST====/sbin/ifconfig eth0: down==/sbin/ifconfig eth0: 10.24.220.100/=== Enabling the VIP - 10.24.220.100/ on the new master - slave1
Sun May :: - [info] OK.
Sun May :: - [info] Setting read_only= on slave1(10.24.220.70:)..
Sun May :: - [info] ok.
Sun May :: - [info] ** Finished master recovery successfully.
Sun May :: - [info] * Phase : Master Recovery Phase completed.
Sun May :: - [info]
Sun May :: - [info] * Phase : Slaves Recovery Phase..
Sun May :: - [info]
Sun May :: - [info]
Sun May :: - [info] * Phase 4.1: Starting Slaves in parallel..
Sun May :: - [info]
Sun May :: - [info] -- Slave recovery on host slave2(10.169.214.33:) started, pid: . Check tmp log /var/log/masterha/app1/slave2_3306_20160515204944.log if it takes time..
Sun May :: - [info]
Sun May :: - [info] Log messages from slave2 ...
Sun May :: - [info]
Sun May :: - [info] Resetting slave slave2(10.169.214.33:) and starting replication from the new master slave1(10.24.220.70:)..
Sun May :: - [debug] Stopping slave IO/SQL thread on slave2(10.169.214.33:)..
Sun May :: - [debug] done.
Sun May :: - [info] Executed CHANGE MASTER.
Sun May :: - [debug] Starting slave IO/SQL thread on slave2(10.169.214.33:)..
Sun May :: - [debug] done.
Sun May :: - [info] Slave started.
Sun May :: - [info] gtid_wait(191f7a9f-ffa2-11e5-a825-00163e00242a:-) completed on slave2(10.169.214.33:). Executed events.
Sun May :: - [info] End of log messages from slave2.
Sun May :: - [info] -- Slave on host slave2(10.169.214.33:) started.
Sun May :: - [info] All new slave servers recovered successfully.
Sun May :: - [info]
Sun May :: - [info] * Phase : New master cleanup phase..
Sun May :: - [info]
Sun May :: - [info] Resetting slave info on the new master..
Sun May :: - [debug] Clearing slave info..
Sun May :: - [debug] Stopping slave IO/SQL thread on slave1(10.24.220.70:)..
Sun May :: - [debug] done.
Sun May :: - [debug] SHOW SLAVE STATUS shows new master does not replicate from anywhere. OK.
Sun May :: - [info] slave1: Resetting slave info succeeded.
Sun May :: - [info] Master failover to slave1(10.24.220.70:) completed successfully.
Sun May :: - [info] Deleted server1 entry from /etc/masterha/app1.conf .
Sun May :: - [debug] Disconnected from slave1(10.24.220.70:)
Sun May :: - [debug] Disconnected from slave2(10.169.214.33:)
Sun May :: - [info] ----- Failover Report ----- app1: MySQL Master failover server1(10.24.220.232:) to slave1(10.24.220.70:) succeeded Master server1(10.24.220.232:) is down! Check MHA Manager logs at monitor:/var/log/masterha/app1/manager.log for details. Started automated(non-interactive) failover.
Invalidated master IP address on server1(10.24.220.232:)
Selected slave1(10.24.220.70:) as a new master.
slave1(10.24.220.70:): OK: Applying all logs succeeded.
slave1(10.24.220.70:): OK: Activated master IP address.
slave2(10.169.214.33:): OK: Slave started, replicating from slave1(10.24.220.70:)
slave1(10.24.220.70:): Resetting slave info succeeded.
Master failover to slave1(10.24.220.70:) completed successfully.

mha 自动failover 原创的更多相关文章

  1. MHA自动Failover过程解析(updated) 转

    允许转载, 转载时请以超链接形式标明文章原始出处和网站信息 http://www.mysqlsystems.com/2012/03/figure-out-process-of-autofailover ...

  2. MySQL高可用方案MHA自动Failover与手动Failover的实践及原理

    集群信息 角色                             IP地址                 ServerID      类型 Master                     ...

  3. 【MySql】——MHA+GTID+failover+binlog-server+Atlas

    一.环境准备 1.mysql-db01 #系统版本 [root@mysql-db01 ~]# cat /etc/redhat-release CentOS release 6.7 (Final) #内 ...

  4. MHA 安装过程 原创

    root@monitor yum.repos.d]# cat CentOS-Base.repo [base]name=CentOS-$releasever - Basefailovermethod=p ...

  5. MHA手动切换 原创1(主故障)

    MHA提供了3种方式用于实现故障转移,分别自动故障转移,需要启用MHA监控: 在无监控的情况下的手动故障转移以及基于在线手动切换. 三种方式可以应对MySQL主从故障的任意场景.本文主要描述在无监控的 ...

  6. 利用XAG在RAC环境下实现GoldenGate自动Failover

    概述 在RAC环境下配置OGG,要想实现RAC节点故障时,OGG能自动的failover到正常节点,要保证两点: 1. OGG的checkpoint,trail,BR文件放置在共享的集群文件系统上,R ...

  7. Redis主从自动failover

    Redis主从架构持久化存在一个问题,即前次测试的结论,持久化需要配置在主实例上才能跨越实例保证数据不丢失,这样以来主实例在持久化数据到硬 盘的过程中,势必会造成磁盘的I/O等待,经过实际测试,这个持 ...

  8. MHA自动切换流程

    MHA的全名叫做mysql-master-ha,配置后可以在10-30秒内完成master自动切换,切换过程如下: 1. 检测master的状态,方法是一秒一次“ SELECT 1 As Value” ...

  9. MHA手动切换 原创4 (非交互式切换)

    非交互式切换:不输 YES 或者 NO [root@monitor app1]# masterha_master_switch --conf=/etc/masterha/app1.conf --mas ...

随机推荐

  1. Keep the Customer Satisfied

    题意: n个订单,每个订单有完成需要的天数,和限制的天数,求最多能完成多少订单 分析: 先按限制日期升序排列,若当前订单不能完成,和上面已选中的订单中需要天数中最大的比较,若比它小,则替换他. #in ...

  2. 《零成本实现Web自动化测试--基于Selenium》第三章 Selenium-IDE

    1.简介 Selenium-IDE(集成开发环境)是一种开发selenium测试案例的工具.是一种易用的Firefox插件.你可以通过文字菜单,在当前页面上选择一个UI元素,接着挑选与UI元素相关的s ...

  3. CSS hack大全

    1.什么是CSS hack? CSS hack是通过在CSS样式中加入一些特殊的符号,让不同的浏览器识别不同的符号(什么样的浏览器识别什么样的符号是有标准的,CSS hack就是让你记住这个标准),以 ...

  4. ios游戏开发--cocos2d学习(1)

    学习cocos2d需要一定的编程基础,最好了解objective-c的语法.至于下载和安装的过程网上有很多,这里不多介绍,直接进入项目的学习. 创建一个cocos2d项目,直接运行,效果如图: 左下角 ...

  5. canvas 模拟小球上抛运动的物理效果

    最近一直想用学的canvas做一个漂亮的小应用,但是,发现事情并不是想的那么简单.比如,游戏的逼真效果,需要自己来coding…… 所以,自己又先做了一个小demo,算是体验一下亲手打造物理引擎的感觉 ...

  6. bzoj 1097 [POI2007]旅游景点atr(最短路,状压DP)

    [题意] 给定一个n点m边的无向图,要求1开始n结束而且顺序经过k个点,给出经过关系x,y代表y必须在x之后经过,求最短路. [思路] 先对k个点进行spfa求出最短路. 设f[s][i]代表经过点集 ...

  7. 暴雪hash算法

    你有一个非常大的字符串数组A,现在又有一个字符串B,需要你去检测B是否存在于A中.最简单粗暴的方法是遍历整个A,但是这个方法投入到实际应用时的运行速度是难以接受的.在没有与其他所有字符串比较前怎么知道 ...

  8. commons-lang3-3.4.jar

    StringUtils 1.StringUtils.isBlank(str); 检查字符串是否为空白(“ ”),为空(“”),为null. * StringUtils.isBlank(null)    ...

  9. gratitute

    韩信帮刘邦夺得天下,最终又得到了什么?姑且不问当初刘邦拜将是何心态?虽然他的所拜之相并不是的那边从芒砀山带下来的哥们或是在沛县时候一起打混的兄弟? 韩信在汉军营得以重用,在项羽处屈其才,此真正的原因在 ...

  10. PC问题-可以PING通IP,PING名字不通,可以远程,但不能访问共享文件夹?

    问题现象:可以PING通IP,PING名字不通,可以远程,但不能访问共享文件夹? 问题原因:目标主机中NetLogon服务未启动. 问题处理:远程打开目标主机,“我的电脑-管理-服务-启动(改为自动) ...