脚踏实地、勇往直前!
全部博文(1005)
分类: Oracle
2017-07-05 13:15:30
环境:
OS:CentOS 7
DB:11.2.0.4
原来的CRS磁盘
[root@host01 bin]# ./crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 94fb7b495e204fdabf9f5ceec8d6f86e (ORCL:OCR1) [OCR]
2. ONLINE 3386c068bd524f6bbf3c15d383913ca6 (ORCL:OCR2) [OCR]
3. ONLINE 87d54edfeaa44f48bfa789d3b083f856 (ORCL:OCR3) [OCR]
Located 3 voting disk(s).
现在的CRS磁盘
[root@host01 bin]# ./crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 106a87848a5b4fedbf4ddbcbd1e26e37 (/dev/asm-ocr1) [OCR]
2. ONLINE 7ae040313a5a4fa7bf834a292fcb59ac (/dev/asm-ocr2) [OCR]
3. ONLINE 9b572ed4a7094ff0bf3694e3cc3ec711 (/dev/asm-ocr3) [OCR]
Located 3 voting disk(s).
变更过程
1.采用udev 绑定asm-ocr1、asm-ocr2、asm-ocr3
原来是采用oracleasm创建的磁盘,现在采用udev方式
2.清空原有磁盘
dd if=/dev/zero of=/dev/sdb1 bs=1024 count=1000
dd if=/dev/zero of=/dev/sdc1 bs=1024 count=1000
dd if=/dev/zero of=/dev/sdd1 bs=1024 count=1000
3.删除原来的磁盘
/etc/init.d/oracleasm deletedisk OCR1
/etc/init.d/oracleasm deletedisk OCR2
/etc/init.d/oracleasm deletedisk OCR3
4.在其中一个节点上独占模式启动
#./crsctl start crs -excl -nocrs
5.修改asm_diskstring
alter system set asm_diskstring='/dev/asm*';
6.重新创建OCR磁盘
SQL> create diskgroup OCR normal redundancy disk '/dev/asm-ocr1','/dev/asm-ocr2','/dev/asm-ocr3' ATTRIBUTE 'compatible.rdbms' = '11.2', 'compatible.asm' = '11.2';
Diskgroup created.
7.恢复OCR磁盘
#./ocrconfig -restore /u01/oracle/app/crs_home/cdata/rac-cluster/backup00.ocr
#./crsctl replace votedisk +OCR
-- The End --