RAC 11.2.0.3 管理OLR檔案

snowdba發表於2014-07-06
1, 分別在節點node1,node2 檢查OLR的狀態
[root@node1 ~]# ocrcheck -local
Status of Oracle Local Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       2652
         Available space (kbytes) :     259468
         ID                       :  231588647
         Device/File Name         : /g01/grid/app/11.2.0/grid/cdata/node1.olr
                                    Device/File integrity check succeeded

         Local registry integrity check succeeded

         Logical corruption check succeeded


[root@node2 ~]# ocrcheck -local
Status of Oracle Local Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       2652
         Available space (kbytes) :     259468
         ID                       : 1577698888
         Device/File Name         : /g01/grid/app/11.2.0/grid/cdata/node2.olr
                                    Device/File integrity check succeeded

         Local registry integrity check succeeded

         Logical corruption check succeeded

2,備份和恢復OLR

檢視當前備份記錄
[root@node1 ~]# ocrconfig -local -showbackup

node1     2014/06/11 10:42:30     /g01/grid/app/11.2.0/grid/cdata/node1/backup_20140611_104230.olr
[root@node1 ~]#

執行手工備份
[root@node1 ~]# date
Wed Jul  2 07:16:04 CST 2014

[root@node1 ~]# ocrconfig -local -manualbackup

node1     2014/07/02 07:13:06     /g01/grid/app/11.2.0/grid/cdata/node1/backup_20140702_071306.olr

node1     2014/06/11 10:42:30     /g01/grid/app/11.2.0/grid/cdata/node1/backup_20140611_104230.olr

3,在節點node1關閉clusterware
[root@node1 ~]# crsctl stop crs -f
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'node1'
CRS-2673: Attempting to stop 'ora.crsd' on 'node1'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'node1'
CRS-2673: Attempting to stop 'ora.cvu' on 'node1'
CRS-2673: Attempting to stop 'ora.node2.vip' on 'node1'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'node1'
CRS-2673: Attempting to stop 'ora.ORCVOTE.dg' on 'node1'
CRS-2673: Attempting to stop 'ora.prod.db' on 'node1'
CRS-2677: Stop of 'ora.node2.vip' on 'node1' succeeded
CRS-2672: Attempting to start 'ora.node2.vip' on 'node2'
CRS-2677: Stop of 'ora.cvu' on 'node1' succeeded
CRS-2672: Attempting to start 'ora.cvu' on 'node2'
CRS-2676: Start of 'ora.cvu' on 'node2' succeeded
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'node1' succeeded
CRS-2676: Start of 'ora.node2.vip' on 'node2' succeeded
CRS-2672: Attempting to start 'ora.LISTENER.lsnr' on 'node2'
CRS-2677: Stop of 'ora.prod.db' on 'node1' succeeded
CRS-2673: Attempting to stop 'ora.ARCH.dg' on 'node1'
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'node1'
CRS-2677: Stop of 'ora.ARCH.dg' on 'node1' succeeded
CRS-2677: Stop of 'ora.DATA.dg' on 'node1' succeeded
CRS-2676: Start of 'ora.LISTENER.lsnr' on 'node2' succeeded
CRS-2673: Attempting to stop 'ora.node1.vip' on 'node1'
CRS-2677: Stop of 'ora.node1.vip' on 'node1' succeeded
CRS-2672: Attempting to start 'ora.node1.vip' on 'node2'
CRS-2676: Start of 'ora.node1.vip' on 'node2' succeeded
CRS-2677: Stop of 'ora.ORCVOTE.dg' on 'node1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'node1'
CRS-2677: Stop of 'ora.asm' on 'node1' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'node1'
CRS-2677: Stop of 'ora.ons' on 'node1' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'node1'
CRS-2677: Stop of 'ora.net1.network' on 'node1' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'node1' has completed
CRS-2677: Stop of 'ora.crsd' on 'node1' succeeded
CRS-2673: Attempting to stop 'ora.crf' on 'node1'
CRS-2673: Attempting to stop 'ora.ctssd' on 'node1'
CRS-2673: Attempting to stop 'ora.evmd' on 'node1'
CRS-2673: Attempting to stop 'ora.asm' on 'node1'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'node1'
CRS-2677: Stop of 'ora.crf' on 'node1' succeeded
CRS-2677: Stop of 'ora.evmd' on 'node1' succeeded
CRS-2677: Stop of 'ora.mdnsd' on 'node1' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'node1' succeeded
CRS-2677: Stop of 'ora.asm' on 'node1' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'node1'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'node1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'node1'
CRS-2677: Stop of 'ora.cssd' on 'node1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'node1'
CRS-2677: Stop of 'ora.gipcd' on 'node1' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'node1'
CRS-2677: Stop of 'ora.gpnpd' on 'node1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'node1' has completed
CRS-4133: Oracle High Availability Services has been stopped.

4,恢復OCR,選擇之前手工備份的20140702_071306版本
[root@node1 ~]# ocrconfig -local -restore \
> /g01/grid/app/11.2.0/grid/cdata/node1/backup_20140702_071306.olr

5,在節點node1重啟啟動clusterware
[root@node1 ~]# crsctl start crs
CRS-4123: Oracle High Availability Services has been started. 

6,檢測OLR
[grid@node1 ~]$ cluvfy comp olr

Verifying OLR integrity

Checking OLR integrity...

Checking OLR config file...

OLR config file check successful


Checking OLR file attributes...

OLR file check successful


WARNING:
This check does not verify the integrity of the OLR contents. Execute 'ocrcheck -local' as a privileged user to verify the contents of OLR.

OLR integrity check passed

Verification of OLR integrity was successful. 

7,匯出OLR
[root@node1 ~]# ocrconfig -local -export /home/grid/olr_export

[root@node1 ~]# ls -al /home/grid/olr_export
-rw------- 1 root root 94653 Jul  2 07:39 /home/grid/olr_export

匯入OLR
[root@node1 ~]# ocrconfig -local -import /home/grid/olr_export

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29047826/viewspace-1210650/,如需轉載,請註明出處,否則將追究法律責任。

相關文章