eygle.com   eygle.com
eygle.com eygle
eygle.com  
 

« Oracle与HP的恩怨 - 放弃支持Itanium处理器 | Blog首页 | 恩墨科技2011性能优化培训成功结束 »

Oracle Clusterware的起停和ocr.loc文件

Oracle的Clusterware起停可以通过crsctl [ start / stop ] crs来实现。其根本原理是通过ocr.loc文件找到OCR,通过OCR去启动依赖的服务。

发出stop crs命令:
bash-2.05# crsctl stop crs
Stopping resources. This could take several minutes.
Successfully stopped CRS resources.
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
在主机系统日志中会记录停止过程:
Mar 29 22:08:43 db210-rac1 genunix: [ID 809163 kern.info] NOTICE: oracle, uid 101: setuid execution not allowed, dev=550000003c
Mar 29 22:08:45 db210-rac1 last message repeated 1 time
Mar 29 22:08:46 db210-rac1 root: [ID 702911 user.error] Oracle clsomon shutdown successful.
Mar 29 22:08:46 db210-rac1 root: [ID 702911 user.error] Oracle clsomon shutdown successful.
Mar 29 22:08:46 db210-rac1 root: [ID 702911 user.error] Oracle CSS family monitor shutting down gracefully.
Mar 29 22:08:46 db210-rac1 root: [ID 702911 user.error] Oracle CSS family monitor shutting down gracefully.
Mar 29 22:08:47 db210-rac1 root: [ID 702911 user.error] Oracle CSSD graceful shutdown
Mar 29 22:08:47 db210-rac1 root: [ID 702911 user.error] Oracle CSSD graceful shutdown
Mar 29 22:08:47 db210-rac1 root: [ID 702911 user.error] Oprocd received graceful shutdown request. Shutting down.
Mar 29 22:08:47 db210-rac1 root: [ID 702911 user.error] Oprocd received graceful shutdown request. Shutting down.
此时如果移动ocr.loc文件,则CRS必然无法启动:
bash-2.05# pwd
/var/opt/oracle
bash-2.05# ls
ocr.loc      oprocd       oraInst.loc  oratab       scls_scr
bash-2.05# mv ocr.loc ocr.loc.o
bash-2.05#
bash-2.05# crsctl start crs
Attempting to start CRS stack
The CRS stack will be started shortly
此时系统日志中会记录错误日志,提示依赖的资源无法启动:
Mar 29 22:10:17 db210-rac1 root: [ID 702911 user.error] Cluster Ready Services waiting on dependencies. Diagnostics in /tmp/crsctl.12678.
Mar 29 22:10:17 db210-rac1 root: [ID 702911 user.error] Cluster Ready Services waiting on dependencies. Diagnostics in /tmp/crsctl.12678.
Mar 29 22:10:17 db210-rac1 root: [ID 702911 user.error] Cluster Ready Services waiting on dependencies. Diagnostics in /tmp/crsctl.12763.
Mar 29 22:10:17 db210-rac1 root: [ID 702911 user.error] Cluster Ready Services waiting on dependencies. Diagnostics in /tmp/crsctl.12763.
Mar 29 22:10:18 db210-rac1 root: [ID 702911 user.error] Cluster Ready Services waiting on dependencies. Diagnostics in /tmp/crsctl.12813.
Mar 29 22:10:18 db210-rac1 root: [ID 702911 user.error] Cluster Ready Services waiting on dependencies. Diagnostics in /tmp/crsctl.12813.
临时文件记录无法找到OCR文件:
bash-2.05# cat /tmp/crsctl.12813
Failure 33 in main OCR context initialization: PROC-33: Oracle Cluster Registry is not configured Operating System error [No such file or directory] [2]
修正ocr.loc文件,则crs可以正常启动:
bash-2.05# ls
ocr.loc.o    oprocd       oraInst.loc  oratab       scls_scr
bash-2.05# mv ocr.loc.o ocr.loc   

bash-2.05# crsctl start crs
Attempting to start CRS stack
The CRS stack will be started shortly
正常启动的系统日志信息如下:
Mar 29 22:13:19 db210-rac1 root: [ID 702911 user.error] Cluster Ready Services completed waiting on dependencies.
Mar 29 22:13:19 db210-rac1 root: [ID 702911 user.error] Cluster Ready Services completed waiting on dependencies.
Mar 29 22:13:20 db210-rac1 last message repeated 1 time
Mar 29 22:13:20 db210-rac1 root: [ID 702911 user.error] Running CRSD with TZ = PRC
Mar 29 22:13:20 db210-rac1 last message repeated 1 time
Mar 29 22:13:20 db210-rac1 root: [ID 702911 user.error] Running CRSD with TZ = PRC
Mar 29 22:13:20 db210-rac1 root: [ID 702911 user.error] Cluster Ready Services completed waiting on dependencies.
Mar 29 22:13:20 db210-rac1 root: [ID 702911 user.error] Cluster Ready Services completed waiting on dependencies.
Mar 29 22:13:20 db210-rac1 root: [ID 702911 user.error] Oracle CSS Family monitor starting.
Mar 29 22:13:20 db210-rac1 root: [ID 702911 user.error] Oracle CSS Family monitor starting.
Mar 29 22:13:21 db210-rac1 root: [ID 702911 user.error] Oracle CSS restart. 0, 1
Mar 29 22:13:21 db210-rac1 root: [ID 702911 user.error] Oracle CSS restart. 0, 1


历史上的今天...
    >> 2013-03-29文章:
    >> 2007-03-29文章:
    >> 2005-03-29文章:

无觅

By eygle on 2011-03-29 23:30 | Comments (0) | Advanced | 2768 |


CopyRight © 2004~2020 云和恩墨,成就未来!, All rights reserved.
数据恢复·紧急救援·性能优化 云和恩墨 24x7 热线电话:400-600-8755 业务咨询:010-59007017-7040 or 7037 业务合作: marketing@enmotech.com