分类: Oracle
2008-07-08 13:09:46
Oracle 10gR2大家都装过N次了,网上的文档也成堆,正如piner所说,10gR1的确很多,从10gR2开始RAC才开始变得很稳定。但前些天刚好头给我测试我们产品上安装10gR1的任务,才开始接触10gR1。
-rwxr--r-- 1 oracle oinstall 676386907 p4505133_10105_SOLARISx86.zip
-rwxr--r-- 1 oracle oinstall 137936896 solarisx86_CRS_10_1_0_3_Disk1.cpio
-rwxr--r-- 1 oracle oinstall 671047680 solarisx86_DB_10_1_0_3_Disk1.cpio
将solarisx86_CRS_10_1_0_3_Disk1.cpio和solarisx86_DB_10_1_0_3_Disk1.cpio解压,第一次安装的方法是: crs和oracle home均使用CFS, ocr和voting disk均使用cfs。后来也试过crs和oracle home均使用本地,ocr和voting disk使用raw,报错信息均一样。
先安装crs,执行root.sh的输出
root@lxsfrac04 # /oracle/crs/root.sh
Running Oracle10 root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /oracle/crs
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Checking to see if Oracle CRS stack is already up...
Setting the permissions on OCR backup directory
Oracle Cluster Registry configuration upgraded successfully
WARNING: directory '/oracle' is not owned by root
assigning default hostname lxsfrac04 for node 1.
assigning default hostname lxsfrac03 for node 2.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node
node 1: lxsfrac04 lxsfrac04-priv lxsfrac04
node 2: lxsfrac03 lxsfrac03-priv lxsfrac03
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
Now formatting voting device: /oracle/voting
Read -1 bytes of 512 at offset 0 in voting device (voting)
Successful in setting block0 for voting disk.
Format complete.
Adding daemons to inittab
Preparing Oracle Cluster Ready Services (CRS):
Jul 1 09:50:59 lxsfrac04 root: [ID 702911 user.alert] (Oracle CSSD will be run out of init)
Jul 1 09:50:59 lxsfrac04 root: [ID 702911 user.alert] (Oracle CSSD will be run out of init)
Jul 1 09:50:59 lxsfrac04 root: [ID 702911 user.alert] (Oracle EVMD will be run out of init)
Jul 1 09:50:59 lxsfrac04 root: [ID 702911 user.alert] (Oracle EVMD will be run out of init)
Jul 1 09:50:59 lxsfrac04 root: [ID 702911 user.alert] (Oracle CRSD will be run out of init, set to start boot services)
Jul 1 09:50:59 lxsfrac04 root: [ID 702911 user.alert] (Oracle CRSD will be run out of init, set to start boot services)
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
lxsfrac04
CSS is inactive on these nodes.
lxsfrac03
Local node checking complete.
Run root.sh on remaining nodes to start CRS daemons.
察看crs进程,发现起来5个,应属正常。
lxsfrac04%oracle>ps -ef|grep crs
oracle 13853 13774 0 09:51:00 ? 0:00 bash -c /oracle/crs/bin/ocssd || exit 137
oracle 13773 1 0 09:51:00 ? 0:00 /oracle/crs/bin/evmd.bin
root 13780 1 0 09:51:00 ? 0:00 /oracle/crs/bin/crsd.bin
oracle 13854 13853 0 09:51:00 ? 0:00 /oracle/crs/bin/ocssd.bin
oracle 14085 12905 0 09:52:58 pts/5 0:00 grep crs
oracle 13877 13773 0 09:51:01 ? 0:00 /oracle/crs/bin/evmlogger.bin -o /oracle/crs/evm/log/evmlogger.info -l /oracle/
在第二个节点上执行root.sh的输出
root@lxsfrac03 # /oracle/crs/root.sh
Running Oracle10 root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /oracle/crs
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Checking to see if Oracle CRS stack is already up...
Setting the permissions on OCR backup directory
Oracle Cluster Registry configuration upgraded successfully
WARNING: directory '/oracle' is not owned by root
clscfg: EXISTING configuration version 2 detected.
clscfg: version 2 is 10G Release 1.
assigning default hostname lxsfrac04 for node 1.
assigning default hostname lxsfrac03 for node 2.
Successfully accumulated necessary OCR keys.
Using ports: CSS=49895 CRS=49896 EVMC=49898 and EVMR=49897.
node
node 1: lxsfrac04 lxsfrac04-priv lxsfrac04
node 2: lxsfrac03 lxsfrac03-priv lxsfrac03
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
Adding daemons to inittab
Preparing Oracle Cluster Ready Services (CRS):
Jul 1 09:51:29 lxsfrac03 root: [ID 702911 user.alert] (Oracle CSSD will be run out of init)
Jul 1 09:51:29 lxsfrac03 root: [ID 702911 user.alert] (Oracle CSSD will be run out of init)
Jul 1 09:51:29 lxsfrac03 root: [ID 702911 user.alert] (Oracle EVMD will be run out of init)
Jul 1 09:51:29 lxsfrac03 root: [ID 702911 user.alert] (Oracle EVMD will be run out of init)
Jul 1 09:51:29 lxsfrac03 root: [ID 702911 user.alert] (Oracle CRSD will be run out of init, set to start boot services)
Jul 1 09:51:29 lxsfrac03 root: [ID 702911 user.alert] (Oracle CRSD will be run out of init, set to start boot services)
Expecting the CRS daemons to be up within 600 seconds.
CSS is active on these nodes.
lxsfrac04
lxsfrac03
CSS is active on all nodes.
Oracle CRS stack installed and running under init(1M)
第二个节点上crs进程也正常
root@lxsfrac03 # ps -ef|grep crs
root 7610 1 0 09:51:30 ? 0:00 /oracle/crs/bin/crsd.bin
root 7838 2444 0 09:52:31 pts/4 0:00 grep crs
oracle 7607 1 0 09:51:30 ? 0:00 /oracle/crs/bin/evmd.bin
oracle 7674 7671 0 09:51:31 ? 0:00 /oracle/crs/bin/ocssd.bin
oracle 7671 7608 0 09:51:31 ? 0:00 bash -c /oracle/crs/bin/ocssd || exit 137
oracle 7711 7607 0 09:51:33 ? 0:00 /oracle/crs/bin/evmlogger.bin -o /oracle/crs/evm/log/evmlogger.info -l /oracle/
root@lxsfrac04 # crs_stat -t
CRS-0202: No resources are registered.
继续安装oracle binary(不建库)
执行ORACLE_HOME/root.sh时报错
root@lxsfrac04 # /oracle/10g/root.sh
Running Oracle10 root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /oracle/10g
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
Copying coraenv to /usr/local/bin ...
Creating /var/opt/oracle/oratab file...
Adding entry to /var/opt/oracle/oratab file...
Entries will be added to the /var/opt/oracle/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
PRKH-1010 : Unable to communicate with CRS services.
[Communications Error(Native: prsr_initCLSS:[3])]
PRKH-1010 : Unable to communicate with CRS services.
[Communications Error(Native: prsr_initCLSS:[3])]
PRKH-1010 : Unable to communicate with CRS services.
[Communications Error(Native: prsr_initCLSS:[3])]
在ORACLE_HOME/root.sh脚本里增加一些打印输出时发现,root.sh脚本是执行到最后一步时vipca才出的错。
root@lxsfrac04 # /oracle/10g/root.sh
Running Oracle10 root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /oracle/10g
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
Copying coraenv to /usr/local/bin ...
Adding entry to /var/opt/oracle/oratab file...
Entries will be added to the /var/opt/oracle/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
it's runnig here 01
it's runnig here 02
it's runnig here 04
it's runnig here 06
it's beginning to start vipca here 07
PRKH-1010 : Unable to communicate with CRS services.
[Communications Error(Native: prsr_initCLSS:[3])]
PRKH-1010 : Unable to communicate with CRS services.
[Communications Error(Native: prsr_initCLSS:[3])]
PRKH-1010 : Unable to communicate with CRS services.
[Communications Error(Native: prsr_initCLSS:[3])]
此时单独执行vipca得到同样的错误。
-------注:斜体字是自己在脚本里添加的,以检查出是哪一步出错--------
尝试过分析vipca,发现都是java写的,只得放弃分析。
在google上,metalink上查找原因,没有有用的。
后来同事也做过多次,也出同样的错误。最后还是他找到方法。先打p4505133_10105_SOLARISx86.zip的补丁,将oracle 由10103 upgrade到10105,再单独执行vipca就可以搞定这个问题。其实之前我就得到另外同事的建议,让我打10105的patch,可结果打完后没有单独运行vipca.
装完10105后,执行ORACLE_HOME的root.sh,发现没有报错出现了。
root@lxsfrac04 # /oracle/10g/root.sh
Running Oracle 10g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /oracle/10g
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
y Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
root@lxsfrac03 # /oracle/10g/root.sh
Running Oracle 10g root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /oracle/10g
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The file "dbhome" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin. Overwrite it? (y/n) [n]: y
Copying coraenv to /usr/local/bin ...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
再手工运行ORACLE_HOME/bin/vipca (注意:10gR2里vipca是在CRS_HOME/bin),这时候不报错,正常出现图形界面,按照提示配置完毕后,资源就成功被注册了。
检查crs资源,也正常有输出了。
root@lxsfrac03 # crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....c03.gsd application ONLINE ONLINE lxsfrac03
ora....c03.ons application ONLINE ONLINE lxsfrac03
ora....c03.vip application ONLINE ONLINE lxsfrac03
ora....c04.gsd application ONLINE ONLINE lxsfrac04
ora....c04.ons application ONLINE ONLINE lxsfrac04
ora....c04.vip application ONLINE ONLINE lxsfrac04
总结:10gR1安装后必须打patchset到10.1.0.5才可以使用(才可以注册资源),这一点在Solaris10x86上已得到验证。
感受更深的一点:10gR1很滥,难怪大家都在用10gR2