迁移11g Rac中OCR和VOTEDISK

环境:OEL+oracle rac 11.2.0.3

迁移描述:将ocr和votedisk从+DATE上迁移到+OCR_VOTE上;

 

操作如下:

[root@ora2 ~]$/u01/app/11.2.0/grid/bin/ocrcheck

Status of Oracle Cluster Registry is asfollows :

        Version                  :          3

        Total space (kbytes)     :     1469612

        Used space (kbytes)      :       3784

        Available space (kbytes) :    1465828

        ID                       :  1820175369

        Device/File Name         :      +DATA

                                    Device/File integrity checksucceeded

                                    Device/Filenot configured

                                    Device/Filenot configured

        Cluster registry integrity check succeeded

        Logical corruption check bypassed due to non-privileged user

这里我们看到ocr放在+DATA中了

 

然后Add a new OCR device/file:

[root @ora2~]/u01/app/11.2.0/grid/bin/ocrconfig -add +OCR_VOTE

[root @ora2 ~]$/u01/app/11.2.0/grid/bin/ocrcheck

Status of Oracle Cluster Registry is asfollows :

        Version                  :          3

        Total space (kbytes)     :     1469612

        Used space (kbytes)      :       3784

        Available space (kbytes) :    1465828

        ID                       :  1820175369

                                   Device/Fileintegrity check succeeded

                                    +OCR_VOTE

                                    Device/Fileintegrity check succeeded

                                    Device/Filenot configured

        Cluster registry integrity check succeeded

        Logical corruption check bypassed due to non-privileged user

(这时候ocr并不存在于+OCR_VOTE中)

 

迁移 ocr:

[root @ora2~]$/u01/app/11.2.0/grid/bin/ocrconfig -replace +DATA -replacement +OCR_VOTE

 

然后迁移votedisk:

[root @ora2 ~]$su - grid

[grid @ora2 ~]$crsctl replace votedisk+OCR_VOTE

 

查询一下votedisk的存放目录:

[grid @ora2 ~]$crsctl query css votedisk;

 

查询一下资源状态:

[grid @ora2 ~]$crsctl status resource -t

 

然后登录asm查看asmdisk的信息:

[sql] view plain copy print?

sqlplus / as sysasm 

SQL> select group_number,name,state,typefrom V$asm_diskgroup; 

SQL> select group_number,name,path fromv$asm_disk; 

 

使用show parameter spfile查看路径,如果存放在+DATA中,可以重建spfile:

如下操作:

[sql] view plain copy print?

SQL>createpfile='/u01/11.2.0/grid/dbs/asmpfile.ora' from spfile; 

SQL>create spfile='+OCR_VOTE' frompfile='/u01/11.2.0/grid/dbs/asmpfile.ora'; 

 

然后使用root用户重启crs即可

[root @ora2~]$/u01/app/11.2.0/grid/bin/crsctl stop crs

[root @ora2 ~]$/u01/app/11.2.0/grid/bin/crsctlstart crs

 

然后再使用grid用户

[sql] view plain copy print?

su - grid 

SQL>alter diskgroup OCR_VOTE mount; 

 

切换root用户

/u01/app/11.2.0/grid/bin/ocrconfig -delete+DATA

 

删除磁盘组+DATA:

[sql] view plain copy print?

SQL>alter diskgroup DATA dismount; 

SQL>drop diskgroup DATA includingcontents

你可能感兴趣的:(Oracle,Database)