Notice
Recent Posts
Recent Comments
Tags
- etcd
- 우파푸른하늘
- maxscale
- openldap
- docker
- MotD
- perplexity
- RHEL8
- banner
- CEP
- 웰카
- web&was apche htaccess
- 우파푸른하늘80만이벤트
- mgmtip
- Auth
- vmware
- Storage
- Galera Cluster
- n1548
- wildfly jboss
- snmp
- n15148
- drbd
- data-door
- port description
- unix_socket
- CentOS
- Kubernetes
- Path
- mariadb
- Network
- dell
- admin port
250x250
반응형
전산쟁이의 기억노트
corosync / pacemaker 기반의 DB이중화 본문
728x90
반응형
- 패키지 설치
- DB이중화 구성
- DB 모니터링을 위한 스크립트 설치
- $> vi /etc/init.d/db_check #!/bin/bash case "$1" in "start") echo "start" ;; "stop") echo "stop" ;; "status") mysql --connect-timeout 2 -u monitor -p'모니터 계정패스워드' -h localhost -Nse 'select now()' result_code=$? if [[ $result_code -eq 1 ]] then echo "[$(date +%Y-%m-%d-%H:%M:%S)] DB Connection Error" >> /var/log/db_check pcs resource move DB_GROUP {{ 상대방IP }} fi ;; *) echo "start|stop|status" exit 1 ;; esac
- DB이중화 구성을 위한 리소스 설정
- $> pcs cluster setup db_ha {{ DB1_IP }} {{ DB2_IP }} --force $> pcs cluster start --all $> pcs property set stonith-enabled=false $> pcs property set no-quorum-policy=ignore $> pcs resource defaults update resource-stickiness=100 $> pcs resource create DB_CHECK service:db_check op status timeout=10s interval=10s --group DB_GROUP $> pcs resource create DB_VIP ocf:heartbeat:IPaddr2 ip={{ DB_VIP }} cidr_netmask=32 op monitor interval=10s --group DB_GROUP
출처 - http://igoni.kr/books/dbms/page/corosync-pacemaker-db
corosync / pacemaker 기... | igoni.kr
패키지 설치 DB이중화 구성 DB 모니터링을 위한 스크립트 설치 $> vi /etc/init.d/db_check #!/bi...
igoni.kr
728x90
반응형
'mysql&mariadb' 카테고리의 다른 글
mysql to mariadb 업그레이드 수행 (0) | 2022.10.21 |
---|---|
mytop 설치하기 (0) | 2022.08.01 |
mysqlcheck 유틸리티 사용법 (0) | 2022.08.01 |
mysql에서 binlog 삭제 (0) | 2022.08.01 |
mysql utf8설정 (0) | 2022.08.01 |
Comments