分类: 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:
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/
root 3846 1 3 17:10 ? 00:01:12 /orac/crs/
oracle 4493 3341 0 17:11 ? 00:00:01 /orac/crs/
root 4621 4478 0 17:11 ? 00:00:00 /bin/su -l oracle -c /bin/sh -c 'ulimit -c unlimited; cd /orac/crs/
oracle 4622 4621 0 17:11 ? 00:00:00 /bin/sh -c ulimit -c unlimited; cd /orac/crs/
oracle 4648 4622 0 17:11 ? 00:00:07 /orac/crs/
oracle 4964 4493 0 17:11 ? 00:00:00 /orac/crs/
oracle 5522 1 0 17:12 ? 00:00:00 /orac/crs/
oracle 5523 5522 0 17:12 ? 00:00:00 /orac/crs/
oracle 22410 26125 0 17:
尝试关闭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/
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/
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之前,看见/ocrvote无ocr和vote文件,就在mount之后又,贸然生成一个新的ocr和vote文件. CRS启动时需要检查ocr和vote文件,发现文件为空,导致无法启动.
未明确认识到: 以前建的ocr和vote文件是建在dg之上,只需要mount就能看见.无需也不能新建.
2)
将当前的css文件清空(/var/opt/oracle/scls_scr/$nodename/oracle/下当前文件
重新生成ocr和vote文件.
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/
oracle@lxsfrac08 # exit
logout
root@lxsfrac08 #
root@lxsfrac08 # /opt/app/oracle/product/
WARNING: directory '/opt/app/oracle/product/
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/
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
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(
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/
root 15218 5622 0 17:35:
oracle 21159 20350 0 17:23:04 ? 0:00 /opt/app/oracle/product/
oracle 20644 20585 0 17:22:48 ? 0:00 /bin/sh -c cd /opt/app/oracle/product/
oracle 20713 20712 0 17:22:50 ? 0:01 /opt/app/oracle/product/
root 20360 1 0 17:22:46 ? 0:03 /opt/app/oracle/product/
oracle 20712 20586 0 17:22:50 ? 0:00 /bin/sh -c ulimit -c unlimited; cd /opt/app/oracle/product/
oracle 20350 1 0 17:22:46 ? 0:00 /opt/app/oracle/product/
oracle 20645 20644 0 17:22:48 ? 0:00 /opt/app/oracle/product/
oracle 22576 1 0 17:23:40 ? 0:00 /opt/app/oracle/product/