crsctl start/stop crs and crsctl start/stop cluster 区别

官网解释:
crsctl start/stop crs- Manage start/stop theentireOracleClusterware stack on a node, including the OHASD process, this command is to be usedonly on the local node..


crsctl start/stop cluster- Manage start/stop the Oracle Clusterware stack on local node if you do not specify either -all or -n and nodes remote if option -n or -all be specified ,NOT including the OHASD process.You can't start/stop clusterware stack without OHASD process running.

Despite crsctl start/stop crs manage entire Oracle Clusterware stack on local node crsctl start/stop crs not allow you to manage remote nodes, unlike crsctl start/stop cluster that allows you to manage all the nodes, but if the process OASH is runing.

To manage Oracle Clusterware Stack on remote nodes, the ohasd (Oracle High Availability Services Daemon) must be running on all managed nodes. (i.e using crsctl start cluster -n <node1>, <node2>)

Then if you try use crsctl start cluster -n node1,node2 and your local node is node1 and on node1 or node2 OHASD not running this command will fails.

1 crsctl start/stop crs 是单节管理 

crsctl start/stop cluster [-all 所有节点可以管理多个节点

 

2 crsctl start/stop crs 管理crs 包含进程 OHASD

  crsctl start/stop cluster 不包含OHASD进程 必须要先启动 OHASD进程才可以使用

 

3  11gr2 rac 手动启动或关闭过程

使用crsctl start/stop cluster手动启动和关闭的过程如下:

crsctl start/stop cluster -all 会启动所有OHAS是启动状态的所有节点

crsctl stop crs --每个节点 

 

使用crsctl start/stop crs手动启动/关闭流程

节点1

crsctl start/stop crs 实际上后面会把Oracle crs 管理的资源都会启动

节点2

crsctl start/stop crs

......

 

Enable CRS to start on reboot

 crsctl enable crs

Disable CRS to start on reboot

 crsctl disable crs

 

 

查询资源启动情况

crsctl stat res -init -t

 

:

 

crsctl start/stop crs crsctl start/stop has 作用相同





测试步骤:
root@test1:/u01/app/11.2.0/grid/bin>./crsctl stop cluster -all
CRS-2673: Attempting to stop 'ora.crsd' on 'test1'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'test1'
CRS-2673: Attempting to stop 'ora.LISTENER_SCAN1.lsnr' on 'test1'
CRS-2673: Attempting to stop 'ora.oc4j' on 'test1'
CRS-2673: Attempting to stop 'ora.cvu' on 'test1'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'test1'
CRS-2673: Attempting to stop 'ora.nftsdb.nftsdbtaf.svc' on 'test1'
CRS-2677: Stop of 'ora.nftsdb.nftsdbtaf.svc' on 'test1' succeeded
CRS-2673: Attempting to stop 'ora.OCR.dg' on 'test1'
CRS-2673: Attempting to stop 'ora.registry.acfs' on 'test1'
CRS-2673: Attempting to stop 'ora.nftsdb.db' on 'test1'
CRS-2677: Stop of 'ora.cvu' on 'test1' succeeded
CRS-2677: Stop of 'ora.LISTENER_SCAN1.lsnr' on 'test1' succeeded
CRS-2673: Attempting to stop 'ora.scan1.vip' on 'test1'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'test1' succeeded
CRS-2673: Attempting to stop 'ora.test1.vip' on 'test1'
CRS-2677: Stop of 'ora.nftsdb.db' on 'test1' succeeded
CRS-2673: Attempting to stop 'ora.ARCH.dg' on 'test1'
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'test1'
CRS-2677: Stop of 'ora.ARCH.dg' on 'test1' succeeded
CRS-2677: Stop of 'ora.DATA.dg' on 'test1' succeeded
CRS-2677: Stop of 'ora.registry.acfs' on 'test1' succeeded
CRS-2677: Stop of 'ora.scan1.vip' on 'test1' succeeded
CRS-2677: Stop of 'ora.test1.vip' on 'test1' succeeded
CRS-2673: Attempting to stop 'ora.crsd' on 'test1'
CRS-2790: Starting shutdown of Cluster Ready Services-managed resources on 'test1'
CRS-2673: Attempting to stop 'ora.LISTENER.lsnr' on 'test1'
CRS-2673: Attempting to stop 'ora.nftsdb.nftsdbtaf.svc' on 'test1'
CRS-2677: Stop of 'ora.nftsdb.nftsdbtaf.svc' on 'test1' succeeded
CRS-2673: Attempting to stop 'ora.OCR.dg' on 'test1'
CRS-2673: Attempting to stop 'ora.registry.acfs' on 'test1'
CRS-2673: Attempting to stop 'ora.nftsdb.db' on 'test1'
CRS-2677: Stop of 'ora.LISTENER.lsnr' on 'test1' succeeded
CRS-2673: Attempting to stop 'ora.test1.vip' on 'test1'
CRS-2677: Stop of 'ora.test1.vip' on 'test1' succeeded
CRS-2677: Stop of 'ora.registry.acfs' on 'test1' succeeded
CRS-2677: Stop of 'ora.nftsdb.db' on 'test1' succeeded
CRS-2673: Attempting to stop 'ora.ARCH.dg' on 'test1'
CRS-2673: Attempting to stop 'ora.DATA.dg' on 'test1'
CRS-2677: Stop of 'ora.ARCH.dg' on 'test1' succeeded
CRS-2677: Stop of 'ora.DATA.dg' on 'test1' succeeded
CRS-2677: Stop of 'ora.OCR.dg' on 'test1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'test1'
CRS-2677: Stop of 'ora.asm' on 'test1' succeeded
CRS-2677: Stop of 'ora.OCR.dg' on 'test1' succeeded
CRS-2673: Attempting to stop 'ora.asm' on 'test1'
CRS-2677: Stop of 'ora.asm' on 'test1' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'test1'
CRS-2677: Stop of 'ora.ons' on 'test1' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'test1'
CRS-2677: Stop of 'ora.net1.network' on 'test1' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'test1' has completed
CRS-2677: Stop of 'ora.crsd' on 'test1' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'test1'
CRS-2673: Attempting to stop 'ora.evmd' on 'test1'
CRS-2673: Attempting to stop 'ora.asm' on 'test1'
CRS-2677: Stop of 'ora.oc4j' on 'test1' succeeded
CRS-2673: Attempting to stop 'ora.ons' on 'test1'
CRS-2677: Stop of 'ora.ons' on 'test1' succeeded
CRS-2673: Attempting to stop 'ora.net1.network' on 'test1'
CRS-2677: Stop of 'ora.net1.network' on 'test1' succeeded
CRS-2792: Shutdown of Cluster Ready Services-managed resources on 'test1' has completed
CRS-2677: Stop of 'ora.evmd' on 'test1' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'test1' succeeded
CRS-2677: Stop of 'ora.crsd' on 'test1' succeeded
CRS-2673: Attempting to stop 'ora.ctssd' on 'test1'
CRS-2673: Attempting to stop 'ora.evmd' on 'test1'
CRS-2673: Attempting to stop 'ora.asm' on 'test1'
CRS-2677: Stop of 'ora.evmd' on 'test1' succeeded
CRS-2677: Stop of 'ora.ctssd' on 'test1' succeeded
CRS-2677: Stop of 'ora.asm' on 'test1' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'test1'
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'test1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'test1'
CRS-2677: Stop of 'ora.asm' on 'test1' succeeded
CRS-2673: Attempting to stop 'ora.cluster_interconnect.haip' on 'test1'
CRS-2677: Stop of 'ora.cssd' on 'test1' succeeded
CRS-2677: Stop of 'ora.cluster_interconnect.haip' on 'test1' succeeded
CRS-2673: Attempting to stop 'ora.cssd' on 'test1'
CRS-2677: Stop of 'ora.cssd' on 'test1' succeeded
root@test1:/u01/app/11.2.0/grid/bin>
root@test1:/u01/app/11.2.0/grid/bin>
root@test1:/u01/app/11.2.0/grid/bin>
root@test1:/u01/app/11.2.0/grid/bin>
root@test1:/u01/app/11.2.0/grid/bin>./crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4535: Cannot communicate with Cluster Ready Services
CRS-4530: Communications failure contacting Cluster Synchronization Services daemon
CRS-4534: Cannot communicate with Event Manager
root@test1:/u01/app/11.2.0/grid/bin>
root@test1:/u01/app/11.2.0/grid/bin>
root@test1:/u01/app/11.2.0/grid/bin>
root@test1:/u01/app/11.2.0/grid/bin>ps -ef|grep d.bin
    grid  4456532        1   0 20:48:15      -  0:00 /u01/app/11.2.0/grid/bin/mdnsd.bin
    root  4653092        1   0 20:48:04      -  0:01 /u01/app/11.2.0/grid/bin/ohasd.bin reboot
    root  5701732        1   0 20:48:17      -  0:01 /u01/app/11.2.0/grid/bin/osysmond.bin
    grid  6160608        1   0 20:48:14      -  0:01 /u01/app/11.2.0/grid/bin/oraagent.bin
  oracle 11075632  5374352   0 21:07:03      -  0:00 /u01/app/11.2.0/grid/bin/tnsping (ADDRESS=(PROTOCOL=TCP)(HOST=test1-vip)(PORT=1521))
    root  3015000        1   0 20:48:17      -  0:01 /u01/app/11.2.0/grid/bin/orarootagent.bin
    grid  4784590        1   0 20:48:17      -  0:01 /u01/app/11.2.0/grid/bin/gipcd.bin
    root  5505508        1 119 20:48:25      -  0:37 /u01/app/11.2.0/grid/bin/ologgerd -M -d /u01/app/11.2.0/grid/crf/db/test1
    grid  7668120        1   0 20:48:16      -  0:00 /u01/app/11.2.0/grid/bin/gpnpd.bin
    root 11993382  8913382   0 21:07:34  pts/0  0:00 grep d.bin
root@test1:/u01/app/11.2.0/grid/bin>
root@test1:/u01/app/11.2.0/grid/bin>
root@test1:/u01/app/11.2.0/grid/bin>./crsctl stop cluster -all -f
CRS-4688: Oracle Clusterware is already stopped on server 'test1'
CRS-4688: Oracle Clusterware is already stopped on server 'test1'
root@test1:/u01/app/11.2.0/grid/bin>
root@test1:/u01/app/11.2.0/grid/bin>
root@test1:/u01/app/11.2.0/grid/bin>
root@test1:/u01/app/11.2.0/grid/bin>ps -ef|grep d.bin
    grid  4456532        1   0 20:48:15      -  0:00 /u01/app/11.2.0/grid/bin/mdnsd.bin
    root  4653092        1   0 20:48:04      -  0:01 /u01/app/11.2.0/grid/bin/ohasd.bin reboot
    root  5701732        1   0 20:48:17      -  0:01 /u01/app/11.2.0/grid/bin/osysmond.bin
    grid  6160608        1   0 20:48:14      -  0:01 /u01/app/11.2.0/grid/bin/oraagent.bin
  oracle 11075634  5374352   0 21:08:03      -  0:00 /u01/app/11.2.0/grid/bin/tnsping (ADDRESS=(PROTOCOL=TCP)(HOST=test1-vip)(PORT=1521))
    root  3015000        1   0 20:48:17      -  0:01 /u01/app/11.2.0/grid/bin/orarootagent.bin
    grid  4784590        1   0 20:48:17      -  0:01 /u01/app/11.2.0/grid/bin/gipcd.bin
    root  5439920  8913382   0 21:08:16  pts/0  0:00 grep d.bin
    root  5505508        1 108 20:48:25      -  1:02 /u01/app/11.2.0/grid/bin/ologgerd -M -d /u01/app/11.2.0/grid/crf/db/test1
    grid  7668120        1   0 20:48:16      -  0:00 /u01/app/11.2.0/grid/bin/gpnpd.bin
  oracle 11993414  5111960   0 21:08:08      -  0:00 /u01/app/11.2.0/grid/bin/lsnrctl
root@test1:/u01/app/11.2.0/grid/bin>./crsctl stop has -f
CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'test1'
CRS-2673: Attempting to stop 'ora.mdnsd' on 'test1'
CRS-2673: Attempting to stop 'ora.crf' on 'test1'
CRS-2673: Attempting to stop 'ora.drivers.acfs' on 'test1'
CRS-2677: Stop of 'ora.mdnsd' on 'test1' succeeded
CRS-2677: Stop of 'ora.crf' on 'test1' succeeded
CRS-2673: Attempting to stop 'ora.gipcd' on 'test1'
CRS-2677: Stop of 'ora.gipcd' on 'test1' succeeded
CRS-2673: Attempting to stop 'ora.gpnpd' on 'test1'
CRS-2677: Stop of 'ora.gpnpd' on 'test1' succeeded
CRS-2677: Stop of 'ora.drivers.acfs' on 'test1' succeeded
CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'test1' has completed
CRS-4133: Oracle High Availability Services has been stopped.
root@test1:/u01/app/11.2.0/grid/bin>
root@test1:/u01/app/11.2.0/grid/bin>
root@test1:/u01/app/11.2.0/grid/bin>
root@test1:/u01/app/11.2.0/grid/bin>
root@test1:/u01/app/11.2.0/grid/bin>
root@test1:/u01/app/11.2.0/grid/bin>
root@test1:/u01/app/11.2.0/grid/bin>./crsctl start cluster -all 
CRS-4639: Could not contact Oracle High Availability Services
CRS-4000: Command Start failed, or completed with errors.
root@test1:/u01/app/11.2.0/grid/bin>./crsctl start has
CRS-4123: Oracle High Availability Services has been started.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25462274/viewspace-2153047/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/25462274/viewspace-2153047/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值