打开虚拟机,输入命令crs_stat -t时,看到状态如下:
rac2-> crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.....crm.cs application OFFLINE OFFLINE
ora....db1.srv application OFFLINE OFFLINE
ora.devdb.db application ONLINE UNKNOWN rac1
ora....b1.inst application ONLINE OFFLINE
ora....b2.inst application ONLINE OFFLINE
ora....SM1.asm application ONLINE UNKNOWN rac1
ora....C1.lsnr application ONLINE UNKNOWN rac1
ora.rac1.gsd application ONLINE UNKNOWN rac1
ora.rac1.ons application ONLINE UNKNOWN rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....SM2.asm application ONLINE UNKNOWN rac2
ora....C2.lsnr application ONLINE UNKNOWN rac2
ora.rac2.gsd application ONLINE UNKNOWN rac2
ora.rac2.ons application ONLINE UNKNOWN rac2
ora.rac2.vip application ONLINE ONLINE rac2
输入命令:srvctl start nodeapps -n rac2
出现如下错误:
Linux Error: 111: Connection refused
[oracle@rac1 admin]$ srvctl start nodeapps -n rac1
CRS-1028: Dependency analysis failed because of:
CRS-0223: Resource 'ora.rac1.gsd' has placement error.
CRS-1028: Dependency analysis failed because of:
CRS-0223: Resource 'ora.rac1.ons' has placement error.
[oracle@rac1 admin]$ crs_start ora.rac1.vip
CRS-1002: Resource 'ora.rac1.vip' is already running on member 'rac1'
CRS-0223: Resource 'ora.rac1.vip' has placement error.
解决方法:
crs_stop -all停止到已经online的服务,状态为unknown的资源需要一个个手动停止,例如:
[oracle@rac1 admin]$ crs_stop ora.prod.db
全部停止完以后,crs_stat -t查看一下,状态都变为offline了:
[oracle@rac1 admin]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.prod.db application OFFLINE OFFLINE
ora....d1.inst application OFFLINE OFFLINE
ora....d2.inst application OFFLINE OFFLINE
ora....SM1.asm application OFFLINE OFFLINE
ora....C1.lsnr application OFFLINE OFFLINE
ora....C1.lsnr application OFFLINE OFFLINE
ora.rac1.gsd application OFFLINE OFFLINE
ora.rac1.ons application OFFLINE OFFLINE
ora.rac1.vip application OFFLINE OFFLINE
ora....SM2.asm application OFFLINE OFFLINE
ora....C2.lsnr application OFFLINE OFFLINE
ora....C2.lsnr application OFFLINE OFFLINE
ora.rac2.gsd application OFFLINE OFFLINE
ora.rac2.ons application OFFLINE OFFLINE
ora.rac2.vip application OFFLINE OFFLINE
crs_start -all就可以了。状态都会变为online了。