oracleasm deletedisk - Clearing disk header failed 的解决方法

在虚拟机上搭建 Oracle 11gR2 RAC 安装 Clusterware 的时候出了一点错误。 所以强行把 Clusterware 给删除了。 清除了相关的目录和文件。 因为 11gr2 OCR 是存放在 ASM 上的,所以需要清除这部分信息。  

[root@rac2 ~]# oracleasm listdisks

CRS

DATA

FRA

[root@rac2 ~]# oracleasm deletedisk CRS

Clearing disk header: failed

Unable to clear disk "CRS"

[root@rac2 ~]# oracleasm scandisks

Reloading disk partitions: done

Cleaning any stale ASM disks...

Scanning system for ASM disks...

[root@rac2 ~]# oracleasm listdisks

CRS

DATA

FRA

可是删除报 Clearing disk header: failed 错误。 尝试把另一个节点的 ASM 停止掉删除,还是不行。  

看了一下 oracleasm log

[root@rac1 mapper]# tail -20 /var/log/oracleasm

Cleaning disk "DATA"

Validating disk "FRA"

Unmounting ASMlib driver filesystem: /dev/oracleasm

Unloading module "oracleasm": oracleasm

Disk "CRS" does not exist or is not instantiated

Clearing disk header: done

Loading module "oracleasm": oracleasm

Mounting ASMlib driver filesystem: /dev/oracleasm

Reloading disk partitions: done

Cleaning any stale ASM disks...

Scanning system for ASM disks...

Disk "FRA" does not exist or is not instantiated

Instantiating disk "FRA"

oracleasm-read-label: Unable to read device "/dev/sdb": Input/output error

oracleasm-read-label: Unable to read device "/dev/sdf": Input/output error

Disk "DATA" does not exist or is not instantiated

Instantiating disk "DATA"

oracleasm-read-label: Unable to read device "/dev/sdd": Input/output error

Disk "FRA" is a valid ASM disk

Disk "DATA" is a valid ASM disk

google 了一下。   Oracle 论坛上找到了解决方法:

http://forums.oracle.com/forums/thread.jspa?threadID=969534

 

Same problem with 11.2.0.1 on x86-64 RH Linux 5.4.
Had to :
1. shutdown CRS on all nodes of the cluster (# ./crsctl stop crs)
2. disable CRS from starting on reboot (# ./crsctl disable crs)
3. Reboot all the servers (# shutdown -r now)
4. After reboot, stop ASMLIB (# service oracleasm stop)
5. Remove the disk using physical name rather than logical name (service oracleasm deletedisk /dev/mapper/mpath01p1)
6. Restart ASMLIB (# service oracleasm start)
7. Enable CRS on re-boot (# ./crsctl disable crs)

因为我之前的 Cluster 已经删除,所以直接停 ASM server 删除就可以了。

[root@rac1 mapper]# service oracleasm stop

Dropping Oracle ASMLib disks: [  OK  ]

Shutting down the Oracle ASMLib driver: [  OK  ]

[root@rac1 mapper]# ls

control  crs  crsp1  data  datap1  fra  frap1

[root@rac1 mapper]# service oracleasm deletedisk /dev/mapper/crsp1

Removing ASM disk "/dev/mapper/crsp1": [  OK  ]

[root@rac1 mapper]# service oracleasm start

Initializing the Oracle ASMLib driver: [  OK  ]

Scanning the system for Oracle ASMLib disks: [  OK  ]

[root@rac1 mapper]# oracleasm listdisks

DATA

FRA  

搞定。   到另一个节点查看:  

[root@rac2 ~]# oracleasm listdisks

CRS

DATA

FRA

[root@rac2 ~]# oracleasm scandisks

Reloading disk partitions: done

Cleaning any stale ASM disks...

Cleaning disk "CRS"

Scanning system for ASM disks...

[root@rac2 ~]# oracleasm listdisks

DATA

FRA  

也同步了。 看来 ASM 11 Linux 5.4 上还是有点问题。

 

参考至:http://blog.csdn.net/tianlesoftware/archive/2010/11/13/6007437.aspx

如有错误,欢迎指正

邮箱:[email protected]

你可能感兴趣的:(thread,oracle,linux,.net,Google)