1. Oracle Engine,OCR,VOTE 백업 수행

 

1) ocr/vote 백업

백업수행: $ORACLE_HOME/bin/ocrconfig -manualbackup
백업위치확인: $ORACLE_HOME/bin/ocrconfig -showbackup

2) oracle, oragrid 엔진 백업
/oracle, /oragrid 영역 전체를 tar로 묶음

[디렉토리 권한에 문제 발생시]

1) oragrid

# chown -R oragrid:dba $GRID_HOME
# chmod -R 755 $GRID_HOME
-- 이후 정상적인 퍼미션으로 변경
# cd <GRID_HOME>/crs/install/
# ./rootcrs.pl -init

2) oracle

# chown -R oracle:dba $ORACLE_HOME
# chmod -R 755 $ORACLE_HOME
-- 이후 정상적인 퍼미션으로 변경
a) relink all 수행 (oracle user)
$ relink all

3) oraInventory

# chown -R oragrid:dba $oraInventory_home
# $oraInventory_home/orainstRoot.sh

 

2. Oracle Engine,OCR,VOTE 복구 수행

 

0) grid / oracle / oraInventory 압축 해제 

tar xvfp <grid_home> 
tar xvfp <oracle_home> 
tar xvfp <oraInventory>

1) shared volume 확인 (oragrid user)

# $ORACLE_HOME/bin/cluvfyrac.sh comp ssa -n testdb1,testdb2 -s /dev/rhdisksys1

# $ORACLE_HOME/bin/cluvfyrac.sh comp ssa -n testdb1,testdb2 -s /dev/rhdisksys2

2. crs exclusive mode로 open (root user)

# $CRS_HOME/bin/crsctl start crs -excl -nocrs

3. ocr/vote diskgroup 생성 (oragrid user)

$ sqlplus / as sysasm
SQL> alter system set asm_diskstring='/dev/*sys*' scope=memory sid='*';
SQL> create diskgroup ASM_CRS external redundancy disk '/dev/rhdisksys1','/dev/rhdisksys2' attribute COMPATIBLE.ASM' = '11.2';
SQL> exit;

4. crs restore (root user)

# cd $GRID_HOME/cdata/<cluster name>/
# ocrconfig -restore <backup_20190610_111155.ocr>

5. vote disk 재생성 (1번 노드 / root)

# crsctl replace votedisk +ASM_CRS

6. asm spfile 재생성 (1번노드 / asm user)

 - ASM 경로 변경이 없다면 제외해도 됌

[init+ASM1.ora 파일]

*._disable_rebalance_compact=TRUE
*._enable_shared_pool_durations=FALSE 

+ASM2.asm_diskgroups='ASM_REDO','ASM_DATA','ASM_ARCH' #Manual Dismount
+ASM1.asm_diskgroups='ASM_REDO','ASM_DATA','ASM_ARCH' #Manual Dismount
*.diagnostic_dest='/oracle_log'
+ASM1.local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=testdb1-vip)(PORT=1521))))'
+ASM2.local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=testdb2-vip)(PORT=1521))))'
*.memory_target=0
*.pga_aggregate_target=419430400
*.sga_max_size=4G
*.sga_target=4294967296*._disable_rebalance_compact=TRUE
*._enable_shared_pool_durations=FALSE
+ASM2.asm_diskgroups='ASM_REDO','ASM_DATA','ASM_ARCH' #Manual Dismount
+ASM1.asm_diskgroups='ASM_REDO','ASM_DATA','ASM_ARCH' #Manual Dismount
*.diagnostic_dest='/oracle_log'
+ASM1.local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=testdb1-vip)(PORT=1521))))'
+ASM2.local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=testdb2-vip)(PORT=1521))))'
*.memory_target=0
*.pga_aggregate_target=419430400
*.sga_max_size=4G
*.sga_target=4294967296

$ sqlplus / as sysasm
SQL> create spfile='+ASM_CRS' from pfile='/ora_backup/init+ASM1.ora';

7. crs 재기동 (1번노드 / root)
# crsctl stop crs -f
-- 올리는건 1/2번 노드 양쪽에서 수행
# crsctl start crs

-- 검증
# crsctl check cluster -all
# crsctl query css votedisk

 

# Oracle 11G RAC Engine Backup/Recovery

# Copia de seguridad / recuperación de Oracle 11G RAC Engine

# Oracle 11G RAC引擎备份/恢复

# Oracle 11G RAC Engineバックアップ/リカバリ

# Oracle 11G RAC इंजन बैकअप / रिकवरी

블로그 이미지

운명을바꾸는자

IT와 함께 살아가는 삶

,


OCR, VOTE ASM Disk에서 RawDevice로 Disk 변경 TEST

  • 해당 TEST 내역은 개인적인 RAC 환경에서 진행한 내역으로 참고적으로 판단하여 사용하길 바란다.

   

1.OCR ASM Disk에서 RawDevice로 변경

OCR 상태조회

[root@rac1 bin]# ./ocrcheck

   

OCR Disk 변경

[root@rac1 bin]# ./ocrconfig -add /dev/OCR/ocr1

[root@rac1 bin]# ./ocrconfig -add /dev/OCR/ocr2

[root@rac1 bin]# ./ocrcheck

   

③ OCR ASM Disk 제거

[root@rac1 bin]# ./ocrconfig -delete +DATA

[root@rac1 bin]# ./ocrcheck

   

2.Vote ASM Disk에서 RawDevice로 변경

Vote ASM DISK Replace 진행(에러)

[root@rac1 bin]# ./crsctl replace votedisk /dev/VOTE/vote1

Now formatting voting disk: /dev/VOTE/vote1.

CRS-4256: Updating the profile

CRS-4602: Failed 27 to add voting file 2448120a036d4f11bf362b1db9d6ff0f.

Failure 27 with Cluster Synchronization Services while deleting voting disk.

Failure 27 with Cluster Synchronization Services while deleting voting disk.

Failure 27 with Cluster Synchronization Services while deleting voting disk.

CRS-4000: Command Replace failed, or completed with errors.

[root@rac1 bin]#

   

에러발생시에 아래와 동일하게 진행

   

Vote ASM DISK Replace 진행 (RAC1,RAC2 모두 STOP 이후 진행)

[CRS 재기동]

[root@rac1 bin]# ./crsctl start crs -excl -nocrs (crsctl stop crs 를 진행 이후)

CRS-4123: Oracle High Availability Services has been started.

CRS-2672: Attempting to start 'ora.mdnsd' on 'rac1'

CRS-2676: Start of 'ora.mdnsd' on 'rac1' succeeded

CRS-2672: Attempting to start 'ora.gpnpd' on 'rac1'

CRS-2676: Start of 'ora.gpnpd' on 'rac1' succeeded

CRS-2672: Attempting to start 'ora.cssdmonitor' on 'rac1'

CRS-2672: Attempting to start 'ora.gipcd' on 'rac1'

CRS-2676: Start of 'ora.cssdmonitor' on 'rac1' succeeded

CRS-2676: Start of 'ora.gipcd' on 'rac1' succeeded

CRS-2672: Attempting to start 'ora.cssd' on 'rac1'

CRS-2672: Attempting to start 'ora.diskmon' on 'rac1'

CRS-2676: Start of 'ora.diskmon' on 'rac1' succeeded

CRS-2676: Start of 'ora.cssd' on 'rac1' succeeded

[root@rac1 bin]#

[root@rac1 bin]#

   

[Vote disk 상태 확인]

[root@rac1 bin]# ./crsctl query css votedisk

[root@rac1 bin]#

[root@rac1 bin]#

   

[Vote Disk Replace, RawDevice로 변경]

[root@rac1 bin]# ./crsctl replace votedisk /dev/VOTE/vote1

[root@rac1 bin]# ./crsctl replace votedisk /dev/VOTE/vote2

[root@rac1 bin]# ./crsctl replace votedisk /dev/VOTE/vote3

   

CRS 정상 기동 확인

[root@rac1 bin]# ./crsctl stop crs

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'rac1'

CRS-2673: Attempting to stop 'ora.cssd' on 'rac1'

CRS-2673: Attempting to stop 'ora.mdnsd' on 'rac1'

CRS-2677: Stop of 'ora.cssd' on 'rac1' succeeded

CRS-2673: Attempting to stop 'ora.gipcd' on 'rac1'

CRS-2677: Stop of 'ora.mdnsd' on 'rac1' succeeded

CRS-2677: Stop of 'ora.gipcd' on 'rac1' succeeded

CRS-2673: Attempting to stop 'ora.gpnpd' on 'rac1'

CRS-2677: Stop of 'ora.gpnpd' on 'rac1' succeeded

CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'rac1' has completed

CRS-4133: Oracle High Availability Services has been stopped.

[root@rac1 bin]#
[root@rac1 bin]# ./crsctl start crs

(생략)

..

[root@rac1 bin]# ./crsctl query css votedisk

 

   

[RAC 1번 작업 이후 2번에서도 해주어야 된다!]


블로그 이미지

운명을바꾸는자

IT와 함께 살아가는 삶

,