系统环境
OS: Red Hat Enterprise Linux Server release 6.7 (Santiago)
GI: Oracle Grid Infrastructure 11g 11.2.0.4.0
DB: Oracle Database 11g 11.2.0.4.0
确认集群状态
[grid@rhel1 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.FRA.dg
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.LISTENER.lsnr
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.OCR.dg
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.asm
ONLINE ONLINE rhel1 Started
ONLINE ONLINE rhel2 Started
ora.gsd
OFFLINE OFFLINE rhel1
OFFLINE OFFLINE rhel2
ora.net1.network
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.ons
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
ora.registry.acfs
ONLINE ONLINE rhel1
ONLINE ONLINE rhel2
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
1 ONLINE ONLINE rhel2
ora.cvu
1 ONLINE ONLINE rhel2
ora.oc4j
1 ONLINE ONLINE rhel2
ora.pdsys.db
1 ONLINE ONLINE rhel2 Open
2 ONLINE ONLINE rhel1 Open
ora.rhel1.vip
1 ONLINE ONLINE rhel1
ora.rhel2.vip
1 ONLINE ONLINE rhel2
ora.scan1.vip
1 ONLINE ONLINE rhel2
[grid@rhel1 ~]$
确认OCR
[grid@rhel1 ~]$ ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 3288
Available space (kbytes) : 258832
ID : 2087529836
Device/File Name : +OCR
Device/File integrity check succeeded
Device/File not configured
Device/File not configured
Device/File not configured
Device/File not configured
Cluster registry integrity check succeeded
Logical corruption check bypassed due to non-privileged user
[grid@rhel1 ~]$
确认votedisk
[grid@rhel1 ~]$ crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 2eb4b14d319a4f33bfb9c3ed5f0305a1 (/dev/raw/raw3) [OCR]
Located 1 voting disk(s).
[grid@rhel1 ~]$
备份OCR
[grid@rhel1 ~]$ ocrconfig -showbackup
rhel1 2020/07/10 22:20:42 /u01/11.2.0/grid/cdata/rhel-cluster/backup00.ocr
rhel1 2020/06/15 13:04:43 /u01/11.2.0/grid/cdata/rhel-cluster/backup01.ocr
rhel1 2020/03/26 13:05:54 /u01/11.2.0/grid/cdata/rhel-cluster/backup02.ocr
rhel1 2020/07/10 22:20:42 /u01/11.2.0/grid/cdata/rhel-cluster/day.ocr
rhel1 2020/07/10 22:20:42 /u01/11.2.0/grid/cdata/rhel-cluster/week.ocr
PROT-25: Manual backups for the Oracle Cluster Registry are not available
[root@rhel1 ~]# /u01/11.2.0/grid/bin/ocrconfig -manualbackup
rhel2 2020/11/24 08:03:33 /u01/11.2.0/grid/cdata/rhel-cluster/backup_20201124_080333.ocr
[root@rhel1 ~]# /u01/11.2.0/grid/bin/ocrconfig -showbackup
rhel1 2020/07/10 22:20:42 /u01/11.2.0/grid/cdata/rhel-cluster/backup00.ocr
rhel1 2020/06/15 13:04:43 /u01/11.2.0/grid/cdata/rhel-cluster/backup01.ocr
rhel1 2020/03/26 13:05:54 /u01/11.2.0/grid/cdata/rhel-cluster/backup02.ocr
rhel1 2020/07/10 22:20:42 /u01/11.2.0/grid/cdata/rhel-cluster/day.ocr
rhel1 2020/07/10 22:20:42 /u01/11.2.0/grid/cdata/rhel-cluster/week.ocr
rhel2 2020/11/24 08:03:33 /u01/11.2.0/grid/cdata/rhel-cluster/backup_20201124_080333.ocr
更换OCR存储
通过asmca的方式,把新存储添加到OCR磁盘组,然后删除老存储的方式进行替换。OCR老存储为raw3,新存储为raw5。
首先把raw5添加到OCR磁盘组:
[grid@rhel1 ~]$ ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 3288
Available space (kbytes) : 258832
ID : 2087529836
Device/File Name : +OCR
Device/File integrity check succeeded
Device/File not configured
Device/File not configured
Device/File not configured
Device/File not configured
Cluster registry integrity check succeeded
Logical corruption check bypassed due to non-privileged user
[grid@rhel1 ~]$ crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 2eb4b14d319a4f33bfb9c3ed5f0305a1 (/dev/raw/raw3) [OCR]
Located 1 voting disk(s).
然后删除老存储raw3
[grid@rhel1 ~]$ ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 3288
Available space (kbytes) : 258832
ID : 2087529836
Device/File Name : +OCR
Device/File integrity check succeeded
Device/File not configured
Device/File not configured
Device/File not configured
Device/File not configured
Cluster registry integrity check succeeded
Logical corruption check bypassed due to non-privileged user
[grid@rhel1 ~]$
[grid@rhel1 ~]$ crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 8590d6f1f7284f78bfce4a041214e2da (/dev/raw/raw5) [OCR]
Located 1 voting disk(s).
Votedisk信息是自动替换的,不需要手动干预。也就是说OCR磁盘组存储替换跟普通磁盘组一样,逐步替换存储即可。