Oracle RAC 更换存储实验(2)

查看某个磁盘大小:

[root@linuxidc ~]# fdisk -l /dev/asm-diski Disk /dev/asm-diski: 1073 MB, 1073741824 bytes 255 heads, 63 sectors/track, 130 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00000000

确定/dev/asm-diski,/dev/asm-diskj,/dev/asm-diskk对应的是新加的1G大小的3个盘
用于创建新的OCR2

二、更换存储 2.1迁移OCR1到OCR2 2.1.1 创建新的OCR2磁盘组

su – grid
sqlplus / as sysasm
CREATE DISKGROUP OCR2 NORMAL REDUNDANCY DISK '/dev/asm-diski', '/dev/asm-diskj', '/dev/asm-diskk' ATTRIBUTE 'compatible.asm'='11.2';

SQL> CREATE DISKGROUP OCR2 NORMAL REDUNDANCY DISK '/dev/asm-diski', '/dev/asm-diskj', '/dev/asm-diskk' ATTRIBUTE 'compatible.asm'='11.2'; Diskgroup created.

查看两个节点是否添加了OCR2:

--节点1: SQL> r 1* select name, TOTAL_MB, FREE_MB, state, type, COMPATIBILITY from v$asm_diskgroup NAME TOTAL_MB FREE_MB STATE TYPE COMPATIBILITY ------------------------------------------------------------ ---------- ---------- ---------------------- ------------ ------------------------------------------------------------------------------------------------------------------------ DATA1 15360 13502 MOUNTED EXTERN 11.2.0.0.0 FRA1 5120 4790 MOUNTED EXTERN 11.2.0.0.0 OCR1 3072 2146 MOUNTED NORMAL 11.2.0.0.0 OCR2 3072 2913 MOUNTED NORMAL 11.2.0.0.0 --节点2: SQL> select name, TOTAL_MB, FREE_MB, state, type, COMPATIBILITY from v$asm_diskgroup 2 ; NAME TOTAL_MB FREE_MB STATE TYPE COMPATIBILITY ------------------------------------------------------------ ---------- ---------- ---------------------- ------------ ------------------------------------------------------------------------------------------------------------------------ DATA1 15360 13502 MOUNTED EXTERN 11.2.0.0.0 FRA1 5120 4790 MOUNTED EXTERN 11.2.0.0.0 OCR1 3072 2146 MOUNTED NORMAL 11.2.0.0.0 OCR2 0 0 DISMOUNTED 0.0.0.0.0

发现节点2需要手动mount新加的ASM磁盘组
sqlplus / as sysasm

SQL> alter diskgroup OCR2 mount; Diskgroup altered. 2.1.2 添加OCR信息到OCR2

more /etc/oracle/ocr.loc
ocrconfig -add +OCR2
ocrcheck -config
more /etc/oracle/ocr.loc

[root@linuxidc ~]# more /etc/oracle/ocr.loc ocrconfig_loc=+OCR1 local_only=FALSE [root@linuxidc ~]# ocrconfig -add +OCR2 [root@linuxidc ~]# [root@linuxidc ~]# ocrcheck -config Oracle Cluster Registry configuration is : Device/File Name : +OCR1 Device/File Name : +OCR2 [root@linuxidc ~]# more /etc/oracle/ocr.loc #Device/file getting replaced by device +OCR2 ocrconfig_loc=+OCR1 ocrmirrorconfig_loc=+OCR2 local_only=false [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 : +OCR1 Device/File integrity check succeeded Device/File Name : +OCR2 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 ## STATE File Universal Id File Name Disk group -- ----- ----------------- --------- --------- 1. ONLINE ab583d47c34a4f0ebfd46c8b04d7332b (/dev/asm-diskb) [OCR1] 2. ONLINE 853e95652d994fe3bfdf21ca23e65dfc (/dev/asm-diskc) [OCR1] 3. ONLINE 9f712a096a7b4f9bbfd811bff6462157 (/dev/asm-diskd) [OCR1] Located 3 voting disk(s). 2.1.3迁移VOTE DISK到新创建的ASM磁盘组OCR2上

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

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