在我之前的写过的一个blog中记录了一起升级时遇到的麻烦事,还是那家,还是那个性格, 升级生产前并未测试, 导致在原本计划很顺利的情况下,遇到了决非偶然的不顺利, 这是一个10.2.0.4 2nodes Oracle RAC ON HPUX 平台的环境, 计划升级到10.2.0.5, 前期升级clusterware 软件非常顺序,可是在跑root102.sh时还没跑完主机突然reboot, 尝试启crs 报错:The clusterware daemons are running from . But you are patching /oracle/product/10.2.0/crs10g , 前期crs 目录未备份,现在这种进退两难的境地, 参考pre-11.2 : How to Downgrade/Remove Oracle Clusterware (CRS) Patchset Software (文档 ID 754095.1) ,但是restore ocr都是内存错误, 因时间紧张,同事找到我,当时是我建议可以两手准备, 原目录不动, 再新装一套CRS 10.2.0.1 升级回原来的10.2.0.4, 再手动注册数据库进crs, 回头找个测试环境再研究该问题。
这里整理几个后来遇到的问题
1, run root102.sh cause OS reboot
# /oracle/crs/product/10.2.0/install/root102.sh
Copying reboot_toc to /var/opt/oracle/bin for HPUX
WARNING: directory ‘/oracle’ is not owned by root
Preparing to recopy patched init and RC scripts.
Recopying init and RC scripts.
Startup will be queued to init within 30 seconds.
Starting up the CRS daemons.
Waiting for the patched CRS daemons to start.
This may take a while on some systems.
OS reboot
可能的方法:
1, 运行脚本前确认停止了CRS, 并从OS ps确认CRS 都已关闭并无僵尸进程存在,防止CRS 文件或某些CRS lib文件被进程占用无法更新
2, 启动一些trace跟踪,提供给SR,方便确认bug
1) Added following trace level to $CRS_HOME/bin/ocssd
CLSC_TRACE_LVL=5
export CLSC_TRACE_LVL
CLSC_NSTRACE_LVL=12
export CLSC_NSTRACE_LVL
2) Try set crs tracing “crsctl enable crs”. Refer Note: 420235.1
3) sh -x root102.sh while running.
2, Error: OUI-10021: The target area inventory is being written to by another session. A read lock cannot be obtained
For any reading operation (or when OUI is started), OUI creates a “reader.lock” file in the <oraInventory>/locks directory. When a write lock (“writer.lock”) already exists in the <oraInventory>/locks directory, OUI cannot create a “reader.lock” and the reported error is received.
Check if a “writer.lock” already exists in the <oraInventory>/locks directory. if another OUI processes not running , Try to remove the lock file in <oraInventory>/locks/ . reopen OUI try again.
3,Oracle CRS stack is already configured and will be running under init(1M)
/oracle/product/10.2.0/crs10g2# ./root.sh
WARNING: directory ‘/oracle/product/10.2.0’ is not owned by root
WARNING: directory ‘/oracle/product’ is not owned by root
WARNING: directory ‘/oracle’ is not owned by root
Checking to see if Oracle CRS stack is already configured
Oracle CRS stack is already configured and will be running under init(1M)
view the shell rootInstall.sh
if [ -f $FATALFILE ] && [ -f $OCRCONFIG ]
— SHOW THE ERROR ABOVE
FI
What is $FATALFILE ?
SCRBASE is /etc/oracle/scls_scr on Linux and AIX, /var/opt/oracle/scls_scr on hp-ux and Solaris, \\\\HKEY_LOCAL_MACHINE\\Software\\Oracle\\inst_loc on Windows, to remove the $FATALFILE, try again.
4, Unable to create a new central inventory 10.2.0.4
1, check /var/opt/oracle was 750. changed it to 755
2, check the /etc/oratab exist and gave the oracle_home in it
# ORATAB – Sets oratab location
case $port in
“HP-UX” ) ORATAB=”/etc/oratab”
;;
“SunOS” ) ORATAB=”/var/opt/oracle/oratab”
;;
“Linux” ) ORATAB=”/etc/oratab”
;;
* ) ORATAB=”/etc/oratab”
;;
esac
3,no found /etc/oraInst.loc in /etc,but found it in /oracle/oraInventory then:
#cd /etc
#ln -s /oracle/oraInventory/oraInst.loc oraInst.loc
re-install the patchset ok.
oraInventory Location of the directory is determined by the oraInst.loc file:
/etc/oraInst.loc (AIX and Linux Platform)
/var/opt/oracle/OraInst.loc (Solaris and HP-UX platform)
4, Specify a new inventory path
这里整理几个后来遇到的问题
1, run root102.sh cause OS reboot
# /oracle/crs/product/10.2.0/install/root102.sh
Copying reboot_toc to /var/opt/oracle/bin for HPUX
WARNING: directory ‘/oracle’ is not owned by root
Preparing to recopy patched init and RC scripts.
Recopying init and RC scripts.
Startup will be queued to init within 30 seconds.
Starting up the CRS daemons.
Waiting for the patched CRS daemons to start.
This may take a while on some systems.
OS reboot
可能的方法:
1, 运行脚本前确认停止了CRS, 并从OS ps确认CRS 都已关闭并无僵尸进程存在,防止CRS 文件或某些CRS lib文件被进程占用无法更新
2, 启动一些trace跟踪,提供给SR,方便确认bug
1) Added following trace level to $CRS_HOME/bin/ocssd
CLSC_TRACE_LVL=5
export CLSC_TRACE_LVL
CLSC_NSTRACE_LVL=12
export CLSC_NSTRACE_LVL
2) Try set crs tracing “crsctl enable crs”. Refer Note: 420235.1
3) sh -x root102.sh while running.
2, Error: OUI-10021: The target area inventory is being written to by another session. A read lock cannot be obtained
For any reading operation (or when OUI is started), OUI creates a “reader.lock” file in the <oraInventory>/locks directory. When a write lock (“writer.lock”) already exists in the <oraInventory>/locks directory, OUI cannot create a “reader.lock” and the reported error is received.
Check if a “writer.lock” already exists in the <oraInventory>/locks directory. if another OUI processes not running , Try to remove the lock file in <oraInventory>/locks/ . reopen OUI try again.
3,Oracle CRS stack is already configured and will be running under init(1M)
/oracle/product/10.2.0/crs10g2# ./root.sh
WARNING: directory ‘/oracle/product/10.2.0’ is not owned by root
WARNING: directory ‘/oracle/product’ is not owned by root
WARNING: directory ‘/oracle’ is not owned by root
Checking to see if Oracle CRS stack is already configured
Oracle CRS stack is already configured and will be running under init(1M)
view the shell rootInstall.sh
if [ -f $FATALFILE ] && [ -f $OCRCONFIG ]
— SHOW THE ERROR ABOVE
FI
What is $FATALFILE ?
SCRBASE is /etc/oracle/scls_scr on Linux and AIX, /var/opt/oracle/scls_scr on hp-ux and Solaris, \\\\HKEY_LOCAL_MACHINE\\Software\\Oracle\\inst_loc on Windows, to remove the $FATALFILE, try again.
4, Unable to create a new central inventory 10.2.0.4
1, check /var/opt/oracle was 750. changed it to 755
2, check the /etc/oratab exist and gave the oracle_home in it
# ORATAB – Sets oratab location
case $port in
“HP-UX” ) ORATAB=”/etc/oratab”
;;
“SunOS” ) ORATAB=”/var/opt/oracle/oratab”
;;
“Linux” ) ORATAB=”/etc/oratab”
;;
* ) ORATAB=”/etc/oratab”
;;
esac
3,no found /etc/oraInst.loc in /etc,but found it in /oracle/oraInventory then:
#cd /etc
#ln -s /oracle/oraInventory/oraInst.loc oraInst.loc
re-install the patchset ok.
oraInventory Location of the directory is determined by the oraInst.loc file:
/etc/oraInst.loc (AIX and Linux Platform)
/var/opt/oracle/OraInst.loc (Solaris and HP-UX platform)
4, Specify a new inventory path
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。