본문 바로가기
Oracle/백업&복구

[ASM] OCR backup & restore

by 취미툰 2024. 7. 18.
반응형

 

출처 : How to Restore ASM Based OCR when OCR backup is located in ASM diskgroup? (Doc ID 2569847.1)

출처 : How to Restore ASM Based OCR After Complete Loss of the CRS Diskgroup on Linux/Unix Systems (Doc ID 1062983.1)

 

위의 문서를 참조하여 직접 asm diskgroup 의 OCR자료를 백업 및 복구할 일이 있어서 수행하였습니다.

현상은 ASM 스토리지영역의 재구성으로 인한 안에 자료가 다 날아간 상황이며, 백업본으로 새 diskgroup을 생성하여 그곳에 restore하여 asm resource를 복원하는 방법입니다.

 

DB : 12.2.0.1 

OS : AIX

 

1) 수행 전 crsctl stat 확인

$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       dbarac1                  STABLE
               ONLINE  ONLINE       dbarac2                  STABLE
ora.DG_ACFS01.VOL_ACFS_01.advm
               ONLINE  ONLINE       dbarac1                  STABLE
               ONLINE  ONLINE       dbarac2                  STABLE
ora.DG_ACFS01.dg
               ONLINE  ONLINE       dbarac1                  STABLE
               ONLINE  ONLINE       dbarac2                  STABLE
ora.DG_DATA01.dg
               ONLINE  ONLINE       dbarac1                  STABLE
               ONLINE  ONLINE       dbarac2                  STABLE
ora.DG_MGMT.dg
               ONLINE  ONLINE       dbarac1                  STABLE
               ONLINE  ONLINE       dbarac2                  STABLE
ora.DG_OCR.dg
               ONLINE  ONLINE       dbarac1                  STABLE
               ONLINE  ONLINE       dbarac2                  STABLE
ora.DG_RECO01.dg
               ONLINE  ONLINE       dbarac1                  STABLE
               ONLINE  ONLINE       dbarac2                  STABLE
ora.LISTENER_DBARAC.lsnr
               ONLINE  ONLINE       dbarac1                  STABLE
               ONLINE  ONLINE       dbarac2                  STABLE
ora.dg_acfs01.vol_acfs_01.acfs
               ONLINE  ONLINE       dbarac1                  mounted on /ora_acfs
                                                             ,STABLE
               ONLINE  ONLINE       dbarac2                  mounted on /ora_acfs
                                                             ,STABLE
ora.net1.network
               ONLINE  ONLINE       dbarac1                  STABLE
               ONLINE  ONLINE       dbarac2                  STABLE
ora.ons
               ONLINE  ONLINE       dbarac1                  STABLE
               ONLINE  ONLINE       dbarac2                  STABLE
ora.proxy_advm
               ONLINE  ONLINE       dbarac1                  STABLE
               ONLINE  ONLINE       dbarac2                  STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       dbarac2                  STABLE
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       dbarac1                  STABLE
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       dbarac1                  STABLE
ora.MGMTLSNR
      1        ONLINE  ONLINE       dbarac1                  169.254.7.255 192.16
                                                             8.100.1,STABLE
ora.asm
      1        ONLINE  ONLINE       dbarac1                  Started,STABLE
      2        ONLINE  ONLINE       dbarac2                  Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       dbarac1                  STABLE
ora.dbarac.db
      1        ONLINE  ONLINE       dbarac1                  Open,HOME=/oracle/db
                                                             /product/12.2.0,STAB
                                                             LE
      2        ONLINE  ONLINE       dbarac2                  Open,HOME=/oracle/db
                                                             /product/12.2.0,STAB
                                                             LE
ora.dbarac.svcbatch.svc
      2        ONLINE  ONLINE       dbarac2                  STABLE
ora.dbarac.svcetl.svc
      2        ONLINE  ONLINE       dbarac1                  STABLE
      3        ONLINE  ONLINE       dbarac2                  STABLE
ora.dbarac1.vip
      1        ONLINE  ONLINE       dbarac1                  STABLE
ora.dbarac2.vip
      1        ONLINE  ONLINE       dbarac2                  STABLE
ora.mgmtdb
      1        ONLINE  ONLINE       dbarac1                  Open,STABLE
ora.qosmserver
      1        ONLINE  ONLINE       dbarac1                  STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       dbarac2                  STABLE
ora.scan2.vip
      1        ONLINE  ONLINE       dbarac1                  STABLE
ora.scan3.vip
      1        ONLINE  ONLINE       dbarac1                  STABLE
--------------------------------------------------------------------------------

 

2)

12c부터는 기본적으로 ASM에 OCR 백업이 받게됩니다. ASM이 연결가능한 상황이라면 그대로 두면 상관없겠지만 ASM 스토리지가 재구성되는 경우에는 안에 내용이 다 날라갔을것이기 때문에 local로 파일을 백업받는 경우가 필요하게 됩니다.

기본적으로 자동백업을 수행하고 있으며 ocrconfig -showbackup 명령어로 리스트를 확인할 수 있습니다.

--root로 수행
# ocrconfig -showbackup

dbarac1     2024/07/16 16:05:08     +DG_MGMT:/dbarac/OCRBACKUP/backup00.ocr.283.1174493105     1353329223

dbarac1     2024/07/16 12:05:02     +DG_MGMT:/dbarac/OCRBACKUP/backup01.ocr.287.1174478699     1353329223

dbarac1     2024/07/16 08:04:58     +DG_MGMT:/dbarac/OCRBACKUP/backup02.ocr.291.1174464295     1353329223

dbarac1     2024/07/15 12:04:31     +DG_MGMT:/dbarac/OCRBACKUP/day.ocr.282.1174392273     1353329223

dbarac1     2024/07/08 12:00:53     +DG_MGMT:/dbarac/OCRBACKUP/week.ocr.284.1173787255     1353329223

dbarac1     2021/08/03 17:18:12     +DG_MGMT:/dbarac/OCRBACKUP/backup_20210803_171812.ocr.289.1079630293     1353329223

dbarac1     2021/08/03 14:22:56     +DG_MGMT:/dbarac/OCRBACKUP/backup_20210803_142256.ocr.288.1079619777     3965334461

dbarac1     2021/08/02 23:16:40     +DG_MGMT:/dbarac/OCRBACKUP/backup_20210802_231640.ocr.281.1079565401     0

 

+DG_MGMT에 정보가 있으므로 amdu 명령어로 백업을 수행합니다.

명령어 수행시 명령어를 날린 곳에 디렉토리가 생기고 .f형식의 파일이 생깁니다. 이걸 이용해서 복구합니다.

--grid유저로 수행
$amdu  -diskstring '/dev/rhdisk*' -extract DG_MGMT.283  
amdu_2024_07_17_11_09_30/
AMDU-00204: Disk N0001 is in currently mounted diskgroup DG_MGMT.
AMDU-00201: Disk N0001: '/dev/rhdiskASM04'

 

백업시 report.txt가 같이 저장되는데 안에 내용 첨부합니다. 어떤 정보들이 백업됐는지에 대한 내용이 저장되어있네요.

더보기

-*-amdu-*-

******************************* AMDU Settings ********************************
ORACLE_HOME:    /oracle/grid/product/12.2.0
System name: AIX
Node name: dbarac1
Release: 2
Version: 7
Machine: 00F6B3DC4C00
amdu run: 17-JUL-24 11:09:30
Endianess: 0

--------------------------------- Operations ---------------------------------
    -extract DG_MGMT.283

------------------------------- Disk Selection -------------------------------
 -diskstring '/dev/rhdisk*'

------------------------------ Reading Control -------------------------------

------------------------------- Output Control -------------------------------

********************************* DISCOVERY **********************************

----------------------------- DISK REPORT N0001 ------------------------------
                Disk Path: /dev/rhdiskASM04
           Unique Disk ID: 
               Disk Label: 
     Physical Sector Size: 512 bytes
                Disk Size: 51200 megabytes
               Group Name: DG_MGMT
                Disk Name: DG_MGMT_0000
       Failure Group Name: DG_MGMT_0000
              Disk Number: 0
            Header Status: 3
       Disk Creation Time: 2021/08/02 19:46:05.906000
          Last Mount Time: 2024/07/17 10:42:25.035000
    Compatibility Version: 0x0c200100(12020001)
         Disk Sector Size: 512 bytes
         Disk size in AUs: 12800 AUs
         Group Redundancy: 1
      Metadata Block Size: 4096 bytes
                  AU Size: 4194304 bytes
                   Stride: 454272 AUs
      Group Creation Time: 2021/08/02 19:46:05.424000
  File 1 Block 1 location: AU 10
     Voting File Start AU: 0
       Voting File End AU: 0
              OCR Present: NO
             Exadata Disk: NO
    kfed Write IP address: 10.33.3.161
          kfed Write Time: 1721180545

----------------------------- DISK REPORT N0002 ------------------------------
                Disk Path: /dev/rhdiskASM05
           Unique Disk ID: 
               Disk Label: 
     Physical Sector Size: 512 bytes
                Disk Size: 51200 megabytes
               Group Name: DG_DATA01
                Disk Name: DG_DATA01_0000
       Failure Group Name: DG_DATA01_0000
              Disk Number: 0
            Header Status: 3
       Disk Creation Time: 2021/08/02 21:42:27.696000
          Last Mount Time: 2024/07/17 10:42:24.537000
    Compatibility Version: 0x0c200100(12020001)
         Disk Sector Size: 512 bytes
         Disk size in AUs: 51200 AUs
         Group Redundancy: 1
      Metadata Block Size: 4096 bytes
                  AU Size: 1048576 bytes
                   Stride: 113792 AUs
      Group Creation Time: 2021/08/02 21:42:27.341000
  File 1 Block 1 location: AU 2
     Voting File Start AU: 0
       Voting File End AU: 0
              OCR Present: NO
             Exadata Disk: NO
    kfed Write IP address: 10.33.3.161
          kfed Write Time: 1721180544

----------------------------- DISK REPORT N0003 ------------------------------
                Disk Path: /dev/rhdiskASM06
           Unique Disk ID: 
               Disk Label: 
     Physical Sector Size: 512 bytes
                Disk Size: 51200 megabytes
               Group Name: DG_DATA01
                Disk Name: DG_DATA01_0001
       Failure Group Name: DG_DATA01_0001
              Disk Number: 1
            Header Status: 3
       Disk Creation Time: 2021/08/02 21:42:27.696000
          Last Mount Time: 2024/07/17 10:42:24.537000
    Compatibility Version: 0x0c200100(12020001)
         Disk Sector Size: 512 bytes
         Disk size in AUs: 51200 AUs
         Group Redundancy: 1
      Metadata Block Size: 4096 bytes
                  AU Size: 1048576 bytes
                   Stride: 113792 AUs
      Group Creation Time: 2021/08/02 21:42:27.341000
  File 1 Block 1 location: AU 0
     Voting File Start AU: 0
       Voting File End AU: 0
              OCR Present: NO
             Exadata Disk: NO
    kfed Write IP address: 10.33.3.161
          kfed Write Time: 1721180544

----------------------------- DISK REPORT N0004 ------------------------------
                Disk Path: /dev/rhdiskASM07
           Unique Disk ID: 
               Disk Label: 
     Physical Sector Size: 512 bytes
                Disk Size: 51200 megabytes
               Group Name: DG_DATA01
                Disk Name: DG_DATA01_0002
       Failure Group Name: DG_DATA01_0002
              Disk Number: 2
            Header Status: 3
       Disk Creation Time: 2022/01/06 15:32:58.481000
          Last Mount Time: 2024/07/17 10:42:24.537000
    Compatibility Version: 0x0c200100(12020001)
         Disk Sector Size: 512 bytes
         Disk size in AUs: 51200 AUs
         Group Redundancy: 1
      Metadata Block Size: 4096 bytes
                  AU Size: 1048576 bytes
                   Stride: 113792 AUs
      Group Creation Time: 2021/08/02 21:42:27.341000
  File 1 Block 1 location: AU 0
     Voting File Start AU: 0
       Voting File End AU: 0
              OCR Present: NO
             Exadata Disk: NO
    kfed Write IP address: 10.33.3.161
          kfed Write Time: 1721180544

----------------------------- DISK REPORT N0005 ------------------------------
                Disk Path: /dev/rhdiskASM08
           Unique Disk ID: 
               Disk Label: 
     Physical Sector Size: 512 bytes
                Disk Size: 51200 megabytes
               Group Name: DG_DATA01
                Disk Name: DG_DATA01_0004
       Failure Group Name: DG_DATA01_0004
              Disk Number: 4
            Header Status: 3
       Disk Creation Time: 2024/03/27 11:18:02.794000
          Last Mount Time: 2024/07/17 10:42:24.537000
    Compatibility Version: 0x0c200100(12020001)
         Disk Sector Size: 512 bytes
         Disk size in AUs: 51200 AUs
         Group Redundancy: 1
      Metadata Block Size: 4096 bytes
                  AU Size: 1048576 bytes
                   Stride: 113792 AUs
      Group Creation Time: 2021/08/02 21:42:27.341000
  File 1 Block 1 location: AU 0
     Voting File Start AU: 0
       Voting File End AU: 0
              OCR Present: NO
             Exadata Disk: NO
    kfed Write IP address: 10.33.3.161
          kfed Write Time: 1721180544

----------------------------- DISK REPORT N0006 ------------------------------
                Disk Path: /dev/rhdiskASM09
           Unique Disk ID: 
               Disk Label: 
     Physical Sector Size: 512 bytes
                Disk Size: 51200 megabytes
               Group Name: DG_DATA01
                Disk Name: DG_DATA01_0003
       Failure Group Name: DG_DATA01_0003
              Disk Number: 3
            Header Status: 3
       Disk Creation Time: 2022/01/17 10:19:26.597000
          Last Mount Time: 2024/07/17 10:42:24.537000
    Compatibility Version: 0x0c200100(12020001)
         Disk Sector Size: 512 bytes
         Disk size in AUs: 51200 AUs
         Group Redundancy: 1
      Metadata Block Size: 4096 bytes
                  AU Size: 1048576 bytes
                   Stride: 113792 AUs
      Group Creation Time: 2021/08/02 21:42:27.341000
  File 1 Block 1 location: AU 0
     Voting File Start AU: 0
       Voting File End AU: 0
              OCR Present: NO
             Exadata Disk: NO
    kfed Write IP address: 10.33.3.161
          kfed Write Time: 1721180544

----------------------------- DISK REPORT N0007 ------------------------------
                Disk Path: /dev/rhdiskASM10
           Unique Disk ID: 
               Disk Label: 
     Physical Sector Size: 512 bytes
                Disk Size: 51200 megabytes
               Group Name: DG_RECO01
                Disk Name: DG_RECO01_0000
       Failure Group Name: DG_RECO01_0000
              Disk Number: 0
            Header Status: 3
       Disk Creation Time: 2021/12/24 13:48:38.026000
          Last Mount Time: 2024/07/17 10:42:25.963000
    Compatibility Version: 0x0b200200(11020002)
         Disk Sector Size: 512 bytes
         Disk size in AUs: 51200 AUs
         Group Redundancy: 1
      Metadata Block Size: 4096 bytes
                  AU Size: 1048576 bytes
                   Stride: 113792 AUs
      Group Creation Time: 2021/12/24 13:48:37.479000
  File 1 Block 1 location: AU 2
     Voting File Start AU: 0
       Voting File End AU: 0
              OCR Present: NO
             Exadata Disk: NO
    kfed Write IP address: 10.33.3.161
          kfed Write Time: 1721180545

----------------------------- DISK REPORT N0008 ------------------------------
                Disk Path: /dev/rhdiskASM11
           Unique Disk ID: 
               Disk Label: 
     Physical Sector Size: 512 bytes
                Disk Size: 51200 megabytes
               Group Name: DG_RECO01
                Disk Name: DG_RECO01_0001
       Failure Group Name: DG_RECO01_0001
              Disk Number: 1
            Header Status: 3
       Disk Creation Time: 2024/04/04 09:10:03.228000
          Last Mount Time: 2024/07/17 10:42:25.963000
    Compatibility Version: 0x0b200200(11020002)
         Disk Sector Size: 512 bytes
         Disk size in AUs: 51200 AUs
         Group Redundancy: 1
      Metadata Block Size: 4096 bytes
                  AU Size: 1048576 bytes
                   Stride: 113792 AUs
      Group Creation Time: 2021/12/24 13:48:37.479000
  File 1 Block 1 location: AU 0
     Voting File Start AU: 0
       Voting File End AU: 0
              OCR Present: NO
             Exadata Disk: NO
    kfed Write IP address: 10.33.3.161
          kfed Write Time: 1721180545

----------------------------- DISK REPORT N0009 ------------------------------
                Disk Path: /dev/rhdiskASM12
           Unique Disk ID: 
               Disk Label: 
     Physical Sector Size: 512 bytes
                Disk Size: 51200 megabytes
               Group Name: DG_DATA01
                Disk Name: DG_DATA01_0005
       Failure Group Name: DG_DATA01_0005
              Disk Number: 5
            Header Status: 4
       Disk Creation Time: 2024/06/18 08:57:30.321000
          Last Mount Time: 2024/06/18 08:57:30.334000
    Compatibility Version: 0x0c200100(12020001)
         Disk Sector Size: 512 bytes
         Disk size in AUs: 51200 AUs
         Group Redundancy: 1
      Metadata Block Size: 4096 bytes
                  AU Size: 1048576 bytes
                   Stride: 113792 AUs
      Group Creation Time: 2021/08/02 21:42:27.341000
  File 1 Block 1 location: AU 0
     Voting File Start AU: 0
       Voting File End AU: 0
              OCR Present: NO
             Exadata Disk: NO
    kfed Write IP address: 10.33.3.162
          kfed Write Time: 1718669739

----------------------------- DISK REPORT N0010 ------------------------------
                Disk Path: /dev/rhdiskASM13
           Unique Disk ID: 
               Disk Label: 
     Physical Sector Size: 512 bytes
                Disk Size: 51200 megabytes
               Group Name: DG_ACFS01
                Disk Name: DG_ACFS01_0000
       Failure Group Name: DG_ACFS01_0000
              Disk Number: 0
            Header Status: 3
       Disk Creation Time: 2022/06/24 11:13:38.329000
          Last Mount Time: 2024/07/17 10:42:24.053000
    Compatibility Version: 0x0b200200(11020002)
         Disk Sector Size: 512 bytes
         Disk size in AUs: 51200 AUs
         Group Redundancy: 1
      Metadata Block Size: 4096 bytes
                  AU Size: 1048576 bytes
                   Stride: 113792 AUs
      Group Creation Time: 2022/06/24 11:13:38.045000
  File 1 Block 1 location: AU 2
     Voting File Start AU: 0
       Voting File End AU: 0
              OCR Present: NO
             Exadata Disk: NO
    kfed Write IP address: 10.33.3.161
          kfed Write Time: 1721180544

----------------------------- DISK REPORT N0011 ------------------------------
                Disk Path: /dev/rhdiskCRS01
           Unique Disk ID: 
               Disk Label: 
     Physical Sector Size: 512 bytes
                Disk Size: 51200 megabytes
               Group Name: DG_OCR
                Disk Name: DG_OCR_0002
       Failure Group Name: DG_OCR_0002
              Disk Number: 2
            Header Status: 3
       Disk Creation Time: 2021/08/02 19:36:58.975000
          Last Mount Time: 2024/07/17 10:42:25.487000
    Compatibility Version: 0x0c200100(12020001)
         Disk Sector Size: 512 bytes
         Disk size in AUs: 12800 AUs
         Group Redundancy: 2
      Metadata Block Size: 4096 bytes
                  AU Size: 4194304 bytes
                   Stride: 454272 AUs
      Group Creation Time: 2021/08/02 19:36:58.166000
  File 1 Block 1 location: AU 10
     Voting File Start AU: 56
       Voting File End AU: 64
              OCR Present: YES
             Exadata Disk: NO
    kfed Write IP address: 10.33.3.161
          kfed Write Time: 1721180545

----------------------------- DISK REPORT N0012 ------------------------------
                Disk Path: /dev/rhdiskCRS02
           Unique Disk ID: 
               Disk Label: 
     Physical Sector Size: 512 bytes
                Disk Size: 51200 megabytes
               Group Name: DG_OCR
                Disk Name: DG_OCR_0000
       Failure Group Name: DG_OCR_0000
              Disk Number: 0
            Header Status: 3
       Disk Creation Time: 2021/08/02 19:36:58.975000
          Last Mount Time: 2024/07/17 10:42:25.487000
    Compatibility Version: 0x0c200100(12020001)
         Disk Sector Size: 512 bytes
         Disk size in AUs: 12800 AUs
         Group Redundancy: 2
      Metadata Block Size: 4096 bytes
                  AU Size: 4194304 bytes
                   Stride: 454272 AUs
      Group Creation Time: 2021/08/02 19:36:58.166000
  File 1 Block 1 location: AU 10
     Voting File Start AU: 56
       Voting File End AU: 64
              OCR Present: YES
             Exadata Disk: NO
    kfed Write IP address: 10.33.3.161
          kfed Write Time: 1721180545

----------------------------- DISK REPORT N0013 ------------------------------
                Disk Path: /dev/rhdiskCRS03
           Unique Disk ID: 
               Disk Label: 
     Physical Sector Size: 512 bytes
                Disk Size: 51200 megabytes
               Group Name: DG_OCR
                Disk Name: DG_OCR_0001
       Failure Group Name: DG_OCR_0001
              Disk Number: 1
            Header Status: 3
       Disk Creation Time: 2021/08/02 19:36:58.975000
          Last Mount Time: 2024/07/17 10:42:25.487000
    Compatibility Version: 0x0c200100(12020001)
         Disk Sector Size: 512 bytes
         Disk size in AUs: 12800 AUs
         Group Redundancy: 2
      Metadata Block Size: 4096 bytes
                  AU Size: 4194304 bytes
                   Stride: 454272 AUs
      Group Creation Time: 2021/08/02 19:36:58.166000
  File 1 Block 1 location: AU 10
     Voting File Start AU: 56
       Voting File End AU: 64
              OCR Present: YES
             Exadata Disk: NO
    kfed Write IP address: 10.33.3.161
          kfed Write Time: 1721180545

***************** Slept for 6 seconds waiting for heartbeats *****************

************************* SCANNING DISKGROUP DG_MGMT *************************
            Creation Time: 2021/08/02 19:46:05.424000
         Disks Discovered: 1
               Redundancy: 1
                  AU Size: 4194304 bytes
      Metadata Block Size: 4096 bytes
     Physical Sector Size: 512 bytes
          Metadata Stride: 454272 AU
   Duplicate Disk Numbers: 0
                  Mounted: Yes


---------------------------- SCANNING DISK N0001 -----------------------------
Disk N0001: '/dev/rhdiskASM04'
AMDU-00204: Disk N0001 is in currently mounted diskgroup DG_MGMT.
AMDU-00201: Disk N0001: '/dev/rhdiskASM04'
** HEARTBEAT DETECTED **
           Allocated AU's: 8804
                Free AU's: 3996
       AU's read for dump: 0
       Block images saved: 0
        Map lines written: 0
          Heartbeats seen: 1
  Corrupt metadata blocks: 0
        Corrupt AT blocks: 0


----------------------- SUMMARY FOR DISKGROUP DG_MGMT ------------------------
           Allocated AU's: 8804
                Free AU's: 3996
       AU's read for dump: 0
       Block images saved: 0
        Map lines written: 0
          Heartbeats seen: 1
  Corrupt metadata blocks: 0
        Corrupt AT blocks: 0


************************ EXTRACTING FILE DG_MGMT.283 *************************
            Creating file: DG_MGMT_283.f
         Extraction wrote: 2555904 bytes
              Stripe size: 4194304 bytes
           Stripe columns: 1
            Mirror copies: 1
               Block size: 4096 bytes
                File size: 624 blocks
                File type: 30
           Extent size #1: 4294967295 extents of  1 AUs
           Extent size #2:          0 extents of  1 AUs
           Extent size #3:          0 extents of  1 AUs
           Extent size #4: 4294967295 extents of  1 AUs
            Creation time: 2024/07/17 08:05:24.890000
            Modified time: 2024/07/17 10:00:00.000000
     Data extents in file: 1
       Data extents found: 1
         Blocks not found: 0 blocks


******************************* END OF REPORT ********************************

 

 

백업은 준비되었고, 복구를 진행하겠습니다.

 

3)

crsctl start crs를 일반적으로 수행하면 vote disk를 찾지못해 기동되지 않습니다. exclusive mode로 기동하여 작업합니다.

 

--crsctl start crs 바로 수행시 에러발생 (alert.log에서 발견)
CRS-1714: Unable to discover any voting files, retrying discovery in 15 seconds;

 

crsctl start crs -excl -nocrs 옵션으로 기동합니다.

# crsctl start crs -excl -nocrs
CRS-4123: Oracle High Availability Services has been started.
CRS-2672: Attempting to start 'ora.evmd' on 'dbarac1'
CRS-2672: Attempting to start 'ora.mdnsd' on 'dbarac1'
CRS-2676: Start of 'ora.evmd' on 'dbarac1' succeeded
CRS-2676: Start of 'ora.mdnsd' on 'dbarac1' succeeded
CRS-2672: Attempting to start 'ora.gpnpd' on 'dbarac1'
CRS-2676: Start of 'ora.gpnpd' on 'dbarac1' succeeded
CRS-2672: Attempting to start 'ora.cssdmonitor' on 'dbarac1'
CRS-2672: Attempting to start 'ora.gipcd' on 'dbarac1'
CRS-2676: Start of 'ora.cssdmonitor' on 'dbarac1' succeeded
CRS-2676: Start of 'ora.gipcd' on 'dbarac1' succeeded
CRS-2672: Attempting to start 'ora.cssd' on 'dbarac1'
CRS-2672: Attempting to start 'ora.diskmon' on 'dbarac1'
CRS-2676: Start of 'ora.diskmon' on 'dbarac1' succeeded
CRS-2676: Start of 'ora.cssd' on 'dbarac1' succeeded
CRS-2672: Attempting to start 'ora.cluster_interconnect.haip' on 'dbarac1'
CRS-2672: Attempting to start 'ora.ctssd' on 'dbarac1'
CRS-2676: Start of 'ora.ctssd' on 'dbarac1' succeeded
CRS-2676: Start of 'ora.cluster_interconnect.haip' on 'dbarac1' succeeded
CRS-2672: Attempting to start 'ora.asm' on 'dbarac1'
CRS-2676: Start of 'ora.asm' on 'dbarac1' succeeded

 

4)

ASM으로 접속하여 새 diskgroup을 생성합니다.

--grid유저로 수행
$ sqlplus / as sysasm

create diskgroup CRS external redundancy disk '/dev/rhdiskCRS*' attribute 'COMPATIBLE.ASM' = '12.2';

 

ocr.loc를 수정합니다.

/etc/oracle/ocr.loc 변경
##AS-IS
ocrconfig_loc=+DG_OCR/dbarac/OCRFILE/registry.255.1079552233

##TO-BE
ocrconfig_loc=+CRS

5)

생성한 diskgroup에 백업본을 restore합니다

--root로 수행 
cd /home/grid/dba/ysbae/amdu_2024_07_17_11_09_30
ocrconfig -restore DG_MGMT_283.f

PROT-35: The configured OCR locations are not accessible.
PROC-26: Error while accessing the physical storage Storage layer error [Insufficient quorum to open OCR devices] [0]

 

6)replace votedisk 명령어를 수행합니다.

# crsctl replace votedisk +CRS
Successful addition of voting disk 61c2228b023a4f75bffa1b40c6cb18a0.
Successfully replaced voting disk group with +CRS.
CRS-4266: Voting file(s) successfully replaced

 

7)

확인

$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       dbarac1                  STABLE
ora.DG_ACFS01.VOL_ACFS_01.advm
               ONLINE  OFFLINE      dbarac1                  STABLE
ora.DG_ACFS01.dg
               ONLINE  OFFLINE      dbarac1                  STABLE
ora.DG_DATA01.dg
               ONLINE  OFFLINE      dbarac1                  STABLE
ora.DG_MGMT.dg
               ONLINE  OFFLINE      dbarac1                  STABLE
ora.DG_OCR.dg
               OFFLINE OFFLINE      dbarac1                  STABLE
ora.DG_RECO01.dg
               ONLINE  OFFLINE      dbarac1                  STABLE
ora.LISTENER_DBARAC.lsnr
               ONLINE  ONLINE       dbarac1                  STABLE
ora.dg_acfs01.vol_acfs_01.acfs
               ONLINE  OFFLINE      dbarac1                  volume /ora_acfs off
                                                             line,STABLE
ora.net1.network
               ONLINE  ONLINE       dbarac1                  STABLE
ora.ons
               ONLINE  ONLINE       dbarac1                  STABLE
ora.proxy_advm
               ONLINE  OFFLINE      dbarac1                  STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       dbarac1                  STABLE
ora.LISTENER_SCAN2.lsnr
      1        ONLINE  ONLINE       dbarac1                  STABLE
ora.LISTENER_SCAN3.lsnr
      1        ONLINE  ONLINE       dbarac1                  STABLE
ora.MGMTLSNR
      1        ONLINE  ONLINE       dbarac1                  169.254.7.255 192.16
                                                             8.100.1,STABLE
ora.asm
      1        ONLINE  INTERMEDIATE dbarac1                  Started,STABLE
      2        ONLINE  OFFLINE                               STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cvu
      1        ONLINE  ONLINE       dbarac1                  STABLE
ora.dbarac.db
      1        ONLINE  OFFLINE                               Instance Shutdown,ST
                                                             ABLE
      2        ONLINE  OFFLINE                               STABLE
ora.dbarac.svcbatch.svc
      2        OFFLINE OFFLINE                               STABLE
ora.dbarac.svcetl.svc
      2        OFFLINE OFFLINE                               STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.dbarac1.vip
      1        ONLINE  ONLINE       dbarac1                  STABLE
ora.dbarac2.vip
      1        ONLINE  INTERMEDIATE dbarac1                  FAILED OVER,STABLE
ora.mgmtdb
      1        ONLINE  OFFLINE                               Instance Shutdown,ST
                                                             ABLE
ora.qosmserver
      1        ONLINE  ONLINE       dbarac1                  STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       dbarac1                  STABLE
ora.scan2.vip
      1        ONLINE  ONLINE       dbarac1                  STABLE
ora.scan3.vip
      1        ONLINE  ONLINE       dbarac1                  STABLE
--------------------------------------------------------------------------------


$ crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   61c2228b023a4f75bffa1b40c6cb18a0 (/dev/rhdiskCRS01) [CRS]

 

디스크 rescan하는 명령어를 추가해서 2번에도 적용해줘야합니다. 하지만 제가 구축한 환경에서는 oracleasm을 사용하지 않아서 이부분에서 막혔습니다..

 

명령어는 아래와 같습니다.

oracleasm scandisk

 

 

백업본으로는 잘 복구되는것을 확인하였습니다.

node2번과 sync를 맞추는것은 또 다른 문제인거같네요..

 

 

반응형

댓글