标签归档:ASM

Oracle 11.1.0.7 , Single Instance, Clusterware, Giving up: Oracle CSS stack appears NOT to be running.

今天恢复旧的11.1.0.7单机ASM数据库环境,用来恢复原有的11.1.0.7的数据库备份,按照以前的方法操作如下:

1.清空当前clusterware环境:

rm -rf /etc/oracle
rm -rf /var/tmp/.oracle/*
rm -rf /tmp/.oracle
rm -rf /home/user01/oracle/11g/Clusterware
rm -rf /home/user01/oracle/11g/checkpoints

# vi /etc/inittab ,去掉最后的crs启动命令。

# init q;

# mv $ORA_CRS_HOME to a new location

# reboot

2.重新配置11.1.0.7 single instance clusterware [为了使用ASM]

#/home/user01/oracle/11g/crs_11gProd/bin/localconfig reset

这一步运行出错,报错如下:

Successfully accumulated necessary OCR keys.
Creating OCR keys for user ‘root’, privgrp ‘root’..
Operation successful.
Configuration for local CSS has been initialized

Cleaning up Network socket directories
Setting up Network socket directories
Adding to inittab
Startup will be queued to init within 30 seconds.
Checking the status of new Oracle init process…
Expecting the CRS daemons to be up within 600 seconds.
ls /home/user01/oracle/11g/crs_11gProd/cdata/localhost/local.ocrGiving up: Oracle CSS stack appears NOT to be running.
Oracle CSS service would not start as installed
Automatic Storage Management(ASM) cannot be used until Oracle CSS service is started

ps -ef|grep crs, 没有进行在运行。

查看 $ORA_CRS_HOME/log/hostname/alertxxxx.log文件,未发现错误。查看Crsd和cssd目录的log,没有发现错误。

重新清空环境,再次操作,错误依旧。

查看/var/log/message文件,发现如下log:

Apr  7 05:30:08 host01 logger: Waiting for filesystem containing /home/user01/oracle/crs_11gR2/bin/crsctl.
Apr  7 05:31:08 host01 logger: Waiting for filesystem containing /home/user01/oracle/crs_11gR2/bin/crsctl.

怀疑是以前历史记录没有清除干净,造成运行root后,查找的是旧的crsctl。

crs_11gR2目录已经删除,不应该再被引用。

检查配置文件和脚本,查找原因。

到/etc/init.d/目录

grep crs_11gR2 *

发现init.ohasd和ohasd两个文件中包含上述路径,删除这两个文件。

#nit q;

发现后台仍然报

host01 logger: Waiting for filesystem containing /home/user01/oracle/crs_11gR2/bin/crsctl.
错误,

#reboot

reboot后message里面的错误提示消失,重新运行配置命令。

#/home/user01/oracle/11g/crs_11gProd/bin/localconfig reset

Successfully accumulated necessary OCR keys.
Creating OCR keys for user ‘root’, privgrp ‘root’..
Operation successful.
Configuration for local CSS has been initialized

Cleaning up Network socket directories
Setting up Network socket directories
Adding to inittab
Startup will be queued to init within 30 seconds.
Checking the status of new Oracle init process…
Expecting the CRS daemons to be up within 600 seconds.
Cluster Synchronization Services is active on these nodes.
        host01
Cluster Synchronization Services is active on all the nodes.
Oracle CSS service is installed and running under init(1M)

配置成功。