背景:ocr掉盘,但确定磁盘无问题,需要加进去,记录大佬方案
一、查看vote 当前磁盘情况(显示有两块,少一块)
/home/grid$crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE 1a2xxxxXXXXXX6d (/dev/raw/raw4) [OCR]
2. ONLINE 5XXXXXXXXXXXX7 (/dev/raw/raw5) [OCR]
Located 2 voting disk(s).
二、asmcmd进去查看完全正常的盘是哪块:
ASMCMD> lsdsk -G ocr
Path
/dev/raw/raw5
三、sysasm中查看ocr三块磁盘状态(/dev/raw/raw4磁盘为MISSING,先不能动)
X2:/home/grid$sqlplus / as sysasm
SQL*Plus: Release 11.2.0.4.0 Production on Thu Aug 4 10:31:18 2022
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Real Application Clusters and Automatic Storage Management options
SQL> set lin 200
SQL> col path for a22
SQL> col name for a12
SQL> select MOUNT_STATUS,HEADER_STATUS,MODE_STATUS,STATE,NAME,PATH from v$asm_disk;
MOUNT_STATUS HEADER_STATUS MODE_STATUS STATE NAME PATH
-------------- ------------------------ -------------- ---------------- ------------ ----------------------
CLOSED MEMBER ONLINE NORMAL /dev/raw/raw4
CLOSED MEMBER ONLINE NORMAL /dev/raw/raw3
MISSING UNKNOWN OFFLINE FORCING _DROPPED_000
1_OCR
CACHED MEMBER ONLINE NORMAL OCR_0002 /dev/raw/raw5
CACHED MEMBER ONLINE NORMAL DATA_0000 /dev/raw/raw2
CACHED MEMBER ONLINE NORMAL ARCH_0000 /dev/raw/raw1
6 rows selected.
SQL> select group_number,name,total_mb/1024 total_gb,free_mb/1024 free_gb,TYPE from v$asm_diskgroup;
GROUP_NUMBER NAME TOTAL_GB FREE_GB TYPE
------------ ------------ ---------- ---------- ------------
3 OCR 1 .61328125 NORMAL
2 DATA 100 7.11523438 EXTERN
1 ARCH 100 92.796875 EXTERN
===========以下操作请谨慎核对磁盘号====================
四、强制add已经完全被踢出去的磁盘/dev/raw/raw3到OCR磁盘组:
alter diskgroup OCR add disk '/dev/raw/raw3' force;
五、再次确认状态,发现/dev/raw/raw3已经正常添加到vote里(可以看到有问题的磁盘/dev/raw/raw4已经被踢出去换成了/dev/raw/raw3):
zbi01xqglr2:/home/grid$crsctl query css votedisk
## STATE File Universal Id File Name Disk group
-- ----- ----------------- --------- ---------
1. ONLINE XXXXXXXXXXXXXXXXx (/dev/raw/raw3) [OCR]
2. ONLINE XXXXXXXXXXXXXXXXx (/dev/raw/raw5) [OCR]
Located 2 voting disk(s).
二、asmcmd进去查看完全正常的盘是哪块:
ASMCMD> lsdsk -G ocr
Path
/dev/raw/raw3
/dev/raw/raw5
六、最后将/dev/raw/raw4重新添加到OCR磁盘组中:
alter diskgroup OCR add disk '/dev/raw/raw4' force;