Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1192925
  • 博文数量: 245
  • 博客积分: 10185
  • 博客等级: 上将
  • 技术积分: 2744
  • 用 户 组: 普通用户
  • 注册时间: 2006-10-30 17:07
文章分类

全部博文(245)

文章存档

2015年(1)

2014年(1)

2013年(1)

2012年(1)

2011年(37)

2010年(20)

2009年(14)

2008年(38)

2007年(88)

2006年(44)

分类: Oracle

2009-01-12 22:20:48

dbca创建db时发现没有rac环境下的选项(第一页没有出现选择本地还是集群安装的选择),怀疑是crs未启动,用crs_stat命令检查

oracle@lxsfrac08 # crs_stat -t

CRS-0184: Cannot communicate with the CRS daemon.

提示不能连接crs后台进程。说明crs后台进程未启动

 

尝试重起crs后台进程

 

/etc/init.d/init.crs start

 

root@lxsfrac08 # /etc/init.d/init.crs start

Startup will be queued to init within 30 seconds.

提示会在30秒后启动crs,但检查进程,未发现启动的crs进程

 

root@lxsfrac08 # ps -ef|grep crs

    root  3446     1   0 13:06:32 ?           0:00 /bin/sh /etc/init.d/init.crsd run

    root 16937  5622   0 16:34:24 pts/5       0:00 grep crs

root@lxsfrac08 #

r

 

正常的crs进程应该有多个

 

[oracle@rac2 ~]$ ps -ef|grep crs

root      3341     1  0 17:10 ?        00:00:00 /bin/su -l oracle -c sh -c 'ulimit -c unlimited; cd /orac/crs/10.2.0/log/rac2/evmd; exec /orac/crs/10.2.0/bin/evmd '

root      3846     1  3 17:10 ?        00:01:12 /orac/crs/10.2.0/bin/crsd.bin reboot

oracle    4493  3341  0 17:11 ?        00:00:01 /orac/crs/10.2.0/bin/evmd.bin

root      4621  4478  0 17:11 ?        00:00:00 /bin/su -l oracle -c /bin/sh -c 'ulimit -c unlimited; cd /orac/crs/10.2.0/log/rac2/cssd;  /orac/crs/10.2.0/bin/ocssd  || exit $?'

oracle    4622  4621  0 17:11 ?        00:00:00 /bin/sh -c ulimit -c unlimited; cd /orac/crs/10.2.0/log/rac2/cssd;  /orac/crs/10.2.0/bin/ocssd  || exit $?

oracle    4648  4622  0 17:11 ?        00:00:07 /orac/crs/10.2.0/bin/ocssd.bin

oracle    4964  4493  0 17:11 ?        00:00:00 /orac/crs/10.2.0/bin/evmlogger.bin -o /orac/crs/10.2.0/evm/log/evmlogger.info -l /orac/crs/10.2.0/evm/log/evmlogger.log

oracle    5522     1  0 17:12 ?        00:00:00 /orac/crs/10.2.0/opmn/bin/ons -d

oracle    5523  5522  0 17:12 ?        00:00:00 /orac/crs/10.2.0/opmn/bin/ons -d

oracle   22410 26125  0 17:44 pts/2    00:00:00 grep crs

 

尝试关闭crs

root@lxsfrac08 # /etc/init.d/init.crs stop

Shutting down Oracle Cluster Ready Services (CRS):

OCR initialization failed with invalid format: PROC-22: The OCR backend has an invalid format

Shutdown has begun. The daemons should exit soon.

 

察看日志

 

oracle@lxsfrac08 # cd /opt/app/oracle/product/10.2.0/crs/log

oracle@lxsfrac08 # ls -rlt

total 4

drwxrwx---   2 oracle   oinstall     512 Feb 15 16:05 crs

drwxr-xr-t   8 root     oinstall     512 Feb 15 16:13 lxsfrac08

oracle@lxsfrac08 # cd lxsfrac08

oracle@lxsfrac08 # ls -rlt

total 14

drwxr-x---   2 oracle   oinstall     512 Feb 15 16:13 admin

drwxr-x---   2 oracle   oinstall     512 Feb 15 16:13 evmd

drwxr-x---   2 root     oinstall     512 Feb 15 16:13 crsd

drwxr-x---   3 oracle   oinstall     512 Feb 15 16:13 cssd

drwxr-x---   2 oracle   oinstall     512 Feb 15 16:18 client

drwxrwxr-t   5 oracle   oinstall     512 Feb 15 17:30 racg

-rw-rw-r--   1 root     oinstall     962 Feb 15 17:37 alertlxsfrac08.log

oracle@lxsfrac08 # tail -f alertlxsfrac08.log

2008-02-15 16:13:33.665

[crsd(28976)]CRS-1201:CRSD started on node lxsfrac08.

2008-02-15 17:29:55.920

[cssd(29300)]CRS-1607:CSSD evicting node lxsfrac07. Details in /opt/app/oracle/product/10.2.0/crs/log/lxsfrac08/cssd/ocssd.log.

2008-02-15 17:29:56.032

[cssd(29300)]CRS-1601:CSSD Reconfiguration complete. Active nodes are lxsfrac08 .

2008-02-15 17:30:00.525

[crsd(28976)]CRS-1204:Recovering CRS resources for node lxsfrac07.

2008-02-15 17:37:30.222

[cssd(29300)]CRS-1603:CSSD on node lxsfrac08 shutdown by user.

错误原因:

1)      mount /ocrvote之前,看见/ocrvoteocrvote文件,就在mount之后又,贸然生成一个新的ocrvote文件. CRS启动时需要检查ocrvote文件,发现文件为空,导致无法启动.

未明确认识到: 以前建的ocrvote文件是建在dg之上,只需要mount就能看见.无需也不能新建.

2) 

 

 

将当前的css文件清空(/var/opt/oracle/scls_scr/$nodename/oracle/下当前文件

 

重新生成ocrvote文件.

 

oracle@lxsfrac08 # cd /var/opt/oracle/scls_scr/lxsfrac08/oracle

oracle@lxsfrac07 # ls -rlt

total 2

-rw-r--r--   1 oracle   root           7 Feb 15 16:13 cssfatal

oracle@lxsfrac08 # mv cssfatal cssfatal_old

 

 

oracle@lxsfrac08 # /opt/app/oracle/product/10.2.0/crs/root.sh

oracle@lxsfrac08 # exit

logout

root@lxsfrac08 #

root@lxsfrac08 # /opt/app/oracle/product/10.2.0/crs/root.sh

WARNING: directory '/opt/app/oracle/product/10.2.0' is not owned by root

WARNING: directory '/opt/app/oracle/product' is not owned by root

WARNING: directory '/opt/app/oracle' is not owned by root

WARNING: directory '/opt/app' is not owned by root

Checking to see if Oracle CRS stack is already configured

Checking to see if any 9i GSD is up

 

Setting the permissions on OCR backup directory

Setting up NS directories

Oracle Cluster Registry configuration upgraded successfully

WARNING: directory '/opt/app/oracle/product/10.2.0' is not owned by root

WARNING: directory '/opt/app/oracle/product' is not owned by root

WARNING: directory '/opt/app/oracle' is not owned by root

WARNING: directory '/opt/app' is not owned by root

clscfg: EXISTING configuration version 3 detected.

clscfg: version 3 is 10G Release 2.

Successfully accumulated necessary OCR keys.

Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.

node :

node 0: lxsfrac07 lxsfrac07-priv lxsfrac07

node 1: lxsfrac08 lxsfrac08-priv lxsfrac08

clscfg: Arguments check out successfully.

 

NO KEYS WERE WRITTEN. Supply -force parameter to override.

-force is destructive and will destroy any previous cluster

configuration.

Oracle Cluster Registry for cluster has already been initialized

Startup will be queued to init within 30 seconds.

Adding daemons to inittab

Expecting the CRS daemons to be up within 600 seconds.

CSS is active on these nodes.

        lxsfrac07

        lxsfrac08

CSS is active on all nodes.

Oracle CRS stack installed and running under init(1M)

Running vipca(silent) for configuring nodeapps

 

Creating VIP application resource on (2) nodes...

Creating GSD application resource on (2) nodes...

Creating ONS application resource on (2) nodes...

Starting VIP application resource on (2) nodes...

Starting GSD application resource on (2) nodes...

Starting ONS application resource on (2) nodes...

 

 

Done.

root@lxsfrac08 # crs_stat -t

-bash: crs_stat: command not found

root@lxsfrac08 # su - oracle

Sun Microsystems Inc.   SunOS 5.10      Generic January 2005

oracle@lxsfrac08 #  crs_stat -t

Name           Type           Target    State     Host        

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

ora....c07.gsd application    ONLINE    ONLINE    lxsfrac07  

ora....c07.ons application    ONLINE    ONLINE    lxsfrac07  

ora....c07.vip application    ONLINE    ONLINE    lxsfrac07  

ora....c08.gsd application    ONLINE    ONLINE    lxsfrac08  

ora....c08.ons application    ONLINE    ONLINE    lxsfrac08  

ora....c08.vip application    ONLINE    ONLINE    lxsfrac08  

 

 

root@lxsfrac08 # ps -ef|grep crs

  oracle 22577 22576   0 17:23:40 ?           0:00 /opt/app/oracle/product/10.2.0/crs/opmn/bin/ons -d

    root 15218  5622   0 17:35:47 pts/5       0:00 grep crs

  oracle 21159 20350   0 17:23:04 ?           0:00 /opt/app/oracle/product/10.2.0/crs/bin/evmlogger.bin -o /opt/app/oracle/product

  oracle 20644 20585   0 17:22:48 ?           0:00 /bin/sh -c cd /opt/app/oracle/product/10.2.0/crs/log/lxsfrac08/cssd/oclsmon; ul

  oracle 20713 20712   0 17:22:50 ?           0:01 /opt/app/oracle/product/10.2.0/crs/bin/ocssd.bin

    root 20360     1   0 17:22:46 ?           0:03 /opt/app/oracle/product/10.2.0/crs/bin/crsd.bin restart

  oracle 20712 20586   0 17:22:50 ?           0:00 /bin/sh -c ulimit -c unlimited; cd /opt/app/oracle/product/10.2.0/crs/log/lxsfr

  oracle 20350     1   0 17:22:46 ?           0:00 /opt/app/oracle/product/10.2.0/crs/bin/evmd.bin

  oracle 20645 20644   0 17:22:48 ?           0:00 /opt/app/oracle/product/10.2.0/crs/bin/oclsmon.bin

  oracle 22576     1   0 17:23:40 ?           0:00 /opt/app/oracle/product/10.2.0/crs/opmn/bin/ons –d

 

##########################2010.4.28日更新#########################
 
[oracle@lxvcs04 ~]#>crs_stat -t
Name           Type           Target    State     Host       
------------------------------------------------------------
ora....s03.gsd application    ONLINE    ONLINE    lxvcs03    
ora....s03.ons application    ONLINE    ONLINE    lxvcs03    
ora....s03.vip application    ONLINE    ONLINE    lxvcs03    
ora....s04.gsd application    ONLINE    ONLINE    lxvcs04    
ora....s04.ons application    ONLINE    ONLINE    lxvcs04    
ora....s04.vip application    ONLINE    ONLINE    lxvcs04
[oracle@lxvcs04 ~]#>dbca
此时也是没有出现节点选择的界面,查了半天没找到原因。后来问了同事,说是dbca 的路径不队,应该用$ORACLE_HOME/bin/dbca来创建,而不是我当时环境的 /opt/oracle/bin/dbca (/opt/oracle是oracle用户对应OS的主目录)。
[oracle@lxvcs04 ~]#>which dbca
/opt/oracle/bin/dbca
阅读(4693) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~