Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1839676
  • 博文数量: 117
  • 博客积分: 2559
  • 博客等级: 少校
  • 技术积分: 4385
  • 用 户 组: 普通用户
  • 注册时间: 2010-08-13 20:08
个人简介

作为初学者,要想取得进步,成为高手,首先应该了解自己的不足之处.

文章分类

全部博文(117)

文章存档

2014年(1)

2013年(25)

2012年(13)

2011年(77)

2010年(1)

分类: Mysql/postgreSQL

2011-12-26 22:52:16

mysql-mmm6种状态

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 ).

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  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.

 

 

源文档 <

阅读(6567) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~