删掉了$CRS_HOME/log/$HOSTNAME/下的所有日志文件和目录,于是has启不来了,单步执行:
sh -x /etc/init/ohasd
strace -p ohasd的pid
查看/var/log/messages,$ORACLE_HOME/log/$HOSTNAME/alert_$HOSTNAME.log,发现其步骤如下:
检查/opt/crs/product/bin/crsctl.bin文件:
进入目录:/var/tmp/.oracle 建立socket文件;
进入目录:/etc/oracle/
读取目录:
/opt/crs/product/log/mysql-1/ohasd
写入文件:ohasdOUT.log
读取:
/opt/crs/product/crs/mesg/crsus.msb
执行:
/opt/crs/product/crs/install/s_crsconfig_mysql-1_env.txt
进入/opt/crs/product/log/mysql-1/agent/
写日志,日志目录如下:
|-- client
|-- crflogd
|-- crsd
| |-- oraagent_grid
| | |-- oraagent_grid.log
| | |-- oraagent_gridOUT.log
| | `-- oraagent_grid.pid
| |-- oraagent_oracle
| | `-- oraagent_oracle.log
| |-- orarootagent_root
| | |-- orarootagent_root.log
| | |-- orarootagent_rootOUT.log
| | `-- orarootagent_root.pid
| `-- scriptagent_grid
| |-- scriptagent_grid.log
| `-- scriptagent_gridOUT.log
|-- cssd
`-- ohasd
|-- oraagent_grid
| |-- oraagent_grid.log
| |-- oraagent_gridOUT.log
| `-- oraagent_grid.pid
|-- oracssdagent_root
| `-- oracssdagent_root.log
|-- oracssdmonitor_root
| `-- oracssdmonitor_root.log
`-- orarootagent_root
|-- orarootagent_root.log
|-- orarootagent_rootOUT.log
`-- orarootagent_root.pid
进入/opt/crs/product/log/mysql-1,接着写目录:
|-- crflogd
| |-- crflogd.log
| `-- crflogdOUT.log
|-- crfmond
| |-- crfmond.log
| `-- crfmondOUT.log
|-- crsd
| |-- crsd.log
| `-- crsdOUT.log
|-- cssd
| |-- core.3307
| |-- cssdOUT.log
| `-- ocssd.log
|-- ctssd
| |-- ctssdOUT.log
| `-- octssd.log
|-- diskmon
|-- evmd
| |-- evmd.log
| `-- evmdOUT.log
|-- gipcd
| |-- gipcd.log
| `-- gipcdOUT.log
|-- gnsd
|-- gpnpd
| |-- gpnpd.log
| |-- gpnpdOUT.log
| `-- mysql-1.pid
|-- mdnsd
| |-- mdnsd.log
| `-- mdnsdOUT.log
|-- ohasd
| |-- ohasd.log
| `-- ohasdOUT.log
|-- racg
`-- srvm
笔记一下,防止再次发生;