以下转自:http://liurizhaooracle.blog.163.com/blog/static/123110872201010525736344/

oracle rac crs

r*********启动resource*******
1、单独启动一个节点的asm
node2-> hostname
node2
node2-> crs_start ora.racdb.racdb2.inst 在启动ora....b2.inst 之前要先启动ora....SM2.asm(online)

node2-> crs_stop ora.node2.ASM2.asm 先停止asm2(节点2格式:ora.hostname.ASM2.asm,节点1格式:ora.hostname.ASM1.asm)
Attempting to stop `ora.node2.ASM2.asm` on member `node2`
Stop of `ora.node2.ASM2.asm` on member `node2` succeeded.

node2-> crs_start ora.node2.ASM2.asm
Attempting to start `ora.node2.ASM2.asm` on member `node2`
Start of `ora.node2.ASM2.asm` on member `node2` succeeded.

2、--单独启动和关闭节点node2的gsd
crs_stop ora.node2.gsd   (格式:ora.hostname.gsd)
crs_start ora.node2.gsd

3、--单独启动和关闭节点node2的ons  
crs_stop ora.node2.ons  (格式:ora.hostname.ons)
crs_start ora.node2.ons

4.单独启动vip
crs_stop ora.node2.vip(格式:ora.hostname.vip)
crs_start ora.node2.vip

5.单独启动实例(inst)
crs_stop  ora.racdb.racdb2.inst(格式:ora.db_name.instance_name.inst)
crs_start ora.racdb.racdb2.inst

6.单独启动监听(lsnr)
crs_stop ora.node1.LISTENER_NODE1.lsnr(格式:ora.hostname.listener_name.lsnr)
crs_start ora.node1.LISTENER_NODE1.lsnr

#查看crs的资源是否起来
node1-> crs_stat -t
Name           Type           Target    State     Host        
------------------------------------------------------------
ora....SM1.asm application    ONLINE    ONLINE    node1       
ora....E1.lsnr application    ONLINE    ONLINE    node1       
ora.node1.gsd  application    ONLINE    ONLINE    node1       
ora.node1.ons  application    ONLINE    ONLINE    node1       
ora.node1.vip  application    ONLINE    ONLINE    node1       
ora....SM2.asm application    ONLINE    ONLINE    node2       
ora....E2.lsnr application    ONLINE    ONLINE    node2       
ora.node2.gsd  application    ONLINE    ONLINE    node2       
ora.node2.ons  application    ONLINE    ONLINE    node2       
ora.node2.vip  application    ONLINE    ONLINE    node2       
ora.racdb.db   application    ONLINE    ONLINE    node1       
ora....b1.inst application    ONLINE    ONLINE    node1       
ora....b2.inst application    ONLINE    ONLINE    node2       

*********显示resource信息*******

node2-> srvctl config database
racdb
node2-> srvctl config database -d racdb -t

node2-> srvctl config nodeapps -n node2
node2 racdb2 /opt/ora10g/product/10.2.0/db_1

# display VIP configuration
node2-> srvctl config nodeapps -n node2 -a
VIP exists.: /node2-vip/192.168.0.202/255.255.255.0/eth0

# display GSD configuration
node2-> srvctl config nodeapps -n node2 -g
GSD exists.

# display OSD configuration
node2-> srvctl config nodeapps -n node2 -s
ONS daemon exists.


# display Listener configuration
node2-> srvctl config nodeapps -n node2 -l
Listener exists.

#display database status
node2-> srvctl status database -d racdb
Instance racdb1 is running on node node1
Instance racdb2 is running on node node2
node2->

#查看Voting Disk位置
node2-> crsctl query css votedisk
 0.     0    /dev/raw/raw1

located 1 votedisk(s).

查看OCR存放路径:cat /etc/oracle/ocr.loc

#显示节点2application状态
node2-> srvctl  status nodeapps -n node2
VIP is running on node: node2
GSD is running on node: node2
Listener is running on node: node2
ONS daemon is running on node: node2

#显示节点2asm状态
node2-> srvctl  status asm -n node1
ASM instance +ASM1 is running on node node1.

node2-> srvctl  status asm -n node2
ASM instance +ASM2 is running on node node2.

node2-> srvctl  status nodeapps -n node1
VIP is running on node: node1
GSD is running on node: node1
Listener is running on node: node1
ONS daemon is running on node: node1

OCR的状态验证
node2-> ocrcheck
Status of Oracle Cluster Registry is as follows :
         Version                  :          2
         Total space (kbytes)     :     524184
         Used space (kbytes)      :       3796
         Available space (kbytes) :     520388
         ID                       : 1474691778
         Device/File Name         : /dev/raw/raw2
                                    Device/File integrity check succeeded

                                    Device/File not configured

         Cluster registry integrity check succeeded

#查看crs是否启动
$ crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy


关闭crs资源
# cd $ORA_CRS_HOME/bin
# ./crsctl stop crs
   启动crs资源
# cd $ORA_CRS_HOME/bin
# ./crsctl start crs

#查看/启动/关闭数据库实例
srvctl status|stop|start instance -d [db_name] -i [inst_name]
srvctl status|stop|start database -d [db_name]
eg:
node2-> srvctl status database -d racdb
Instance racdb1 is running on node node1
Instance racdb2 is running on node node2

#启动/查看/关闭asm实例
srvctl status|stop|start asm -n [node_name]
eg:
node2-> srvctl status asm -n node1
ASM instance +ASM1 is running on node node1.
node2-> srvctl status asm -n node2
ASM instance +ASM2 is running on node node2.

#启动/查看/关闭nodeapps资源
node2-> srvctl status nodeapps -n node2
VIP is running on node: node2
GSD is running on node: node2
Listener is running on node: node2
ONS daemon is running on node: node2