標籤:mysql
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
mysql-mmm的6種狀態及轉變原因