grid@linux:~> sqlplus "/as sysasm"
SQL*Plus: Release 11.2.0.1.0 Production on Sun Oct 28 14:16:22 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORA-01078: failure in processing system parameters
ORA-29701: unable to connect to Cluster Synchronization Service
grid@linux:~> crsctl check css
CRS-4530: Communications failure contacting Cluster Synchronization Services daemon
grid@linux:~> ps -ef |grep cssd
grid 5975 5932 0 14:51 pts/0 00:00:00 grep cssd
果然没有CSS的服务daemon进程,再看一下HAS(High Availability Service)的状态
grid@linux:~> crsctl check has
CRS-4638: Oracle High Availability Services is online
grid@linux:~> ps -ef |grep d.bin
grid 4561 1 2 14:35 ? 00:00:28 /oracle/app/grid_home/bin/ohasd.bin reboot
grid 5988 5932 0 14:51 pts/0 00:00:00 grep d.bin
发现HAS的服务确实启动了的,而ora.cssd和ora.diskmon这2个服务是依赖于HAS维护的
进一步查看各资源的状态
grid@linux:~> crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.DATA.dg ora....up.type OFFLINE OFFLINE
ora....ER.lsnr ora....er.type ONLINE ONLINE linux
ora.RECOVER.dg ora....up.type OFFLINE OFFLINE
ora.asm ora.asm.type OFFLINE OFFLINE
ora.cssd ora.cssd.type ONLINE OFFLINE
ora.diskmon ora....on.type ONLINE OFFLINE
ora.orcl.db ora....se.type OFFLINE OFFLINE
grid@linux:~>
grid@linux:~> crsctl status resource -t
--------------------------------------------------------------------------------
NAME TARGET STATE SERVER STATE_DETAILS
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.DATA.dg
OFFLINE OFFLINE linux
ora.LISTENER.lsnr
ONLINE ONLINE linux
ora.RECOVER.dg
OFFLINE OFFLINE linux
ora.asm
OFFLINE OFFLINE linux
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.cssd
1 ONLINE OFFLINE
ora.diskmon
1 ONLINE OFFLINE
ora.orcl.db
1 OFFLINE OFFLINE
再看一下ora.cssd和ora.diskmon的属性
grid@linux:~>
grid@linux:~> crs_stat -p ora.cssd
NAME=ora.cssd
TYPE=ora.cssd.type
ACTION_SCRIPT=
ACTIVE_PLACEMENT=0
AUTO_START=never
CHECK_INTERVAL=30
DESCRIPTION="Resource type for CSSD"
FAILOVER_DELAY=0
FAILURE_INTERVAL=3
FAILURE_THRESHOLD=5
HOSTING_MEMBERS=
PLACEMENT=balanced
RESTART_ATTEMPTS=5
SCRIPT_TIMEOUT=600
START_TIMEOUT=600
STOP_TIMEOUT=900
UPTIME_THRESHOLD=1m
grid@linux:~> crs_stat -p ora.diskmon
NAME=ora.diskmon
TYPE=ora.diskmon.type
ACTION_SCRIPT=
ACTIVE_PLACEMENT=0
AUTO_START=never
CHECK_INTERVAL=20
DESCRIPTION="Resource type for Diskmon"
FAILOVER_DELAY=0
FAILURE_INTERVAL=3
FAILURE_THRESHOLD=5
HOSTING_MEMBERS=
PLACEMENT=balanced
RESTART_ATTEMPTS=10
SCRIPT_TIMEOUT=60
START_TIMEOUT=60
STOP_TIMEOUT=60
UPTIME_THRESHOLD=5s
到这里基本就找到了原因了,可以看到这两个资源的AUTO_START属性默认都设置为never,也就是说他们不会随着HAS服务的启动而自动启动的,尽管默认情况下HAS服务是开机自动启动的.
手工启动:
grid@linux:~> crsctl start resource ora.cssd
CRS-2672: Attempting to start 'ora.cssd' on 'linux'
CRS-2679: Attempting to clean 'ora.diskmon' on 'linux'
CRS-2681: Clean of 'ora.diskmon' on 'linux' succeeded
CRS-2672: Attempting to start 'ora.diskmon' on 'linux'
CRS-2676: Start of 'ora.diskmon' on 'linux' succeeded
CRS-2676: Start of 'ora.cssd' on 'linux' succeede
、注:ora.cssd和ora.diskmon这两个服务是有依赖关系的,启动哪个都会把两个都起来.、
grid@linux:~> crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.DATA.dg ora....up.type OFFLINE OFFLINE
ora....ER.lsnr ora....er.type ONLINE ONLINE linux
ora.RECOVER.dg ora....up.type OFFLINE OFFLINE
ora.asm ora.asm.type OFFLINE OFFLINE
ora.cssd ora.cssd.type ONLINE ONLINE linux
ora.diskmon ora....on.type ONLINE ONLINE linux
ora.orcl.db ora....se.type OFFLINE OFFLINE
CSS服务起来了,重启动asm instance
grid@linux:~> sqlplus / as sysasm
SQL*Plus: Release 11.2.0.1.0 Production on Thu Jan 16 14:55:02 2014
Copyright (c) 1982, 2009, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ASM instance started
Total System Global Area 283930624 bytes
Fixed Size 2212656 bytes
Variable Size 256552144 bytes
ASM Cache 25165824 bytes
ASM diskgroups mounted
SQL>
grid@linux:~> crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.DATA.dg ora....up.type ONLINE ONLINE linux
ora....ER.lsnr ora....er.type ONLINE ONLINE linux
ora.RECOVER.dg ora....up.type ONLINE ONLINE linux
ora.asm ora.asm.type ONLINE ONLINE linux
ora.cssd ora.cssd.type ONLINE ONLINE linux
ora.diskmon ora....on.type ONLINE ONLINE linux
ora.orcl.db ora....se.type OFFLINE OFFLINE
PS:
1)默认情况下HAS(High Availability Service)是自动启动的.通过如下命令可以取消和启用自动启动
crsctl disable has
crsctl enable has
2)HAS手动启动和停止
crsctl start has
crsctl stop has
3)查看HAS的状态
crsctl check has
4)如果想让ora.css和ora.diskmon服务随着HAS的启动而自动启动,那么你可以这两个服务的AUTO_START属性
crsctl modify resource "ora.cssd" -attr "AUTO_START=1"
or
crsctl modify resource "ora.diskmon" -attr "AUTO_START=1"
5)如果想取消ora.css和ora.diskmon的Auto start
crsctl modify resource "ora.cssd" -attr "AUTO_START=never"
crsctl modify resource "ora.diskmon" -attr "AUTO_START=never"