柔中带刚,刚中带柔,淫荡中富含柔和,刚猛中荡漾风骚,无坚不摧,无孔不入!
全部博文(1669)
分类: Oracle
2011-12-05 10:46:16
在虚拟机上搭建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 论坛上找到了解决方法:
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 上还是有点问题。