문서유형ㅣ기술정보
분야ㅣ설치
적용제품버전ㅣTibero 7FS04PS
문서번호ㅣPINTI010
개요
Source DB(TAC)에서 Target DB(TAC)로 단방향 동기화 구성에서 CM Failover 설정 방법에 대해 기술하였습니다.
본 문서는 "4편 CM Failover 테스트"에 대해 기술하였습니다.
- 1편 : Prosync 설치 준비 및 Agent 설치
- 2편 : Instanct 설치
- 3편 : CM Failover 설정
- 4편 : CM Failover 테스트
테스트 환경
| 구분 | OS | IP | DBMS Version | Prosync Version |
|---|---|---|---|---|
| Source_TAC0 | Rocky Linux release 8.10 | 10.10.10.61 | Tibero 7.2.4 (build 305455) | 4.6.0 (build 308985) |
| Source_TAC1 | Rocky Linux release 8.10 | 10.10.10.62 | Tibero 7.2.4 (build 305455) | 4.6.0 (build 308985) |
| Target_TAC0 | Rocky Linux release 8.10 | 10.10.10.63 | Tibero 7.2.4 (build 305455) | 4.6.0 (build 308985) |
| Target_TAC1 | Rocky Linux release 8.10 | 10.10.10.64 | Tibero 7.2.4 (build 305455) | 4.6.0 (build 308985) |
참고
Prosync CM Failover 기능은 Prosync 4.3 이상 버전부터 지원됩니다.
방법
CM Failover 테스트
1. Source_TAC0 DOWN
Source TAC에서 0번 노드에 대한 db & cm down 상황에서 CM Failover 동작을 확인합니다.
1-1. Source_TAC prosync 프로세스 상태 확인
-- source node#0 prosync 프로세스 확인 $ ps -ef | grep prs tibero 965072 1 0 07:45 ? 00:00:00 prs_agent src_agent1 tibero 965151 965072 0 07:45 ? 00:00:00 prs_ext PRS_FAILOVER 1 src_agent1 tibero 965165 965072 0 07:45 ? 00:00:00 prs_llob PRS_FAILOVER 1 src_agent1 tibero 970098 846411 0 07:50 pts/2 00:00:00 grep --color=auto prs -- source node#1 prosync 프로세스 확인 $ ps -ef | grep prs tibero 954562 1 0 07:45 ? 00:00:00 prs_agent src_agent2 tibero 954621 954562 0 07:45 ? 00:00:00 prs_ext PRS_FAILOVER 2 src_agent2 tibero 959694 471337 0 07:51 pts/0 00:00:00 grep --color=auto prs
1-2. Source_TAC0 DB & CM DOWN
-- source node#0 db down $ tbdown immediate Tibero instance terminated (IMMEDIATE mode). -- source node#0 cm down $ tbcm -d CM DOWN SUCCESS!
1-3. Source_TAC prosync 프로세스 상태 확인
-- source node#0 prosync 프로세스 확인 $ ps -ef | grep prs tibero 970966 846411 0 07:51 pts/2 00:00:00 grep --color=auto prs -- source node#1 prosync 프로세스 확인 $ ps -ef | grep prs tibero 954562 1 0 07:45 ? 00:00:00 prs_agent src_agent2 tibero 954621 954562 0 07:45 ? 00:00:00 prs_ext PRS_FAILOVER 2 src_agent2 tibero 960366 954562 11 07:51 ? 00:00:02 prs_ext PRS_FAILOVER 1 src_agent2 tibero 960370 954562 0 07:51 ? 00:00:00 prs_llob PRS_FAILOVER 1 src_agent2 tibero 960746 471337 0 07:52 pts/0 00:00:00 grep --color=auto prs
1-4. prs_adm 상태 확인
$ prs_adm ProSync 4 - Admin Utility TmaxData Corporation Copyright (c) 2024-. All rights reserved. Admin> status prs_agent ID: src_agent1, HOST: 10.10.10.61, PORT: 7600, CM_GROUP: SRC_CM, CM_ID: 0 is stopped prs_agent ID: src_agent2, HOST: 10.10.10.62, PORT: 7700, CM_GROUP: SRC_CM, CM_ID: 1 is running prs_agent ID: tar_agent1, HOST: 10.10.10.63, PORT: 7800, CM_GROUP: TAR_CM, CM_ID: 0 is running prs_agent ID: tar_agent2, HOST: 10.10.10.64, PORT: 7900, CM_GROUP: TAR_CM, CM_ID: 1 is running Instance ID: [PRS_FAILOVER] PRS_FAILOVER_ext1 (1) is running (prs_agent ID : src_agent2, HOST: 10.10.10.62, PORT: 7700) PRS_FAILOVER_ext2 (2) is running (prs_agent ID : src_agent2, HOST: 10.10.10.62, PORT: 7700) PRS_FAILOVER_apply1 (1) is running (prs_agent ID : tar_agent1, HOST: 10.10.10.63, PORT: 7800) PRS_FAILOVER_llob (1) is running (prs_agent ID : src_agent2, HOST: 10.10.10.62, PORT: 7700)
참고
cm failover가 되고나면 ext1가 상대 노드 2번 서버에서 기동되는데, ext log를 보면 아래와 같이 *.tlr 파일을 찾으며 동기화가 되지 않는 경우 발생합니다.
[03-09T00:26:39.209893] [REA-05] [I] txinfo found (/root/prosync4/var/PRS_FAILOVER/lr1/redo_data_13_0.tlr) [03-09T00:26:39.210079] [REA-05] [I] tli opened (flag:0x04, logblk_size:512, logblk_cnt:8) [03-09T00:26:39.210119] [REA-05] [E] tli_load_txinfo failed (rc:-3) [prs_ext_tread.c:1072]
- 원인 : CM Failover 기능을 사용할 경우에는 Prosync 바이너리와 TAC redo, Archivelog file이 양 노드가 모두 접근 가능한 shared Filesystem에 위치햐야 함
2. Source_TAC1 DOWN
Source TAC에서 1번 노드에 대한 db & cm down 상황에서 CM Failover 동작을 확인합니다.
2-1. Source_TAC prosync 프로세스 상태 확인
-- source node#0 prosync 프로세스 확인 $ ps -ef | grep prs tibero 965072 1 0 07:45 ? 00:00:00 prs_agent src_agent1 tibero 965151 965072 0 07:45 ? 00:00:00 prs_ext PRS_FAILOVER 1 src_agent1 tibero 965165 965072 0 07:45 ? 00:00:00 prs_llob PRS_FAILOVER 1 src_agent1 tibero 970098 846411 0 07:50 pts/2 00:00:00 grep --color=auto prs -- source node#1 prosync 프로세스 확인 $ ps -ef | grep prs tibero 954562 1 0 07:45 ? 00:00:00 prs_agent src_agent2 tibero 954621 954562 0 07:45 ? 00:00:00 prs_ext PRS_FAILOVER 2 src_agent2 tibero 959694 471337 0 07:51 pts/0 00:00:00 grep --color=auto prs
2-2. Source_TAC1 DB & CM DOWN
-- source node#1 db down $ tbdown immediate Tibero instance terminated (IMMEDIATE mode). -- source node#1 cm down $ tbcm -d CM DOWN SUCCESS!
2-3. Source_TAC prosync 프로세스 상태 확인
-- source node#0 prosync 프로세스 확인 $ ps -ef | grep prs tibero 978366 1 0 08:27 ? 00:00:00 prs_agent src_agent1 tibero 978476 978366 0 08:27 ? 00:00:01 prs_ext PRS_FAILOVER 1 src_agent1 tibero 978484 978366 0 08:27 ? 00:00:00 prs_llob PRS_FAILOVER 1 src_agent1 tibero 990974 978366 13 08:39 ? 00:00:00 prs_ext PRS_FAILOVER 2 src_agent1 tibero 991056 846411 0 08:40 pts/2 00:00:00 grep --color=auto prs -- source node#1 prosync 프로세스 확인 $ ps -ef | grep prs tibero 970966 846411 0 07:51 pts/2 00:00:00 grep --color=auto prs
2-4. prs_adm 상태 확인
$ prs_adm ProSync 4 - Admin Utility TmaxData Corporation Copyright (c) 2024-. All rights reserved. Admin> status prs_agent ID: src_agent1, HOST: 10.10.10.61, PORT: 7600, CM_GROUP: SRC_CM, CM_ID: 0 is running prs_agent ID: src_agent2, HOST: 10.10.10.62, PORT: 7700, CM_GROUP: SRC_CM, CM_ID: 1 is stopped prs_agent ID: tar_agent1, HOST: 10.10.10.63, PORT: 7800, CM_GROUP: TAR_CM, CM_ID: 0 is running prs_agent ID: tar_agent2, HOST: 10.10.10.64, PORT: 7900, CM_GROUP: TAR_CM, CM_ID: 1 is running Instance ID: [PRS_FAILOVER] PRS_FAILOVER_ext1 (1) is running (prs_agent ID : src_agent1, HOST: 10.10.10.61, PORT: 7600) PRS_FAILOVER_ext2 (2) is running (prs_agent ID : src_agent1, HOST: 10.10.10.61, PORT: 7600) PRS_FAILOVER_apply1 (1) is running (prs_agent ID : tar_agent1, HOST: 10.10.10.63, PORT: 7800) PRS_FAILOVER_llob (1) is running (prs_agent ID : src_agent1, HOST: 10.10.10.61, PORT: 7600)
3. Target_TAC0 DOWN
Target TAC에서 0번 노드에 대한 db & cm down 상황에서 CM Failover 동작을 확인합니다.
3-1. Target_TAC prosync 프로세스 상태 확인
-- target node#0 prosync 프로세스 확인 $ ps -ef | grep prs tibero 925564 1 1 08:33 ? 00:00:00 prs_agent tar_agent1 tibero 925642 925564 0 08:33 ? 00:00:00 prs_apply PRS_FAILOVER 1 tar_agent1 tibero 925866 479606 0 08:33 pts/1 00:00:00 grep --color=auto prs -- target node#1 prosync 프로세스 확인 $ ps -ef | grep prs tibero 921553 1 15 08:34 ? 00:00:00 prs_agent tar_agent2 tibero 921629 764786 0 08:34 pts/2 00:00:00 grep --color=auto prs
3-2. Target_TAC0 DB & CM DOWN
-- target node#1 db down $ tbdown immediate Tibero instance terminated (IMMEDIATE mode). -- target node#1 cm down $ tbcm -d CM DOWN SUCCESS!
3-3. Target_TAC prosync 프로세스 상태 확인
-- target node#0 prosync 프로세스 확인 $ ps -ef | grep prs tibero 924889 479606 0 08:31 pts/1 00:00:00 grep --color=auto prs -- target node#1 prosync 프로세스 확인 $ ps -ef | grep prs tibero 900667 1 0 07:46 ? 00:00:00 prs_agent tar_agent2 tibero 919319 900667 0 08:28 ? 00:00:00 prs_apply PRS_FAILOVER 1 tar_agent2 tibero 920441 764786 0 08:31 pts/2 00:00:00 grep --color=auto prs
3-4. prs_adm 상태 확인
$ prs_adm ProSync 4 - Admin Utility TmaxData Corporation Copyright (c) 2024-. All rights reserved. Admin> status prs_agent ID: src_agent1, HOST: 10.10.10.61, PORT: 7600, CM_GROUP: SRC_CM, CM_ID: 0 is running prs_agent ID: src_agent2, HOST: 10.10.10.62, PORT: 7700, CM_GROUP: SRC_CM, CM_ID: 1 is running prs_agent ID: tar_agent1, HOST: 10.10.10.63, PORT: 7800, CM_GROUP: TAR_CM, CM_ID: 0 is stopped prs_agent ID: tar_agent2, HOST: 10.10.10.64, PORT: 7900, CM_GROUP: TAR_CM, CM_ID: 1 is running Instance ID: [PRS_FAILOVER] PRS_FAILOVER_ext1 (1) is running (prs_agent ID : src_agent1, HOST: 10.10.10.61, PORT: 7600) PRS_FAILOVER_ext2 (2) is running (prs_agent ID : src_agent2, HOST: 10.10.10.62, PORT: 7700) PRS_FAILOVER_apply1 (1) is running (prs_agent ID : tar_agent2, HOST: 10.10.10.64, PORT: 7900) PRS_FAILOVER_llob (1) is running (prs_agent ID : src_agent1, HOST: 10.10.10.61, PORT: 7600)
4. Target_TAC1 DOWN
Target TAC에서 1번 노드에 대한 db & cm down 상황에서 CM Failover 동작을 확인합니다.
4-1. Target_TAC prosync 프로세스 상태 확인
-- target node#0 prosync 프로세스 확인 $ ps -ef | grep prs tibero 925564 1 1 08:33 ? 00:00:00 prs_agent tar_agent1 tibero 925866 479606 0 08:33 pts/1 00:00:00 grep --color=auto prs -- target node#1 prosync 프로세스 확인 $ ps -ef | grep prs tibero 900667 1 0 07:46 ? 00:00:00 prs_agent tar_agent2 tibero 919319 900667 0 08:28 ? 00:00:00 prs_apply PRS_FAILOVER 1 tar_agent2 tibero 920441 764786 0 08:31 pts/2 00:00:00 grep --color=auto prs
4-2. Target_TAC1 DB & CM DOWN
-- target node#1 db down $ tbdown immediate Tibero instance terminated (IMMEDIATE mode). -- target node#1 cm down $ tbcm -d CM DOWN SUCCESS!
4-3. Target_TAC prosync 프로세스 상태 확인
-- target node#0 prosync 프로세스 확인 $ ps -ef | grep prs tibero 925564 1 1 08:33 ? 00:00:00 prs_agent tar_agent1 tibero 925642 925564 0 08:33 ? 00:00:00 prs_apply PRS_FAILOVER 1 tar_agent1 tibero 925866 479606 0 08:33 pts/1 00:00:00 grep --color=auto prs -- target node#1 prosync 프로세스 확인 $ ps -ef | grep prs tibero 924889 479606 0 08:31 pts/1 00:00:00 grep --color=auto prs
4-4. prs_adm 상태 확인
$ prs_adm ProSync 4 - Admin Utility TmaxData Corporation Copyright (c) 2024-. All rights reserved. Admin> status prs_agent ID: src_agent1, HOST: 10.10.10.61, PORT: 7600, CM_GROUP: SRC_CM, CM_ID: 0 is running prs_agent ID: src_agent2, HOST: 10.10.10.62, PORT: 7700, CM_GROUP: SRC_CM, CM_ID: 1 is running prs_agent ID: tar_agent1, HOST: 10.10.10.63, PORT: 7800, CM_GROUP: TAR_CM, CM_ID: 0 is running prs_agent ID: tar_agent2, HOST: 10.10.10.64, PORT: 7900, CM_GROUP: TAR_CM, CM_ID: 1 is stopped Instance ID: [PRS_FAILOVER] PRS_FAILOVER_ext1 (1) is running (prs_agent ID : src_agent1, HOST: 10.10.10.61, PORT: 7600) PRS_FAILOVER_ext2 (2) is running (prs_agent ID : src_agent2, HOST: 10.10.10.62, PORT: 7700) PRS_FAILOVER_apply1 (1) is running (prs_agent ID : tar_agent1, HOST: 10.10.10.63, PORT: 7800) PRS_FAILOVER_llob (1) is running (prs_agent ID : src_agent1, HOST: 10.10.10.61, PORT: 7600)