重庆思庄Oracle、Redhat认证学习论坛

标题: 安装GI后重启操作系统后启动ASM实例失败及解决方法 [打印本页]

作者: stonebox    时间: 2015-6-8 10:43
标题: 安装GI后重启操作系统后启动ASM实例失败及解决方法

装环境及过程参考http://blog.itpub.net/28536251/viewspace-1689235/

安装完成后,重启操作系统,启动ASM实例报错如下:

[grid@oragrid ~]$ sqlplus / as sysasm

SQL*Plus: Release 11.2.0.4.0 Production on Sun Jun 7 16:21:31 2015

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

Connected to an idle instance.

SQL> startup

ORA-01078: failure in processing system parameters

ORA-29701: unable to connect to Cluster Synchronization Service

[grid@oragrid ~]$ crsctl check css

CRS-4639: Could not contact Oracle High Availability Services

CRS-4000: Command Check failed, or completed with errors.

[grid@oragrid ~]$ crsctl check has

CRS-4639: Could not contact Oracle High Availability Services

 

切换到root用户执行启动init.ohasd

[root@oragrid ~]# /bin/sh /etc/init.d/init.ohasd run &

[1] 8865

 

在切换到grid用户check

[grid@oragrid ~]$ crsctl check has

CRS-4638: Oracle High Availability Services is online

[grid@oragrid ~]$ crsctl check css

CRS-4529: Cluster Synchronization Services is online

[grid@oragrid ~]$ crsctl stat resource -t -init

--------------------------------------------------------------------------------

NAME           TARGET  STATE        SERVER                   STATE_DETAILS

--------------------------------------------------------------------------------

Local Resources

--------------------------------------------------------------------------------

ora.DATA.dg

               ONLINE  OFFLINE      oragrid

ora.LISTENER.lsnr

               ONLINE  OFFLINE      oragrid                  STARTING

ora.asm

               ONLINE  OFFLINE      oragrid                  Instance Shutdown

ora.ons

               OFFLINE OFFLINE      oragrid

--------------------------------------------------------------------------------

Cluster Resources

--------------------------------------------------------------------------------

ora.cssd

      1        ONLINE  OFFLINE

ora.diskmon

      1        OFFLINE OFFLINE

ora.evmd

      1        ONLINE  OFFLINE                               STARTING

 

原来是开机启动的init.ohasd没有起作用,重新启动一次就好了,也可以直接杀掉该进程,会自动重新生成一个。

 

[root@oragrid ~]# ps -ef | grep init.ohasd

root       972     1  0 22:01 ?        00:00:00 /bin/sh /etc/init.d/init.ohasd run

root      2474  2450  0 22:04 pts/0    00:00:00 grep init.ohasd

[root@oragrid ~]# kill -9 972

[root@oragrid ~]# ps -ef | grep init.ohasd

root      2538     1  0 22:05 ?        00:00:00 /bin/sh /etc/init.d/init.ohasd run

root      2638  2450  0 22:05 pts/0    00:00:00 grep init.ohasd

[root@oragrid ~]# su - grid

[grid@oragrid ~]$ crsctl check has

CRS-4638: Oracle High Availability Services is online

[grid@oragrid ~]$  crsctl check css

CRS-4529: Cluster Synchronization Services is online

[grid@oragrid ~]$ crs_stat -t

Name           Type           Target    State     Host

------------------------------------------------------------

ora.DATA.dg    ora....up.type ONLINE    ONLINE    oragrid

ora....ER.lsnr ora....er.type ONLINE    ONLINE    oragrid

ora.asm        ora.asm.type   ONLINE    ONLINE    oragrid

ora.cssd       ora.cssd.type  ONLINE    ONLINE    oragrid

ora.diskmon    ora....on.type OFFLINE   OFFLINE

ora.evmd       ora.evm.type   ONLINE    ONLINE    oragrid

ora.ons        ora.ons.type   OFFLINE   OFFLINE

 

再进入sqlplus就可以看到ASM实例已经启动了。但是每次操作系统重启都会出现这个问题,上述方法治标不治本,且没有找到最终的原因,请教高手解决。

在网上找到这篇文章,http://blog.csdn.net/tianlesoftware/article/details/8207629,说这个问题是11.2.0.1bug,但是我现在安装的版本是11.2.0.4,使用这篇文章的解决办法,在root用户下执行下面的命令:

[root@oragrid ~]# /bin/dd if=/var/tmp/.oracle/npohasd of=/dev/null bs=1024 count=1

^C0+0 records in

0+0 records out

0 bytes (0 B) copied, 13.6369 s, 0.0 kB/s

然后在grid用户下查看hascss状态,可以看到已经启动了

[grid@oragrid ~]$ crsctl check has

CRS-4638: Oracle High Availability Services is online

[grid@oragrid ~]$ crsctl check css

CRS-4529: Cluster Synchronization Services is online

[grid@oragrid ~]$ crs_stat -t

Name           Type           Target    State     Host

------------------------------------------------------------

ora.DATA.dg    ora....up.type ONLINE    ONLINE    oragrid

ora.FRA.dg     ora....up.type ONLINE    ONLINE    oragrid

ora....ER.lsnr ora....er.type ONLINE    ONLINE    oragrid

ora.asm        ora.asm.type   ONLINE    ONLINE    oragrid

ora.cssd       ora.cssd.type  ONLINE    ONLINE    oragrid

ora.diskmon    ora....on.type OFFLINE   OFFLINE

ora.evmd       ora.evm.type   ONLINE    ONLINE    oragrid

ora.ons        ora.ons.type   OFFLINE   OFFLINE

ora.stone.db   ora....se.type OFFLINE   OFFLINE

居然这个方法管用,但是系统重启后问题依旧,难道这个bug11.2.0.4还存在吗?
[此贴子已经被作者于2015-06-08 10:47:48编辑过]

作者: 郑全    时间: 2015-6-8 11:32

按理应该不存在,你多等一下看。

 






欢迎光临 重庆思庄Oracle、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2