11gr2rac替换ocr和votedisk

来源:互联网 发布:药丸 知乎 编辑:程序博客网 时间:2024/06/06 07:46

                                       11gr2rac替换ocr和votedisk



11gR2rac替换ocr磁盘

说明:
     操作系统是linux 6.5
     oracle 数据库是oracle11.2.0.4
     其中用到的磁盘组
                  OCR是最初安装时放置ocr和votedisk的磁盘组也是本实验要替换的磁盘组,此组为normal(3块1g盘)
                  OCRNEW是替换OCR的磁盘组,该磁盘组也为normal,3块1g盘,其实该磁盘是normal或者external无所谓,甚至high也可以。
                  CRS是一个只用一块1g盘的磁盘组,在本实验第二种方法中用到。该磁盘组只是起中间作用。其实不用直接replace应该也能成功(没有实验过),不过根据mos文档中的注意,应该不会犯错。
  ·
     另外,两种方法都可以,不过第二种需要额外的mirror,每次查看ocr或者votedisk状态务必所有节点都看一下     
第一种方法:添加删除。(该方法是先添加,后删除。当然也可不删除)
1)查看目前的ocr
[root@rac2 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3156
         Available space (kbytes) :     258964
         ID                       :  257970053
         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 succeeded


2)添加新的
[root@rac2 bin]# ./ocrconfig -add +OCRNEW


3)查看ocr
[root@rac2 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3156
         Available space (kbytes) :     258964
         ID                       :  257970053
         Device/File Name         :       +OCR
                                    Device/File integrity check succeeded
         Device/File Name         :    +OCRNEW
                                    Device/File integrity check succeeded


                                    Device/File not configured


                                    Device/File not configured


                                    Device/File not configured


         Cluster registry integrity check succeeded


         Logical corruption check succeeded


4)删掉旧的
[root@rac2 bin]# ./ocrconfig -delete +OCR
5)查看是否成功。
[root@rac2 bin]# ./crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   6aca221af94e4f64bf907e34a01053f2 (/dev/raw/raw1) [OCR]
 2. ONLINE   82197b2245a64fecbf075fb63b030cb6 (/dev/raw/raw2) [OCR]
 3. ONLINE   3feab36658d04f32bf41fabbbfcf36b9 (/dev/raw/raw3) [OCR]
Located 3 voting disk(s).




第二种添加替换。
1)查看
[root@rac2 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3156
         Available space (kbytes) :     258964
         ID                       :  257970053
         Device/File Name         :       +OCR
                                    Device/File integrity check succeeded


                                    Device/File not configured


                                    Device/File not configured


2)直接添加,报错没有镜像,先添加镜像CRS
[root@rac2 bin]# ./ocrconfig -replace +OCR -replacement +OCRNEW
PROT-28: Cannot delete or replace the only configured Oracle Cluster Registry location
[root@rac2 bin]# ./ocrconfig -add +CRS
[root@rac2 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3172
         Available space (kbytes) :     258948
         ID                       :  257970053
         Device/File Name         :       +OCR
                                    Device/File integrity check succeeded
         Device/File Name         :       +CRS
                                    Device/File integrity check succeeded


                                    Device/File not configured


                                    Device/File not configured


                                    Device/File not configured


         Cluster registry integrity check succeeded


         Logical corruption check succeeded
3)替换(将OCR替换为OCRNEW)
[root@rac2 bin]# ./ocrconfig -replace +OCR -replacement +OCRNEW
[root@rac2 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3172
         Available space (kbytes) :     258948
         ID                       :  257970053
         Device/File Name         :    +OCRNEW
                                    Device/File integrity check succeeded
         Device/File Name         :       +CRS
                                    Device/File integrity check succeeded


                                    Device/File not configured


                                    Device/File not configured


                                    Device/File not configured


         Cluster registry integrity check succeeded


         Logical corruption check succeeded
4)删除原来的CRS,再查看一下资源状态等。
[root@rac2 bin]# ./ocrconfig -delete +CRS
[root@rac2 bin]# ./ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          3
         Total space (kbytes)     :     262120
         Used space (kbytes)      :       3172
         Available space (kbytes) :     258948
         ID                       :  257970053
         Device/File Name         :    +OCRNEW
                                    Device/File integrity check succeeded
         Device/File Name         :     
                                    Device/File not configured


                                    Device/File not configured


                                    Device/File not configured


                                    Device/File not configured


替换完ocr,下面替换vote。由于11gr2,ocr和vote一般都在一个磁盘组里,所以原来OCR磁盘组的磁盘是不能拿下来,此时需要替换votedisk到OCRNEW里




1.替换votedisk,查看ocr替换完后的votedisk


[grid@rac2 ~]$ crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   6aca221af94e4f64bf907e34a01053f2 (/dev/raw/raw1) [OCR]
 2. ONLINE   82197b2245a64fecbf075fb63b030cb6 (/dev/raw/raw2) [OCR]
 3. ONLINE   3feab36658d04f32bf41fabbbfcf36b9 (/dev/raw/raw3) [OCR]
Located 3 voting disk(s).
2.以grid用户替换OCR为OCRNEW磁盘组
[grid@rac2 ~]$ crsctl replace votedisk +OCRNEW
Successful addition of voting disk 74793d72bcff4f8abf722e5c657531b6.
Successful addition of voting disk 24e403fd919d4fb4bfc40a1224fafef4.
Successful addition of voting disk 909873c6e5fb4f5bbf13ccd235e08ff5.
Successful deletion of voting disk 6aca221af94e4f64bf907e34a01053f2.
Successful deletion of voting disk 82197b2245a64fecbf075fb63b030cb6.
Successful deletion of voting disk 3feab36658d04f32bf41fabbbfcf36b9.
Successfully replaced voting disk group with +OCRNEW.
CRS-4266: Voting file(s) successfully replaced
3.查询是否成功,查看资源状态等是否正常。正常此时原OCR磁盘可以取下来了
[grid@rac2 ~]$ crsctl query css votedisk
##  STATE    File Universal Id                File Name Disk group
--  -----    -----------------                --------- ---------
 1. ONLINE   74793d72bcff4f8abf722e5c657531b6 (/dev/raw/raw9) [OCRNEW]
 2. ONLINE   24e403fd919d4fb4bfc40a1224fafef4 (/dev/raw/raw6) [OCRNEW]
 3. ONLINE   909873c6e5fb4f5bbf13ccd235e08ff5 (/dev/raw/raw7) [OCRNEW]
Located 3 voting disk(s).


                                    Device/File not configured


                                    Device/File not configured


         Cluster registry integrity check succeeded


         Logical corruption check succeeded
遇到错误
[root@rac2 bin]# ./crsctl add css votedisk /dev/raw/raw6
CRS-4258: Addition and deletion of voting files are not allowed because the voting files are on ASM
11gr2ocr支持磁盘组和集群文件系统。raw这种模式不支持。


[root@rac2 bin]# ./crsctl query css votedisk


很奇怪的问题,我又将OCRNEW替换为OCR,votedisk自动跟着变了。我又来回加了几遍没有出现自动变的情况


0 0
原创粉丝点击