oracle 11.2.0.1 rac 修改asm磁盘组的冗余模式(redundancy mode)为normal

oracle 11.2.0.1 rac 修改asm磁盘组的冗余模式(redundancy mode)为normal


背景介绍:
oracle 11.2.0.1 linux rac ,
ocr和vote file存放于名为CRS的asm磁盘组中,名为CRS的asm磁盘组是external冗余模式

现在的需求:

将ocr和vote file 存放于 normal 冗余模式的磁盘组。



进行的步骤:


fdisk -l
可以看到新加的硬盘(新加的硬盘位于存储上)
/dev/sddlmaa
/dev/sddlmab
/dev/sddlmad
这3块硬盘都是10.7g

使用
fdisk /dev/sddlmaa
fdisk /dev/sddlmab
fdisk /dev/sddlmad

对磁盘进行分区:第一个区5G大小,剩余空间为第二个区,分区后如下:

/dev/sddlmaa1 5G
/dev/sddlmaa2 5G
/dev/sddlmab1 5G
/dev/sddlmab2 5G
/dev/sddlmad1 5G
/dev/sddlmad2 5G


使用oracleasm createdisk进行asm磁盘的创建

/etc/init.d/oracleasm createdisk CRS1 /dev/sddlmaa1
/etc/init.d/oracleasm createdisk CRS2 /dev/sddlmaa2
/etc/init.d/oracleasm createdisk CRS3 /dev/sddlmab1
/etc/init.d/oracleasm createdisk CRS4 /dev/sddlmab2
/etc/init.d/oracleasm createdisk CRS5 /dev/sddlmad1

在2个节点都执行下列命令:
/etc/init.d/oracleasm scandisks
/etc/init.d/oracleasm listdisks

确保在2个节点都能发现CRS1 CRS2 CRS3 CRS4 CRS5

分别在2个节点执行asmca,在建立asm磁盘组的界面下,确保2个节点都能发现CRS1 CRS2 CRS3 CRS4 CRS5

若是有的节点不能发现新建立的asm磁盘组,请重启此节点。


在1节点上运行asmca,外部冗余,1个asm磁盘(CRS1), 磁盘组名称为CRSTEMP

在1节点上运行asmca,normal冗余,3个asm磁盘(CRS2,CRS3,CRS4), 磁盘组名称为CRSNEW



转移ocr文件:


[root@racdb01 ~]# /u01/app/11.2.0/grid/bin/ocrconfig -replace +CRS -replacement +CRSNEW
PROT-28: Cannot delete or replace the only configured Oracle Cluster Registry location、

--注意:此PROT-28 我在metalink上没有搜到有价值的东西。后来是在帖子
http://balakumarnair.wordpress.com/2010/12/22/replace-migrate-ocr/的启发下,使用
ocrconfig -add 和 ocrconfig -replace 完成了ocr的转移。



[root@racdb01 ~]# /u01/app/11.2.0/grid/bin/ocrconfig -add +CRSTEMP
[root@racdb01 ~]# /u01/app/11.2.0/grid/bin/ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 2732
Available space (kbytes) : 259388
ID : 1268373340
Device/File Name : +CRS
Device/File integrity check succeeded
Device/File Name : +CRSTEMP
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




[root@racdb01 ~]# /u01/app/11.2.0/grid/bin/ocrconfig -replace +CRS -replacement +CRSNEW

[root@racdb01 ~]# /u01/app/11.2.0/grid/bin/ocrcheck
Status of Oracle Cluster Registry is as follows :
Version : 3
Total space (kbytes) : 262120
Used space (kbytes) : 2732
Available space (kbytes) : 259388
ID : 1268373340
Device/File Name : +CRSNEW
Device/File integrity check succeeded
Device/File Name : +CRSTEMP
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



转移vote file:

[grid@racdb01 ~]$ crsctl replace votedisk +CRSNEW
Successful addition of voting disk 4ffbd2a9e98a4f0ebf3e2746685e6e16.
Successful addition of voting disk 5aafbc65e1594f7fbffb8820ac838dd9.
Successful addition of voting disk 6ba82447d0de4fd8bf3773613392b997.
Successful deletion of voting disk 135147ada70e4f57bf1dd2c75824e490.
Successfully replaced voting disk group with +CRSNEW.
CRS-4266: Voting file(s) successfully replaced
[grid@racdb01 ~]$ crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 4ffbd2a9e98a4f0ebf3e2746685e6e16 (ORCL:CRS2) [CRSNEW]
2. ONLINE 5aafbc65e1594f7fbffb8820ac838dd9 (ORCL:CRS3) [CRSNEW]
3. ONLINE 6ba82447d0de4fd8bf3773613392b997 (ORCL:CRS4) [CRSNEW]
Located 3 voting disk(s).

[@more@]
请使用浏览器的分享功能分享到微信等