ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 【测试-RAC】CRS崩溃后快速改单节点启动

【测试-RAC】CRS崩溃后快速改单节点启动

原创 Linux操作系统 作者:浪漫双鱼 时间:2012-01-09 16:00:23 0 删除 编辑

   RAC数据库CRS崩溃,如果不能立即修复,可采取单机启动ASM的方式直接打开数据库,使业务能正常进行。ASM单节点方式运行只需要css进程存在即可,操作如下:

 

一、首先需要删除CRS的安装信息

1:  $ORA_CRS_HOME/install/rootdelete.sh -help
对本地节点和远程节点使用不用的命令,详细参考帮助。

rootdelete.sh local nosharedvar nosharedhome

最后在本地节点执行
2:  $ORA_CRS_HOME/install/rootdeinstall.sh

 

二、执行单机初始化cssd

[root@rac1 bin]#cd /u01/app/oracle/product/10.2.0/db_1/bin

[root@rac1 bin]# ./localconfig add

/u01/app/oracle/product/10.2.0/db_1/bin/crsctl.bin: error while loading shared libraries: libclntsh.so.10.1: cannot open shared object file: No such file or directory

/u01/app/oracle/product/10.2.0/db_1/bin/clscfg.bin: error while loading shared libraries: libuini10.so: cannot open shared object file: No such file or directory

Configuration for local CSS has been initialized

Failed configure CSS. Fix the problem and rerun this script. from destination Oracle home with 'reset' argument

    这里报找不到共享lib的错误,参考oracle文档Note:387713.1采用如下方法处理即可:

[root@rac1 bin]#  vi /etc/ld.so.conf

include ld.so.conf.d/*.conf

/u01/app/oracle/product/10.2.0/db_1/lib/

 

先执行ldconfig 重新加载lib库,再次执行localconfig add

[root@rac1 bin]# ./localconfig add

Successfully accumulated necessary OCR keys.

Creating OCR keys for user 'root', privgrp 'root'..

Operation successful.

Configuration for local CSS has been initialized

 

Adding to inittab

Startup will be queued to init within 90 seconds.

Checking the status of new Oracle init process...

Expecting the CRS daemons to be up within 600 seconds.

在这里长时间没有反应,通过sh –x跟踪shell检查下问题

[root@rac1 bin]# sh -x ./crsctl check install -wait 600

+ ORA_CRS_HOME=/u01/app/oracle/product/10.2.0/crs_1

+ ORACLE_HOME=/u01/app/oracle/product/10.2.0/crs_1

+ export ORA_CRS_HOME ORACLE_HOME

+ case `/bin/uname` in

++ /bin/uname

+ LD_LIBRARY_PATH=/u01/app/oracle/product/10.2.0/crs_1/lib

+ export LD_LIBRARY_PATH

+ case $0 in

+ exec ./crsctl.bin check install -wait 600

Expecting the CRS daemons to be up within 600 seconds.

 

发现执行这个命令时系统去找/u01/app/oracle/product/10.2.0/crs_1目录,这个crs目录是安装crs的目录.这里发现一个问题,就是如果安装了crs,就一定会去寻找这个目录,我检查执行脚本,发现要改动的文件如下:/u01/app/oracle/product/10.2.0/db_1/bin/crsctl

/u01/app/oracle/product/10.2.0/db_1/css/admin/init.cssd

当更改这两个文件后还是需要用到crs的目录,看来有更深层次的文件绑定,crs home目录损坏的这种极端情况暂时只有不考虑了。

 

下面的步骤是在crs目录仍然存在的情况下操作的。

c1 bin]# ./localconfig add 

Successfully accumulated necessary OCR keys.

Creating OCR keys for user 'root', privgrp 'root'..

Operation successful.

Configuration for local CSS has been initialized

 

Adding to inittab

Startup will be queued to init within 90 seconds.

Checking the status of new Oracle init process...

Expecting the CRS daemons to be up within 600 seconds.

 CSS is active on these nodes.

        rac1

CSS is active on all nodes.

Oracle CSS service is installed and running under init(1M)

 

c1 bin]#su - oracle

rac1-> export ORACLE_SID=+ASM1

rac1-> sqlplus '/ as sysdba'

 

SQL*Plus: Release 10.2.0.1.0 - Production on Sun Jan 8 21:49:59 2012

 

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

 

Connected to an idle instance.

 

SQL> startup

ASM instance started

 

Total System Global Area   92274688 bytes

Fixed Size                  1217884 bytes

Variable Size              65890980 bytes

ASM Cache                  25165824 bytes

ASM diskgroups mounted

SQL> exit

Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production

With the Partitioning, Real Application Clusters, OLAP and Data Mining options

rac1-> exit

logout

 

[root@rac1 ~]# su - oracle

rac1-> sqlplus '/ as sysdba'

 

SQL*Plus: Release 10.2.0.1.0 - Production on Sun Jan 8 21:50:50 2012

 

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

 

Connected to an idle instance.

 

SQL> startup

ORACLE instance started.

 

Total System Global Area  184549376 bytes

Fixed Size                  1218412 bytes

Variable Size              88082580 bytes

Database Buffers           92274688 bytes

Redo Buffers                2973696 bytes

Database mounted.

 Database opened.

 

参考文档:

Note:387713.1

Please check whether shlr_b12_sp4  
binary is linked with libclntsh.so.10.1 or not like as following.

Please locate libclntsh.so.10.1 in your $ORACLE_HOME/lib.
As root user open file called /etc/ld.so.conf and append the entry $ORACLE_HOME/lib as like
following.

vi /etc/ld.so.conf

/u01/app/oracle/product/devang/lib/ ( Append this entry dont delete existing entries )

:wq

4.As root fire ldconfig command which would regenerate ld.so.1 with new entry which you made.

5.Check with ldd command whether sysresv is now linked with libclntsh.so.9.0 or not as per
following.

$ldd `which sysresv`
/lib/libcwait.so (0x40001000)
libclntsh.so.10.1 => /u01/app/oracle/product/devang/lib/libclntsh.so.10.1 (0x40023000)
libnnz10.so => /u01/app/oracle/product/devang/lib/libnnz10.so (0x40dc6000)
libdl.so.2 => /lib/libdl.so.2 (0x40fca000)
libm.so.6 => /lib/libm.so.6 (0x40fce000)
libpthread.so.0 => /lib/libpthread.so.0 (0x40ff1000)
libnsl.so.1 => /lib/libnsl.so.1 (0x41043000)
libc.so.6 => /lib/libc.so.6 (0x41057000)
/lib/ld-linux.so.2 (0x0035f000)

6.Then run sysresv command.

 

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/11088128/viewspace-714619/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2007-12-10

  • 博文量
    87
  • 访问量
    232564