您的位置:首页 > 数据库 > MySQL

mysql-mmm的6种状态及转变原因

2015-07-06 10:16 656 查看
mysql-mmm有6种状态
1.online
2.admin_offline
3.hard_offline
4.awaiting_recovery
5.replication_delay
6.replication_fail

各种状态的转换如下:
1.online状态是正常的状态,可以充当各种角色.
2.admin_offline是手动下线的状态
3.复制延迟会导致replication_delay状态
4.复制中断(sql_thread,io_thread)会导致replication_fail状态
5.从replication_delay或者replication_fail状态可以直接恢复到online状态,除非主机被设置为抖动.
6.ping不通并且(或者)mysql连接中断,会导致hard_offline状态.
7.如果能ping通,并且mysql连接状态正常,则会变成为awaiting_recovery状态.
8.两种情况可以从awaiting_recovery状态转变为online状态:
a.故障时间少于60秒并且没有重启过.
b.设置了auto_set_online > 0(抖动状态除外)

参考:
ONLINE
Host is running without any problems.
ADMIN_OFFLINE
host was set to offline manually.
HARD_OFFLINE
Host is offline (Check ping and/or mysql failed)
AWAITING_RECOVERY
Host is awaiting recovery
REPLICATION_DELAY
replication backlog is too big (Check rep_backlog failed)
REPLICATION_FAIL
replication threads are not running (Check rep_threads failed)
Only hosts with state ONLINE may have roles. When a host switches from ONLINE to any other state, all roles will be removed from it.
A host that was in state REPLICATION_DELAY or REPLICATION_FAIL will be switched back to ONLINE if everything is OK again, unless it is flapping (see Flapping).
A host that was in state HARD_OFFLINE will be switched to AWAITING_RECOVERY if everything is OK again. If its downtime was shorter than 60 seconds and it wasn't rebooted or auto_set_online is > 0 it will be switched back to ONLINE automatically, unless it is flapping (see Flapping again).
Replication backlog or failure on the active master isn't considered to be a problem, so the active master will never be in state REPLICATION_DELAY or REPLICATION_FAIL.
Replication backlog or failure will be ignored on hosts whos peers got ONLINE less than 60 seconds ago (That's the default value of master-connect-retry).
If both checks rep_backlog and rep_threads fail, the state will change to REPLICATION_FAIL.

If auto_set_online is > 0, flapping hosts will automatically be set to ONLINE after flap_duration seconds.

源文档 <http://mysql-mmm.org/mysql-mmm.html>

本文出自 “运维者说:从菜鸟到老鸟” 博客,请务必保留此出处http://liuqunying.blog.51cto.com/3984207/1671212
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: