Oracle RAC启动与关闭的时候需要注意以下几点:

    一、检查共享设备

    二、自动启动RAC并检查相关进程

    三、 手动启动RAC

    四、 在启动的过程中最好检测着crs、ASM和数据库的日志。

.检查共享设备

一般情况下,存放OCRVotingDiskOCFS2或者raw都是自动启动的。如果他们没有启动,RAC肯定是启动不了的。

 

1.1如果使用ocfs2的,检查ocfs2状态

/etc/init.d/o2cbstatus

 

在挂载之前,/etc/init.d/o2cbstatus显示为CheckingO2CBheartbeat:Notactive

在格式化和挂载文件系统之前,应验证O2CB在两个节点上均联机;O2CB心跳当前没有

活动,因为文件系统还没有挂载。挂载之后就会变成active

mount-tocfs2-odatavolume/dev/sdb1/u02/oradata/orcl

 

1,2.如果使用rawdevice.

[root@raw1~]#cd/dev/raw/

[root@raw1raw]#ls

raw1raw2

或者:

[root@raw1init.d]#/etc/init.d/rawdevicesstatus

/dev/raw/raw1:boundtomajor8,minor17

/dev/raw/raw2:boundtomajor8,minor18

 

1.3.检查ASM

/etc/init.d/oracleasmlistdisks

 

二.自动启动RAC并检查相关进程

RAC在启动的时候crs等进程都是自动启动的:

[root@rac1init.d]#ls-l/etc/init.d/init.*

-r-xr-xr-x1rootroot1951Feb2622:38/etc/init.d/init.crs

-r-xr-xr-x1rootroot4714Feb2622:38/etc/init.d/init.crsd

-r-xr-xr-x1rootroot35394Feb2622:38/etc/init.d/init.cssd

-r-xr-xr-x1rootroot3190Feb2622:38/etc/init.d/init.evmd

 

我们要查看一下crs的状态:

正常情况下,进程都是online的:

[root@raw1bin]#./crs_stat-t

NameTypeTargetStateHost

------------------------------------------------------------

ora.raw.dbapplicationONLINEONLINEraw1

ora.raw.raw.csapplicationONLINEONLINEraw1

ora....aw1.srvapplicationONLINEONLINEraw1

ora....aw2.srvapplicationONLINEONLINEraw2

ora....w1.instapplicationONLINEONLINEraw1

ora....w2.instapplicationONLINEONLINEraw2

ora....SM1.asmapplicationONLINEONLINEraw1

ora....W1.lsnrapplicationONLINEONLINEraw1

ora.raw1.gsdapplicationONLINEONLINEraw1

ora.raw1.onsapplicationONLINEONLINEraw1

ora.raw1.vipapplicationONLINEONLINEraw1

ora....SM2.asmapplicationONLINEONLINEraw2

ora....W2.lsnrapplicationONLINEONLINEraw2

ora.raw2.gsdapplicationONLINEONLINEraw2

ora.raw2.onsapplicationONLINEONLINEraw2

ora.raw2.vipapplicationONLINEONLINEraw2

 

 

如果出现以下情况:

[root@rac2bin]#./crs_stat-t

NameTypeTargetStateHost

------------------------------------------------------------

ora.rac.dbapplicationONLINEUNKNOWNrac1

ora....orcl.csapplicationONLINEUNKNOWNrac1

ora....ac1.srvapplicationOFFLINEOFFLINE

ora....ac2.srvapplicationOFFLINEOFFLINE

ora....c1.instapplicationONLINEUNKNOWNrac1

ora....c2.instapplicationONLINEUNKNOWNrac2

ora....SM1.asmapplicationONLINEONLINErac1

ora....C1.lsnrapplicationONLINEUNKNOWNrac1

ora.rac1.gsdapplicationONLINEUNKNOWNrac1

ora.rac1.onsapplicationONLINEONLINErac1

ora.rac1.vipapplicationONLINEONLINErac1

ora....SM2.asmapplicationONLINEONLINErac2

ora....C2.lsnrapplicationONLINEUNKNOWNrac2

ora.rac2.gsdapplicationONLINEUNKNOWNrac2

ora.rac2.onsapplicationONLINEONLINErac2

ora.rac2.vipapplicationONLINEONLINErac2