crsctl replace votedisk +OCR2 (一个节点root执行)
先查询:
SQL>
select GROUP_NUMBER,
NAME,STATE,
type,TOTAL_MB,free_mb,VOTING_FILES,COMPATIBILITY from v$asm_diskgroup;
GROUP_NUMBER
NAME
STATE
TYPE
TOTAL_MB FREE_MB VO COMPATIBILITY
------------ ------------------------------------------------------------ ---------------------- ------------ ---------- ---------- -- ------------------------------------------------------------------------------------------------------------------------
1 DATA1
MOUNTED
EXTERN
15360
13502 N
11.2.0.0.0
2 FRA1
MOUNTED
EXTERN
5120
4790 N
11.2.0.0.0
3 OCR1
MOUNTED
NORMAL
3072
2146 Y
11.2.0.0.0
4 OCR2
MOUNTED
NORMAL
3072
2244 N
11.2.0.0.0
替换为新添加的OCR2:
[root@linuxidc ~]# crsctl replace votedisk +OCR2
Successful addition
of voting disk
83f3dea9f4c24fccbf05eaa163c5c087.
Successful addition
of voting disk ad21c1f0452e4f4abff906127ff9fcc3.
Successful addition
of voting disk
2771819c65984f85bf366e74ee85781a.
Successful deletion
of voting disk ab583d47c34a4f0ebfd46c8b04d7332b.
Successful deletion
of voting disk
853e95652d994fe3bfdf21ca23e65dfc.
Successful deletion
of voting disk
9f712a096a7b4f9bbfd811bff6462157.
Successfully replaced voting disk group with +OCR2.
CRS-
4266: Voting file(s) successfully replaced
再查询:
SQL> r
1*
select GROUP_NUMBER,
NAME,STATE,
type,TOTAL_MB,free_mb,VOTING_FILES,COMPATIBILITY from v$asm_diskgroup
GROUP_NUMBER
NAME
STATE
TYPE
TOTAL_MB FREE_MB VO COMPATIBILITY
------------ ------------------------------------------------------------ ---------------------- ------------ ---------- ---------- -- ------------------------------------------------------------------------------------------------------------------------
1 DATA1
MOUNTED
EXTERN
15360
13502 N
11.2.0.0.0
2 FRA1
MOUNTED
EXTERN
5120
4790 N
11.2.0.0.0
3 OCR1
MOUNTED
NORMAL
3072
2242 N
11.2.0.0.0
4 OCR2
MOUNTED
NORMAL
3072
2148 Y
11.2.0.0.0
发现已经voting file已经在OCR2上,然后在两个节点root查询:
ocrcheck && crsctl query css votedisk
[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 83f3dea9f4c24fccbf05eaa163c5c087 (/dev/asm-diski) [OCR2]
2. ONLINE ad21c1f0452e4f4abff906127ff9fcc3 (/dev/asm-diskj) [OCR2]
3. ONLINE 2771819c65984f85bf366e74ee85781a (/dev/asm-diskk) [OCR2]
Located
3 voting disk(s).
[root@jyrac2 ~]# 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 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.1.4 创建ASM实例spfile到新创建的OCR2 ASM磁盘组上