ocr磁盘损坏恢复-只有一个磁盘组

https://support.oracle.com/epmos/faces/DocumentDisplay?parent=DOCUMENT&sourceId=1674859.1&id=1294915.1&_adf.ctrl-state=16vz5xe5z5_335&_afrLoop=275662822089522

ocr磁盘丢失,只有一个ocr磁盘

1、查看备份位置

$ ls -lrt $CRS_HOME/cdata/rac_cluster1/

-rw------- 1 root root 7086080 Dec 29 10:52 week.ocr

-rw------- 1 root root 7086080 Jan  1 02:52 day.ocr

-rw------- 1 root root 7086080 Jan  2 02:52 day_.ocr

-rw------- 1 root root 7086080 Jan  2 14:52 backup02.ocr

-rw------- 1 root root 7086080 Jan  2 18:52 backup01.ocr

-rw------- 1 root root 7086080 Jan  2 22:52 backup00.ocr

 

2、确保crs资源停止

# $CRS_HOME/bin/crsctl stop crs -f

 

3、启动crs资源

11.2.0.2 and above:

# $CRS_HOME/bin/crsctl start crs -excl -nocrs

 

4、创建ocr磁盘组

sqlplus / as sysasm

 

SQL*Plus: Release 11.2.0.1.0 Production on Thu Sep 2 08:39:18 2010

Copyright (c) 1982, 2010, Oracle. All rights reserved.

 

Connected to:

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

With the Real Application Clusters and Automatic Storage Management options

 

SQL> CREATE DISKGROUP OCR_DG external REDUNDANCY

DISK '/dev/mapper/ocrp1'

ATTRIBUTE 'compatible.asm'='11.2.0.4.0';

 

create diskgroup OCR_DG external redundancy disk '/dev/mapper/ocrp1' FORCE ATTRIBUTE 'compatible.asm'='11.2.0.4.0','compatible.rdbms'='11.2.0.4.0','au_size'='4M','cell.smart_scan_capable'='TRUE';

 

Diskgroup created.

 

SQL> exit

 

 

注意:如果出现以下错误

CREATE DISKGROUP OCR_DG external REDUNDANCY

DISK '/dev/mapper/ocrp1'

ATTRIBUTE 'compatible.asm'='11.2.0.4.0';  2    3  

CREATE DISKGROUP OCR_DG external REDUNDANCY

*

ERROR at line 1:

ORA-15018: diskgroup cannot be created

ORA-15031: disk specification '/dev/mapper/ocrp1' matches no disks

ORA-15014: path '/dev/mapper/ocrp1' is not in the discovery set

 

 

从以下方面检查

1、/dev/mapper/ocrp1 绑定磁盘权限问题

2、asm_disking参数是否为空

 

5、恢复ocr磁盘组

$CRS_HOME/bin/ocrconfig -restore  $CRS_HOME/cdata/rac_cluster1/backup02.ocr

 

6. 查看表决盘。 如果磁盘组已经被重建,应该是空的。

 

#$GI/bin/crsctl start resource ora.crsd -init

# $GI/bin/crsctl query css votedisk

 

 

7、重新创建 voting file

$CRS_HOME/bin/crsctl replace votedisk +OCR_DG

 

 

 

7、重建spfile

cat /tmp/pfile.txt

*.asm_power_limit=1

*.diagnostic_dest='/opt/app/oracle'

*.instance_type='asm'

*.large_pool_size=12M

*.remote_login_passwordfile='EXCLUSIVE'

 

Recreate the SPFILE for ASM

 

SQL> create spfile='+OCR_DG' from pfile='/tmp/pfile.txt';

 

File created.

SQL> exit

 

8、shutdown CRS 

 

GRID_HOME\bin\crsctl stop crs -f

 

9、start CRS 

# GRID_HOME\bin\crsctl start crs

展开阅读全文

没有更多推荐了,返回首页