mariadb galera啟動問題


 

搭建了mariadb galera集群后,整個集群停掉后如何啟動呢,我們要先啟動那個節點呢,今天我嘗試把集群機器全部停掉,然后任意啟動一個節點,發現報如下的錯誤:

170620 21:32:55 [ERROR] WSREP: It may not be safe to bootstrap the cluster from this node. It was not the last one to leave the cluster and may not contain all the updates. To force cluster bootstrap with this node, edit the grastate.dat file manually and set safe_to_bootstrap to 1 .

意思該節點不是最后一個離開集群的節點(最后停掉的節點),可能沒有包含所有更新的數據,強制從該節點啟動,需要手工編輯grastate.dat文件,設置safe_to_bootstrap=1,當然了,我們不需需要強制從該節點啟動,我們逐一排查每個節點下的grastate.dat文件(該文件在data目錄下),找到safe_to_bootstrap=1的節點,然后在該節點上啟動即可.

比如我這里找到節點的是節點3
[root@hxl03 data]# more grastate.dat
# GALERA saved state
version: 2.1
uuid: 43caaa91-54bf-11e7-9321-c60bd8969b24
seqno: 2919
safe_to_bootstrap: 1

 

集群中第一台mariadb啟動方法:

/etc/init.d/mysql start --wsrep-new-cluster

集群中其它數據啟動方法:

/etc/init.d/mysql start


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM