- 问题现象:
SQL> startup
ORACLE instance started.
Total System Global Area 1854021632 bytes
Fixed Size 2242584 bytes
Variable Size 1136658408 bytes
Database Buffers 708837376 bytes
Redo Buffers 6283264 bytes
ORA-00205: error in identifying control file, check alert log for more info
查看alert日志
SQL> select value from v$diag_info where name =‘Diag Alert‘;
VALUE
-------------------------------------------------------------------------------
/data/oracle/ora11g/diag/rdbms/tjdb/tjdb/alert
[[email protected] ~]cd /data/oracle/ora11g/diag/rdbms/tjdb/tjdb/alert
[[email protected] alert]# ll
?荤.?.102508
-rw-r-----. 1 oracle oinstall 10485978 12?.30 2014 log_16.xml
-rw-r-----. 1 oracle oinstall 10485945 1?. 25 2015 log_17.xml
-rw-r-----. 1 oracle oinstall 10485763 2?. 13 2015 log_18.xml
-rw-r-----. 1 oracle oinstall 10485996 3?. 8 2015 log_19.xml
-rw-r-----. 1 oracle oinstall 10485761 3?. 21 2015 log_20.xml
-rw-r-----. 1 oracle oinstall 10485841 4?. 3 2015 log_21.xml
-rw-r-----. 1 oracle oinstall 10485932 4?. 15 2015 log_22.xml
-rw-r-----. 1 oracle oinstall 10485792 7?. 4 17:42 log_23.xml
-rw-r-----. 1 oracle oinstall 10485970 7?. 4 23:41 log_24.xml
-rw-r-----. 1 oracle oinstall 10392897 10?.21 09:20 log.xml
[[email protected] alert]# less log.xml
Alert 日志片断:
host_id=‘hrtestdb‘ host_addr=‘10.3.64.204‘ module=‘‘
pid=‘7210‘>
<txt>ORA-00210: cannot open the specified control file
ORA-00202: control file: '/data/oracle/ora11g/oradata/tjdb/control03.ctl'
ORA-27086: unable to lock file - already in use
Linux-x86_64 Error: 11: Resource temporarily unavailable
解决:
1.先使用lsof 或fuser 查询出正在使用这些文件的进程:
[[email protected] ~]#fuser -m -v /data
或
[[email protected] ~]# lsof /data/oracle/ora11g/oradata/tjdb/control*
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
oracle 8041 oracle 256u REG 0,19 11026432 1867986 /data/oracle/ora11g/oradata/tjdb/control01.ctl
oracle 8041 oracle 257u REG 0,19 11026432 1868772 /data/oracle/ora11g/oradata/tjdb/control02.ctl
oracle 8041 oracle 258u REG 0,19 11026432 1868514 /data/oracle/ora11g/oradata/tjdb/control03.ctl
oracle 8043 oracle 256u REG 0,19 11026432 1867986 /data/oracle/ora11g/oradata/tjdb/control01.ctl
oracle 8043 oracle 257u REG 0,19 11026432 1868772 /data/oracle/ora11g/oradata/tjdb/control02.ctl
oracle 8043 oracle 258u REG 0,19 11026432 1868514 /data/oracle/ora11g/oradata/tjdb/control03.ctl
oracle 8045 oracle 256uW REG 0,19 11026432 1867986 /data/oracle/ora11g/oradata/tjdb/control01.ctl
oracle 8045 oracle 257uW REG 0,19 11026432 1868772 /data/oracle/ora11g/oradata/tjdb/control02.ctl
oracle 8045 oracle 258uW REG 0,19 11026432 1868514 /data/oracle/ora11g/oradata/tjdb/control03.ctl
oracle 8051 oracle 258u REG 0,19 11026432 1867986 /data/oracle/ora11g/oradata/tjdb/control01.ctl
oracle 8051 oracle 259u REG 0,19 11026432 1868772 /data/oracle/ora11g/oradata/tjdb/control02.ctl
oracle 8051 oracle 260u REG 0,19 11026432 1868514 /data/oracle/ora11g/oradata/tjdb/control03.ctl
oracle 8278 oracle 257u REG 0,19 11026432 1867986 /data/oracle/ora11g/oradata/tjdb/control01.ctl
oracle 8278 oracle 258u REG 0,19 11026432 1868772 /data/oracle/ora11g/oradata/tjdb/control02.ctl
oracle 8278 oracle 259u REG 0,19 11026432 1868514 /data/oracle/ora11g/oradata/tjdb/control03.ctl
[[email protected] ~]# ps -ef | grep /data/oracle |grep -v grep |cut -c 9-15 |xargs kill -s 9
或
[[email protected] ~]# lsof /data |cut -c 9-13 |xargs kill -s 9
2.卸载文件系统
[[email protected] ~]#unmount /data
3.重新装载文件系统
mount nfs目录的方法:
mount -t nfs hostname(orIP):/directory /mount/point
[[email protected] ~]# df -h
/dev/mapper/VolGroup-lv_root 18G 4.4G 13G 27% /
tmpfs 1.9G 1.8G 140M 93% /dev/shm
/dev/sda1 485M 37M 423M 8% /boot
10.5.6.250:/nfs/hrtestdb 178G 74G 95G 44% /data
[[email protected] ~]#mount -t nfs -o nolock 10.5.6.250:/nfs/hrtestdb /data