Oracle RAC 更换存储实验(4)

一个节点grid用户登录ASM实例执行:
create pfile='/tmp/asmpfile.ora' from spfile;
create spfile='+OCR2' from pfile='/tmp/asmpfile.ora';

SQL> show parameter pfile NAME TYPE VALUE ------------------------------------ ---------------------- ------------------------------ spfile string +OCR1/jyrac-scan/asmparameterf ile/registry.253.919993739 SQL> create pfile='/tmp/asmpfile.ora' from spfile; File created. SQL> create spfile='+OCR2' from pfile='/tmp/asmpfile.ora'; File created. SQL> show parameter pfile NAME TYPE VALUE ------------------------------------ ---------------------- ------------------------------ spfile string +OCR1/jyrac-scan/asmparameterf ile/registry.253.919993739 2.1.5 删除OCR原位置ASM磁盘组OCR1

一个节点root执行:
[root@linuxidc ~]# ocrconfig -delete +OCR1

两个节点root执行:
查看OCR和VOTE新状态与位置
[root@linuxidc ~]# ocrcheck && crsctl query css votedisk

[root@linuxidc ~]# ocrconfig -delete +OCR1 [root@linuxidc ~]# ocrcheck && crsctl query css votedisk Status of Oracle Cluster Registry is as follows : Version : 3 Total space (kbytes) : 262120 Used space (kbytes) : 3116 Available space (kbytes) : 259004 ID : 1718040627 Device/File Name : +OCR2 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 ## STATE File Universal Id File Name Disk group -- ----- ----------------- --------- --------- 1. ONLINE 83f3dea9f4c24fccbf05eaa163c5c087 (/dev/asm-diski) [OCR2] 2. ONLINE ad21c1f0452e4f4abff906127ff9fcc3 (/dev/asm-diskj) [OCR2] 3. ONLINE 2771819c65984f85bf366e74ee85781a (/dev/asm-diskk) [OCR2] Located 3 voting disk(s). 节点2的ocrcheck输出也没问题,略。 2.1.6 重启整个集群

两个节点root执行:
crsctl stop crs && crsctl start crs

2.1.7 将旧的磁盘组drop掉

检查参数文件:

SQL> show parameter pfile NAME TYPE VALUE ------------------------------------ ---------------------- ------------------------------ spfile string +OCR2/jyrac-scan/asmparameterf ile/registry.253.920008067

检查磁盘组状态:

Select GROUP_NUMBER,NAME,STATE,type,TOTAL_MB,free_mb,VOTING_FILES,COMPATIBILITY from v$asm_diskgroup; select GROUP_NUMBER,DISK_NUMBER,STATE,REDUNDANCY,TOTAL_MB,FREE_MB,name,path,failgroup from v$asm_disk order by GROUP_NUMBER;

最后将旧的磁盘组mount并drop掉:
alter diskgroup OCR1 mount;
drop diskgroup OCR1 including contents;

SQL> alter diskgroup OCR1 mount; Diskgroup altered. SQL> drop diskgroup OCR1 including contents; Diskgroup dropped.

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/9ea64d8ab1a01a5443dcb7ccbd3af378.html