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博客 ” ,链接:https://blog.itpub.net/29047826/viewspace-1210650/
,如需转载,请注明出处,否则将追究法律责任。