[root@rac1 ~]# /opt/app/oracle/product/10.2.0/crs_1/bin/crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy
[root@rac1 ~]# /opt/app/oracle/product/10.2.0/crs_1/bin/crsctl stop crs
Stopping resources. This could take several minutes.
Successfully stopped CRS resources.
Stopping CSSD.
Shutting down CSS daemon.
Shutdown request successfully issued.
[root@rac1 ~]# /opt/app/oracle/product/10.2.0/crs_1/bin/crsctl
Usage: crsctl check crs - checks the viability of the CRS stack
crsctl check cssd - checks the viability of CSS
crsctl check crsd - checks the viability of CRS
crsctl check evmd - checks the viability of EVM
crsctl set css - sets a parameter override
crsctl get css - gets the value of a CSS parameter
crsctl unset css - sets CSS parameter to its default
crsctl query css votedisk - lists the voting disks used by CSS
crsctl add css votedisk - adds a new voting disk
crsctl delete css votedisk - removes a voting disk
crsctl enable crs - enables startup for all CRS daemons
crsctl disable crs - disables startup for all CRS daemons
crsctl start crs - starts all CRS daemons.
crsctl stop crs - stops all CRS daemons. Stops CRS resources in case of cluster.
crsctl start resources - starts CRS resources.
crsctl stop resources - stops CRS resources.
crsctl debug statedump evm - dumps state info for evm objects
crsctl debug statedump crs - dumps state info for crs objects
crsctl debug statedump css - dumps state info for css objects
crsctl debug log css [module:level]{,module:level} ...
- Turns on debugging for CSS
crsctl debug log crs [module:level]{,module:level} ...
- Turns on debugging for CRS
crsctl debug log evm [module:level]{,module:level} ...
- Turns on debugging for EVM
crsctl debug log res turns on debugging for resources
crsctl query crs softwareversion [] - lists the version of CRS software installed
crsctl query crs activeversion - lists the CRS software operating version
crsctl lsmodules css - lists the CSS modules that can be used for debugging
crsctl lsmodules crs - lists the CRS modules that can be used for debugging
crsctl lsmodules evm - lists the EVM modules that can be used for debugging
If necesary any of these commands can be run with additional tracing by
adding a "trace" argument at the very front.
Example: crsctl trace check css
[root@rac1 ~]# /opt/app/oracle/product/10.2.0/crs_1/bin/crsctl add crs votedisk /dev/raw/raw7 -force
注意上面的:css不要写成了crs
operation presently unsupported.
[root@rac1 ~]# /opt/app/oracle/product/10.2.0/crs_1/bin/crsctl add css votedisk /dev/raw/raw7 -force
Now formatting voting disk: /dev/raw/raw7
successful addition of votedisk /dev/raw/raw7.
[root@rac1 ~]# /opt/app/oracle/product/10.2.0/crs_1/bin/crsctl query css votedisk
0. 0 /dev/raw/raw2
1. 0 /dev/raw/raw7
located 2 votedisk(s).
[root@rac1 ~]# /opt/app/oracle/product/10.2.0/crs_1/bin/crsctl add css votedisk /dev/raw/raw8 -force
Now formatting voting disk: /dev/raw/raw8
successful addition of votedisk /dev/raw/raw8.
[root@rac1 ~]# /opt/app/oracle/product/10.2.0/crs_1/bin/crsctl query css votedisk
0. 0 /dev/raw/raw2
1. 0 /dev/raw/raw7
2. 0 /dev/raw/raw8
located 3 votedisk(s).
[root@rac1 ~]# /opt/app/oracle/product/10.2.0/crs_1/bin/crsctl start crs
Attempting to start CRS stack
The CRS stack will be started shortly
[root@rac1 ~]# /opt/app/oracle/product/10.2.0/crs_1/bin/crsctl query crs
Missing parameter.
[root@rac1 ~]# /opt/app/oracle/product/10.2.0/crs_1/bin/crsctl check crs
CSS appears healthy
CRS appears healthy
EVM appears healthy
[root@rac1 ~]# /opt/app/oracle/product/10.2.0/crs_1/bin/crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.orcl.db application ONLINE ONLINE rac2
ora....l1.inst application ONLINE ONLINE rac1
ora....l2.inst application ONLINE ONLINE rac2
ora....SM1.asm application ONLINE ONLINE rac1
ora....C1.lsnr application ONLINE ONLINE rac1
ora.rac1.gsd application ONLINE ONLINE rac1
ora.rac1.ons application ONLINE ONLINE rac1
ora.rac1.vip application ONLINE ONLINE rac1
ora....SM2.asm application ONLINE ONLINE rac2
ora....C2.lsnr application ONLINE ONLINE rac2
ora.rac2.gsd application ONLINE ONLINE rac2
ora.rac2.ons application ONLINE ONLINE rac2
ora.rac2.vip application ONLINE ONLINE rac2
[root@rac1 ~]# /opt/app/oracle/product/10.2.0/crs_1/bin/crsctl query css votedisk
0. 0 /dev/raw/raw2
1. 0 /dev/raw/raw7
2. 0 /dev/raw/raw8
located 3 votedisk(s).
测试删除,crs没有关闭的情况
[root@rac1 ~]# /opt/app/oracle/product/10.2.0/crs_1/bin/crsctl delete crs votedisk /dev/raw/raw2
operation presently unsupported.
[root@rac1 ~]# /opt/app/oracle/product/10.2.0/crs_1/bin/crsctl delete css votedisk /dev/raw/raw2
Cluster is not in a ready state for online disk removal
[root@rac1 ~]# /opt/app/oracle/product/10.2.0/crs_1/bin/crsctl delete css votedisk /dev/raw/raw2 -force
successful deletion of votedisk /dev/raw/raw2.
[root@rac1 ~]# /opt/app/oracle/product/10.2.0/crs_1/bin/crsctl query css votedisk
0. 0 /dev/raw/raw7
1. 0 /dev/raw/raw8
located 2 votedisk(s).
crs未关闭,在线添加votedisk
/opt/app/oracle/product/10.2.0/crs_1/bin/crsctl add css votedisk /dev/raw/raw2 -force
Now formatting voting disk: /dev/raw/raw2
导致挂起,而后自动重启!
启动后
[root@rac1 ~]# /opt/app/oracle/product/10.2.0/crs_1/bin/crsctl query css votedisk
0. 0 /dev/raw/raw2
1. 0 /dev/raw/raw7
2. 0 /dev/raw/raw8
通过以上实验得知,添加votedisk式比较危险的操作,最好应该在关闭crs的情况下进行。
删除votedisk可以在crs开启的情况下进行
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7958405/viewspace-708085/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/7958405/viewspace-708085/