티스토리 뷰
어찌어찌 하여 운영중인 서버 3대가 동시에 리부팅되거나 mariadb 데몬이 죽은 경우 발생
먼저 1대는 galera_new_cluster 로 실행 (최신 데이터베이스로 가정)
나중 2대는 galera_recovery 실행후 mariadb 시작
MariaDB 홈페이지 관련 문서
Occasionally, you may have to restart the entire Galera Cluster. This may happen, for example, in the case of a power failure where every node is shut down and you have no mysqld process at all.
To restart an entire Galera Cluster, complete the following steps:
Identify the node with the most advanced node state ID.
Start the most advanced node as the first node of the cluster.
Start the rest of the node as usual.
제일 최신 노드를 찾아서 첫번째 노드로 실행시키고 나머지는 동일하게 실행
각 노드에서 확인
cat /var/lib/mysql/grastate.dat
db1
# GALERA saved state
version: 2.1
uuid: 08a203d1-b4d1-11e8-b949-6b171bcd90db
seqno: 439
safe_to_bootstrap: 1
db2
version: 2.1
uuid: 08a203d1-b4d1-11e8-b949-6b171bcd90db
seqno: -1
safe_to_bootstrap: 0
db3
version: 2.1
uuid: 08a203d1-b4d1-11e8-b949-6b171bcd90db
seqno: 439
safe_to_bootstrap: 0
syslog
[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
: db2 와 db3 는 galera_new_cluster 첫번째 노드 실행이 되지 않음
: safe_to_bootstrap: 0 부분을 1로 바꾸고 강제 시작 가능함
: safe_to_bootstrap :1 기준은 제일 마지막에 데몬이 종료된?
'Database' 카테고리의 다른 글
innochecksum (이노디비체크) (0) | 2018.10.01 |
---|---|
myisamchk (0) | 2018.09.27 |
mariadb (마리아디비) 설치 (0) | 2018.09.10 |
mariadb datadir 변경 (1) | 2018.09.04 |
mariadb TX / AX 차이 (0) | 2018.09.04 |
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- mariadb
- OpenVPN
- softether
- mod_security
- centOS7
- IPSEC
- 베이어다이나믹
- centos8
- kvm
- ssh
- 리눅스
- NGINX
- MySQL
- Apache
- virtualbox
- galera
- yum
- SSL
- iptables
- ntp
- glusterfs
- HAProxy
- pptp
- gitlab
- 인증서
- L2TP
- php
- GeoIP
- WAF
- cURL
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
글 보관함