"Ocr 과 voting"의 두 판 사이의 차이
DB CAFE
(→OCR 이란?) |
|||
(같은 사용자의 중간 판 2개는 보이지 않습니다) | |||
18번째 줄: | 18번째 줄: | ||
=== OCR 이란? === | === OCR 이란? === | ||
+ | # OCR은 RAC를 구성하는 정보를 저장하는 저장소 | ||
+ | # RAC 상의 모든 Node 들에 대한 cluster 구성정보를 저장하고 있는 저장소 | ||
+ | # OCR정보는 RAC 환경에서 매우 중요한 관리 항목으로 주기적인 백업을 받아 두어야함 | ||
+ | # 기본적으로 OCR 백업은 4시간 마다 자동으로 백업이 이루어 지며, 비상 상황을 대비하여 3벌의 백업을 자동으로 유지 관리함 | ||
+ | # OCR file은 root 소유로 되며 Oracle Cluster Repository의 약자로 말그대로 Cluster의 정보를 담고 있음 | ||
− | |||
− | |||
− | |||
− | |||
− | ==== OCR 현재 상태 확인 | + | |
+ | |||
+ | ==== OCR 현재 상태 확인 ==== | ||
ocrcheck 또는 ocrdump -stdout(현재 화면에 cat으로 읽은 것처럼 정보 나옴) | ocrcheck 또는 ocrdump -stdout(현재 화면에 cat으로 읽은 것처럼 정보 나옴) | ||
<source lang=sql> | <source lang=sql> | ||
[root@orcl ~]# ocrcheck | [root@orcl ~]# ocrcheck | ||
</source> | </source> | ||
+ | - ocrcheck 결과 "check succeeded" 가 마지막에 결과로 나오면 OCR이 이상없음을 의미 | ||
+ | - "Device/File Name" OCR File이 저장되어 있는 Diskgroup | ||
+ | - ocrcheck -detail 명령어를 수행하면 더 자세한 정보 확인 가능 | ||
+ | <source lang=sql> | ||
+ | # ocrcheck | ||
+ | Status of Oracle Cluster Registry is as follows : | ||
+ | Version : 3 | ||
+ | Total space (kbytes) : 262120 | ||
+ | Used space (kbytes) : 2844 | ||
+ | Available space (kbytes) : 259276 | ||
+ | ID : 737356714 | ||
+ | Device/File Name : +DGOCR1 | ||
+ | Device/File integrity check succeeded | ||
+ | Device/File Name : +DGOCR2 | ||
+ | Device/File integrity check succeeded | ||
+ | |||
+ | Device/File not configured | ||
+ | |||
+ | Device/File not configured | ||
+ | |||
+ | Device/File not configured | ||
+ | |||
+ | Cluster registry integrity check succeeded | ||
+ | |||
+ | Logical corruption check succeeded | ||
+ | </source> | ||
+ | |||
+ | ==== Node 무결성을 확인하는 방법 ==== | ||
+ | <source lang=sql> | ||
+ | # cluvfy comp ocr [ -n node_list] | ||
+ | </source> | ||
+ | * 결과 체크후 successful 이 추출된 것을 확인 할수 있으면 전체 node 무결성에 이상이 없음을 의미 | ||
+ | <source lang=sql> | ||
+ | # cluvfy comp ocr -n all -verbose | ||
+ | |||
+ | Verifying OCR Integrity ...PASSED | ||
+ | Verification of OCR integrity was successful. | ||
+ | ... 중략 | ||
+ | </source> | ||
+ | |||
+ | ==== OCR의 자동백업경로 확인 ==== | ||
+ | <source lang=sql> | ||
+ | # ocrconfig -showbackup | ||
+ | </source> | ||
+ | |||
+ | * rac1 " ocr bakcup date" "+DGOCR:/백업경로" | ||
+ | (백업주기 : backup00.ocr~backup02.ocr 4시간 간격 기본 3세트 유지,day.ocr 일 단위,week.ocr 주 단위) | ||
+ | |||
+ | |||
+ | ==== OCR 백업 경로 변경 ==== | ||
+ | <source lang=sql> | ||
+ | # ocrconfig -backuploc <경로> | ||
+ | </source> | ||
+ | |||
+ | |||
+ | ==== 수동 백업 진행==== | ||
+ | * 기존 백업 경로에 백업파일 생성 | ||
+ | <source lang=sql> | ||
+ | # ocrconfig -manualbackup | ||
+ | </source> | ||
+ | |||
+ | ==== OCR MIRROR ==== | ||
+ | * OCR 파일 추가하여 안정성 확보 | ||
+ | <source lang=sql> | ||
+ | # ocrconfig add <ASM diskgroup 명> | ||
+ | </source> | ||
+ | |||
+ | ==== OCR 삭제 ==== | ||
+ | <source lang=sql> | ||
+ | # ocrconfig -delete <file 명, ASM diskgroup 명> | ||
+ | </source> | ||
+ | |||
+ | ==== OCR 복원 ==== | ||
+ | 1) 백업 확인 | ||
+ | <source lang=sql> | ||
+ | # ocrconfig -showbackup | ||
+ | </source> | ||
+ | |||
+ | 2) Oracle Cluster 중지 | ||
+ | <source lang=sql> | ||
+ | # crsctl stop crs | ||
+ | </source> | ||
+ | |||
+ | 3) Oracle Cluster Exclusive mode 기동 | ||
+ | <source lang=sql> | ||
+ | # crsctl start crs -excl -nocrs | ||
+ | </source> | ||
+ | |||
+ | 4) OCR 복원 | ||
+ | <source lang=sql> | ||
+ | # ocrconfig -restore <백업경로/파일명> | ||
+ | |||
+ | 예시) | ||
+ | #ocrconfig -restore +DGOCR:/rac/OCRBACKUP/backup00.ocr.262.1136546851 | ||
+ | </source> | ||
+ | |||
+ | 5) Oracle Cluster 중지(Exclusive mode 중지 후 다시 기동) | ||
+ | <source lang=sql> | ||
+ | # crsctl stop crs | ||
+ | </source> | ||
+ | |||
+ | 6) Oracle Cluster 기동 | ||
+ | <source lang=sql> | ||
+ | # crsctl start crs | ||
+ | </source> | ||
+ | |||
+ | ==== OCR 무결성 검사 ==== | ||
+ | <source lang=sql> | ||
+ | # cluvfy comp ocr -n all | ||
+ | </source> | ||
+ | |||
− | [category:oracle] | + | [[category:oracle]] |
2024년 5월 27일 (월) 14:11 기준 최신판
thumb_up 추천메뉴 바로가기
- DBA { Oracle DBA 명령어 > DBA 초급 과정 > DBA 고급 과정 }
- 튜닝 { 오라클 튜닝 목록 }
- 모델링 { 데이터 모델링 가이드 }
목차
1 개념[편집]
OCR과 Voting Disk는 Oracle Cluster component 임
스토리지에서 OCR, Voting Disk부터 controlfile, datafile등의 순서로 Oracle은 파일들을 체크하면서 읽기 시작하고
OCR은 cluster와 cluster 내의 resource의 정보를 담고 있고 Voting Disk는 각 노드의 status를 확인하기 위해 사용함
1.1 Votiong 이란?[편집]
- Oracle 소유로(오라클 설치시 UID) 되며 장애시 어떤 Node를 제거할지 검사하는 용도로 사용
1.2 OCR 이란?[편집]
- OCR은 RAC를 구성하는 정보를 저장하는 저장소
- RAC 상의 모든 Node 들에 대한 cluster 구성정보를 저장하고 있는 저장소
- OCR정보는 RAC 환경에서 매우 중요한 관리 항목으로 주기적인 백업을 받아 두어야함
- 기본적으로 OCR 백업은 4시간 마다 자동으로 백업이 이루어 지며, 비상 상황을 대비하여 3벌의 백업을 자동으로 유지 관리함
- OCR file은 root 소유로 되며 Oracle Cluster Repository의 약자로 말그대로 Cluster의 정보를 담고 있음
1.2.1 OCR 현재 상태 확인[편집]
ocrcheck 또는 ocrdump -stdout(현재 화면에 cat으로 읽은 것처럼 정보 나옴)
[root@orcl ~]# ocrcheck
- ocrcheck 결과 "check succeeded" 가 마지막에 결과로 나오면 OCR이 이상없음을 의미 - "Device/File Name" OCR File이 저장되어 있는 Diskgroup - ocrcheck -detail 명령어를 수행하면 더 자세한 정보 확인 가능
# ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 2844
Available space (kbytes) : 259276
ID : 737356714
Device/File Name : +DGOCR1
Device/File integrity check succeeded
Device/File Name : +DGOCR2
Device/File integrity check succeeded
Device/File not configured
Device/File not configured
Device/File not configured
Cluster registry integrity check succeeded
Logical corruption check succeeded
1.2.2 Node 무결성을 확인하는 방법[편집]
# cluvfy comp ocr [ -n node_list]
- 결과 체크후 successful 이 추출된 것을 확인 할수 있으면 전체 node 무결성에 이상이 없음을 의미
# cluvfy comp ocr -n all -verbose
Verifying OCR Integrity ...PASSED
Verification of OCR integrity was successful.
... 중략
1.2.3 OCR의 자동백업경로 확인[편집]
# ocrconfig -showbackup
- rac1 " ocr bakcup date" "+DGOCR:/백업경로"
(백업주기 : backup00.ocr~backup02.ocr 4시간 간격 기본 3세트 유지,day.ocr 일 단위,week.ocr 주 단위)
1.2.7 OCR 삭제[편집]
# ocrconfig -delete <file 명, ASM diskgroup 명>
1.2.8 OCR 복원[편집]
1) 백업 확인
# ocrconfig -showbackup
2) Oracle Cluster 중지
# crsctl stop crs
3) Oracle Cluster Exclusive mode 기동
# crsctl start crs -excl -nocrs
4) OCR 복원
# ocrconfig -restore <백업경로/파일명>
예시)
#ocrconfig -restore +DGOCR:/rac/OCRBACKUP/backup00.ocr.262.1136546851
5) Oracle Cluster 중지(Exclusive mode 중지 후 다시 기동)
# crsctl stop crs
6) Oracle Cluster 기동
# crsctl start crs
1.2.9 OCR 무결성 검사[편집]
# cluvfy comp ocr -n all