$ORA_CRS_HOME/bin下有多个CRS相关的执行文件,都是一个.bin的文件,有一个同名无bin后缀的shell脚本调用
--------------------------------------------------------------------------------
-rwxr-xr-x 1 oracle dba 675513 Jun 22 2005 cemutlo.bin
CRS名称和版本 2:1:=> 10.2.0.1
[oracle@westzq3 ~]$ cemutlo -w -n
crs
2:1:
--------------------------------------------------------------------------------
-rwxr-xr-x 1 oracle dba 37958 Jun 22 2005 cemutls.bin
在linux上没用起
--------------------------------------------------------------------------------
-rwxr-xr-x 1 oracle dba 797634 Jun 22 2005 clscfg.bin
CRS的配置工具,具体没用过
--------------------------------------------------------------------------------
-rwxr-xr-x 1 oracle dba 901792 Jun 22 2005 clsfmt.bin
格式化CRS的工具
--------------------------------------------------------------------------------
-rwxr-xr-x 1 oracle dba 688273 Jun 22 2005 clsid.bin
[oracle@westzq3 bin]$ clsid
clsid: user name (oracle)
group name (dba)
HA privs? no
--------------------------------------------------------------------------------
-r-xr-xr-x 1 root dba 2958965 Jun 22 2005 crsctl.bin 集群管理工具
--------------------------------------------------------------------------------
---r-xr-xr-x 1 root dba 20920395 Jun 22 2005 crsd.bin CRS组件
--------------------------------------------------------------------------------
-r-xr-xr-x 1 root dba 4775007 Jun 22 2005 crs_getperm.bin
权限方面的信息
[oracle@westzq3 ~]$ crs_getperm ora.westzq4.ASM2.asm
Name: ora.westzq4.ASM2.asm
owner:oracle:rwx,pgrp:dba:rwx,other::r--,
--------------------------------------------------------------------------------
-r-xr-xr-x 1 root dba 4837934 Jun 22 2005 crs_profile.bin
创建,验证,删除和更新一个ORACLE集群应用profile.其工作于一个用户拷贝的profile.
该命令不能在集群件运行时使用
通过crs_profile产生一个临时脚本。对与root用户,在CRS_home/crs/profile,其他无权限的用户在CRS_home/crs/public
crs_profile -create havip -t application -a /oracle/crs/bin/usrvip -o i=e1000g0,ov=10.198.94.139,on=255.255.248.0
crs_profile -create listener -t application -a /oracle/crs/crs/public/lsnr.sh -r havip -o ci=180,ra=6,ft=2,fi=12
crs_profile -create disk_group -t application -a /oracle/crs/crs/public/dg.sh -r havip -o ci=180,ra=6,ft=2,fi=12
crs_profile -create oradata_mount -t application -a /oracle/crs/crs/public/fs.sh -r disk_group -o ci=180,ra=6,ft=2,fi=12
crs_profile -create orcl_db -t application -a /oracle/crs/crs/public/db.sh -r "oradata_mount listener" -o ci=180,ra=6,ft=2,fi=12
选项-r 定义了该资源所依赖的资源,在下面的例子中,资源oradata_mount启动时依赖于disk_group先 启动,需要停止disk_group的时候必须先停止资源oradata_mount,资源orcl_db的启动则同时依赖于oradata_mount/disk_group/havip/listener;
参数-o 包括 ci: crs对资源状态的监测间隔(check interval),单位为秒;
ra: crs重启资源的尝试次数,RESTART_ATTEMPTS,次数到达以后将重新分配;
fi: 资源状态出现错误以后,crs的尝试间隔,FAILURE_INTERVAL,单位是秒;
ft: 资源状态出现错误以后,crs的尝试次数,FAILURE_THRESHOLD;这些参数可以使用默认值,分别是60秒/1/0秒/0。
参数-a 是指ACTION_SCRIPT,参数值为资源启动、关闭、监测的脚本,脚本固定的三个参数为start/stop/check;
[oracle@westzq3 public]$ crs_profile -print ora.westzq3.LISTENER_WESTZQ3.lsnr
NAME=ora.westzq3.LISTENER_WESTZQ3.lsnr
TYPE=application
ACTION_SCRIPT=/u01/app/oracle/product/10.2.0/db_1/bin/racgwrap
ACTIVE_PLACEMENT=0
AUTO_START=1
CHECK_INTERVAL=600
DESCRIPTION=CRS application for listener on node
FAILOVER_DELAY=0
FAILURE_INTERVAL=0
FAILURE_THRESHOLD=0
HOSTING_MEMBERS=westzq3
OPTIONAL_RESOURCES=
PLACEMENT=restricted
REQUIRED_RESOURCES=ora.westzq3.vip
RESTART_ATTEMPTS=5
SCRIPT_TIMEOUT=600
START_TIMEOUT=0
STOP_TIMEOUT=0
UPTIME_THRESHOLD=7d
USR_ORA_ALERT_NAME=
USR_ORA_CHECK_TIMEOUT=0
USR_ORA_CONNECT_STR=/ as sysdba
USR_ORA_DEBUG=0
USR_ORA_DISCONNECT=false
USR_ORA_FLAGS=
USR_ORA_IF=
USR_ORA_INST_NOT_SHUTDOWN=
USR_ORA_LANG=
USR_ORA_NETMASK=
USR_ORA_OPEN_MODE=
USR_ORA_OPI=false
USR_ORA_PFILE=
USR_ORA_PRECONNECT=none
USR_ORA_SRV=
USR_ORA_START_TIMEOUT=0
USR_ORA_STOP_MODE=immediate
USR_ORA_STOP_TIMEOUT=0
USR_ORA_VIP=
--------------------------------------------------------------------------------
-r-xr-xr-x 1 root dba 6335772 Jun 22 2005 crs_register.bin
创建了profile后注册profile到集群
crs_register havip
--------------------------------------------------------------------------------
-r-xr-xr-x 1 root dba 4734679 Jun 22 2005 crs_relocate.bin
从profile中重新装载资源配置
失败的节点起来后需要该命令将VIP漂回来
--------------------------------------------------------------------------------
-r-xr-xr-x 1 root dba 4671041 Jun 22 2005 crs_setperm.bin
设置资源的权限
crs_setperm havip -o root
crs_setperm havip -u user:oracle:r-x
--------------------------------------------------------------------------------
-r-xr-xr-x 1 root dba 4735279 Jun 22 2005 crs_start.bin
[oracle@westzq3 ~]$ crs_start
Usage: crs_start resource_name [...] [-c cluster_member] [-f] [-q] ["attrib=value ..."]
crs_start -all [-q]
-c 节点名
-all 所有注册的服务
-f 强制开启服务
-q 屏幕无输出
[oracle@westzq3 ~]$ ./crsstat.sh
HA Resource Target State
----------- ------ -----
ora.rac.db OFFLINE OFFLINE
ora.rac.oratest.cs OFFLINE OFFLINE
ora.rac.oratest.rac1.srv OFFLINE OFFLINE
ora.rac.oratest.rac2.srv OFFLINE OFFLINE
ora.rac.rac1.inst OFFLINE OFFLINE
ora.rac.rac2.inst OFFLINE OFFLINE
ora.westzq3.ASM1.asm OFFLINE OFFLINE
ora.westzq3.LISTENER_WESTZQ3.lsnr OFFLINE OFFLINE
ora.westzq3.gsd OFFLINE OFFLINE
ora.westzq3.ons OFFLINE OFFLINE
ora.westzq3.vip OFFLINE OFFLINE
ora.westzq4.ASM2.asm OFFLINE OFFLINE
ora.westzq4.LISTENER_WESTZQ4.lsnr OFFLINE OFFLINE
ora.westzq4.gsd OFFLINE OFFLINE
ora.westzq4.ons OFFLINE OFFLINE
ora.westzq4.vip OFFLINE OFFLINE
[oracle@westzq3 ~]$ crs_start -all
Attempting to start `ora.westzq3.vip` on member `westzq3`
Attempting to start `ora.westzq4.vip` on member `westzq4`
Start of `ora.westzq3.vip` on member `westzq3` succeeded.
Attempting to start `ora.westzq3.ASM1.asm` on member `westzq3`
Start of `ora.westzq4.vip` on member `westzq4` succeeded.
Attempting to start `ora.westzq4.ASM2.asm` on member `westzq4`
Start of `ora.westzq3.ASM1.asm` on member `westzq3` succeeded.
Attempting to start `ora.rac.rac1.inst` on member `westzq3`
Start of `ora.westzq4.ASM2.asm` on member `westzq4` succeeded.
Attempting to start `ora.rac.rac2.inst` on member `westzq4`
Start of `ora.rac.rac1.inst` on member `westzq3` succeeded.
Attempting to start `ora.westzq3.LISTENER_WESTZQ3.lsnr` on member `westzq3`
Start of `ora.westzq3.LISTENER_WESTZQ3.lsnr` on member `westzq3` succeeded.
Start of `ora.rac.rac2.inst` on member `westzq4` succeeded.
Attempting to start `ora.westzq4.LISTENER_WESTZQ4.lsnr` on member `westzq4`
Start of `ora.westzq4.LISTENER_WESTZQ4.lsnr` on member `westzq4` succeeded.
CRS-1002: Resource 'ora.westzq3.ons' is already running on member 'westzq3'
CRS-1002: Resource 'ora.rac.db' is already running on member 'westzq4'
CRS-1002: Resource 'ora.westzq4.ons' is already running on member 'westzq4'
Attempting to start `ora.rac.oratest.cs` on member `westzq3`
Attempting to start `ora.westzq3.gsd` on member `westzq3`
Attempting to start `ora.rac.oratest.rac1.srv` on member `westzq3`
Attempting to start `ora.rac.oratest.rac2.srv` on member `westzq4`
Attempting to start `ora.westzq4.gsd` on member `westzq4`
Start of `ora.westzq3.gsd` on member `westzq3` succeeded.
Start of `ora.rac.oratest.cs` on member `westzq3` succeeded.
Start of `ora.westzq4.gsd` on member `westzq4` succeeded.
Start of `ora.rac.oratest.rac1.srv` on member `westzq3` succeeded.
Start of `ora.rac.oratest.rac2.srv` on member `westzq4` succeeded.
CRS-0223: Resource 'ora.rac.db' has placement error.
CRS-0223: Resource 'ora.westzq3.ons' has placement error.
CRS-0223: Resource 'ora.westzq4.ons' has placement error.
[oracle@westzq3 ~]$ ./crsstat.sh
HA Resource Target State
----------- ------ -----
ora.rac.db ONLINE ONLINE on westzq4
ora.rac.oratest.cs ONLINE ONLINE on westzq3
ora.rac.oratest.rac1.srv ONLINE ONLINE on westzq3
ora.rac.oratest.rac2.srv ONLINE ONLINE on westzq4
ora.rac.rac1.inst ONLINE ONLINE on westzq3
ora.rac.rac2.inst ONLINE ONLINE on westzq4
ora.westzq3.ASM1.asm ONLINE ONLINE on westzq3
ora.westzq3.LISTENER_WESTZQ3.lsnr ONLINE ONLINE on westzq3
ora.westzq3.gsd ONLINE ONLINE on westzq3
ora.westzq3.ons ONLINE ONLINE on westzq3
ora.westzq3.vip ONLINE ONLINE on westzq3
ora.westzq4.ASM2.asm ONLINE ONLINE on westzq4
ora.westzq4.LISTENER_WESTZQ4.lsnr ONLINE ONLINE on westzq4
ora.westzq4.gsd ONLINE ONLINE on westzq4
ora.westzq4.ons ONLINE ONLINE on westzq4
ora.westzq4.vip ONLINE ONLINE on westzq4
--------------------------------------------------------------------------------
-r-xr-xr-x 1 root dba 5019755 Jun 22 2005 crs_stat.bin
[oracle@westzq3 ~]$ crs_stat -h
Usage: crs_stat [resource_name [...]] [-v] [-l] [-q] [-c cluster_member]
crs_stat [resource_name [...]] -t [-v] [-q] [-c cluster_member]
crs_stat -p [resource_name [...]] [-q]
crs_stat [-a] application -g
crs_stat [-a] application -r [-c cluster_member]
crs_stat -f [resource_name [...]] [-q] [-c cluster_member]
crs_stat -ls [resource_name [...]] [-q]
-ls 列出资源,属主,和权限
-t 以表格列出资源信息
-v 列出一个资源被重启或者资源失败间隔的时间。
-p 显示内存中profile的资源状态
[oracle@westzq3 ~]$ crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora.rac.db application ONLINE ONLINE westzq4
ora....test.cs application ONLINE ONLINE westzq3
ora....ac1.srv application ONLINE ONLINE westzq3
ora....ac2.srv application ONLINE ONLINE westzq4
ora....c1.inst application ONLINE ONLINE westzq3
ora....c2.inst application ONLINE ONLINE westzq4
ora....SM1.asm application ONLINE ONLINE westzq3
ora....Q3.lsnr application ONLINE ONLINE westzq3
ora....zq3.gsd application ONLINE ONLINE westzq3
ora....zq3.ons application ONLINE ONLINE westzq3
ora....zq3.vip application ONLINE ONLINE westzq3
ora....SM2.asm application ONLINE ONLINE westzq4
ora....Q4.lsnr application ONLINE ONLINE westzq4
ora....zq4.gsd application ONLINE ONLINE westzq4
ora....zq4.ons application ONLINE ONLINE westzq4
ora....zq4.vip application ONLINE ONLINE westzq4
[oracle@westzq3 ~]$ crs_stat -ls
Name Owner Primary PrivGrp Permission
-----------------------------------------------------------------
ora.rac.db oracle dba rwxrwxr--
ora....test.cs oracle dba rwxrwxr--
ora....ac1.srv oracle dba rwxrwxr--
ora....ac2.srv oracle dba rwxrwxr--
ora....c1.inst oracle dba rwxrwxr--
ora....c2.inst oracle dba rwxrwxr--
ora....SM1.asm oracle dba rwxrwxr--
ora....Q3.lsnr oracle dba rwxrwxr--
ora....zq3.gsd oracle dba rwxr-xr--
ora....zq3.ons oracle dba rwxr-xr--
ora....zq3.vip root dba rwxr-xr--
ora....SM2.asm oracle dba rwxrwxr--
ora....Q4.lsnr oracle dba rwxrwxr--
ora....zq4.gsd oracle dba rwxr-xr--
ora....zq4.ons oracle dba rwxr-xr--
ora....zq4.vip root dba rwxr-xr--
[oracle@westzq3 ~]$ crs_stat -p ora.westzq3.ASM1.asm
NAME=ora.westzq3.ASM1.asm
TYPE=application
ACTION_SCRIPT=/u01/app/oracle/product/10.2.0/db_1/bin/racgwrap
ACTIVE_PLACEMENT=0
AUTO_START=1
CHECK_INTERVAL=600
DESCRIPTION=CRS application for ASM instance
FAILOVER_DELAY=0
FAILURE_INTERVAL=0
FAILURE_THRESHOLD=0
HOSTING_MEMBERS=westzq3
OPTIONAL_RESOURCES=
PLACEMENT=restricted
REQUIRED_RESOURCES=ora.westzq3.vip
RESTART_ATTEMPTS=5
SCRIPT_TIMEOUT=600
START_TIMEOUT=0
STOP_TIMEOUT=0
UPTIME_THRESHOLD=7d
USR_ORA_ALERT_NAME=
USR_ORA_CHECK_TIMEOUT=0
USR_ORA_CONNECT_STR=/ as sysdba
USR_ORA_DEBUG=0
USR_ORA_DISCONNECT=false
USR_ORA_FLAGS=
USR_ORA_IF=
USR_ORA_INST_NOT_SHUTDOWN=
USR_ORA_LANG=
USR_ORA_NETMASK=
USR_ORA_OPEN_MODE=mount
USR_ORA_OPI=false
USR_ORA_PFILE=
USR_ORA_PRECONNECT=none
USR_ORA_SRV=
USR_ORA_START_TIMEOUT=0
USR_ORA_STOP_MODE=immediate
USR_ORA_STOP_TIMEOUT=0
USR_ORA_VIP=
[oracle@westzq3 ~]$ crs_stat -v ora.westzq3.ASM1.asm
NAME=ora.westzq3.ASM1.asm
TYPE=application
RESTART_ATTEMPTS=5
RESTART_COUNT=0
FAILURE_THRESHOLD=0
FAILURE_COUNT=0
TARGET=ONLINE
STATE=ONLINE on westzq3
--------------------------------------------------------------------------------
-r-xr-xr-x 1 root dba 4738270 Jun 22 2005 crs_stop.bin
[oracle@westzq3 ~]$ crs_stop
Usage: crs_stop resource_name [...] [-f] [-q] ["attrib=value ..."]
crs_stop -c cluster_member [...] [-q] ["attrib=value ..."]
crs_stop -all [-q]
[oracle@westzq3 ~]$ ./crsstat.sh
HA Resource Target State
----------- ------ -----
ora.rac.db OFFLINE OFFLINE
ora.rac.oratest.cs OFFLINE OFFLINE
ora.rac.oratest.rac1.srv OFFLINE OFFLINE
ora.rac.oratest.rac2.srv OFFLINE OFFLINE
ora.rac.rac1.inst OFFLINE OFFLINE
ora.rac.rac2.inst OFFLINE OFFLINE
ora.westzq3.ASM1.asm ONLINE ONLINE on westzq3
ora.westzq3.LISTENER_WESTZQ3.lsnr ONLINE ONLINE on westzq3
ora.westzq3.gsd ONLINE ONLINE on westzq3
ora.westzq3.ons ONLINE ONLINE on westzq3
ora.westzq3.vip ONLINE ONLINE on westzq3
ora.westzq4.ASM2.asm ONLINE ONLINE on westzq4
ora.westzq4.LISTENER_WESTZQ4.lsnr ONLINE ONLINE on westzq4
ora.westzq4.gsd ONLINE ONLINE on westzq4
ora.westzq4.ons ONLINE ONLINE on westzq4
ora.westzq4.vip ONLINE ONLINE on westzq4
[oracle@westzq3 ~]$ crs_stop -c westzq3
Attempting to stop `ora.westzq3.gsd` on member `westzq3`
Attempting to stop `ora.westzq3.ons` on member `westzq3`
Stop of `ora.westzq3.gsd` on member `westzq3` succeeded.
Stop of `ora.westzq3.ons` on member `westzq3` succeeded.
Attempting to stop `ora.westzq3.LISTENER_WESTZQ3.lsnr` on member `westzq3`
Stop of `ora.westzq3.LISTENER_WESTZQ3.lsnr` on member `westzq3` succeeded.
Attempting to stop `ora.westzq3.ASM1.asm` on member `westzq3`
Stop of `ora.westzq3.ASM1.asm` on member `westzq3` succeeded.
Attempting to stop `ora.westzq3.vip` on member `westzq3`
Stop of `ora.westzq3.vip` on member `westzq3` succeeded.
[oracle@westzq3 ~]$ ./crsstat.sh
HA Resource Target State
----------- ------ -----
ora.rac.db OFFLINE OFFLINE
ora.rac.oratest.cs OFFLINE OFFLINE
ora.rac.oratest.rac1.srv OFFLINE OFFLINE
ora.rac.oratest.rac2.srv OFFLINE OFFLINE
ora.rac.rac1.inst OFFLINE OFFLINE
ora.rac.rac2.inst OFFLINE OFFLINE
ora.westzq3.ASM1.asm OFFLINE OFFLINE
ora.westzq3.LISTENER_WESTZQ3.lsnr OFFLINE OFFLINE
ora.westzq3.gsd OFFLINE OFFLINE
ora.westzq3.ons OFFLINE OFFLINE
ora.westzq3.vip OFFLINE OFFLINE
ora.westzq4.ASM2.asm ONLINE ONLINE on westzq4
ora.westzq4.LISTENER_WESTZQ4.lsnr ONLINE ONLINE on westzq4
ora.westzq4.gsd ONLINE ONLINE on westzq4
ora.westzq4.ons ONLINE ONLINE on westzq4
ora.westzq4.vip ONLINE ONLINE on westzq4
---------------------------------------------------------------------------------
r-xr-xr-x 1 root dba 4611660 Jun 22 2005 crs_unregister.bin
与crs_register.bin 是反的
--------------------------------------------------------------------------------
---rwxr-xr-x 1 oracle dba 6440002 Jun 22 2005 evmd.bin CRS组件
--------------------------------------------------------------------------------
-rwxr-xr-x 1 oracle dba 974805 Jun 22 2005 evminfo.bin
--------------------------------------------------------------------------------
---rwxr-xr-x 1 oracle dba 2329660 Jun 22 2005 evmlogger.bin CRS组件
--------------------------------------------------------------------------------
---rwxr-xr-x 1 oracle dba 1684 Nov 19 21:09 evmmkbin
-rwxr-xr-x 1 oracle dba 1090079 Jun 22 2005 evmmkbin.bin
-rwxr-xr-x 1 oracle dba 715372 Jun 22 2005 evmmklib.bin
-rwxr-xr-x 1 oracle dba 1211637 Jun 22 2005 evmpost.bin
-rwxr-xr-x 1 oracle dba 1555969 Jun 22 2005 evmshow.bin
-rwxr-xr-x 1 oracle dba 1053744 Jun 22 2005 evmsort.bin
-rwxr-xr-x 1 oracle dba 1654217 Jun 22 2005 evmwatch.bin
-rwxr-xr-x 1 oracle dba 35614 Jun 22 2005 lsnodes.bin
-rwxr-xr-x 1 oracle dba 708989 Jun 22 2005 oclsmon.bin
--------------------------------------------------------------------------------
-rwxr-xr-x 1 oracle dba 727393 Jun 22 2005 ocrcheck.bin OCR检查工具
-rwxr-xr-x 1 oracle dba 814557 Jun 22 2005 ocrconfig.bin OCR配置工具
-rwxr-xr-x 1 oracle dba 754308 Jun 22 2005 ocrdump.bin OCR DUMP工具
---rwxr-xr-x 1 oracle dba 1689926 Jun 22 2005 ocssd.bin CRS组件
--------------------------------------------------------------------------------
-rwxr-xr-x 1 oracle dba 1235464 Jun 22 2005 oifcfg.bin
网络接口相关信息
[oracle@westzq3 bin]$ oifcfg getif
eth0: 83.0.0.0 global cluster_interconnect
eth1 192.168.123.0 global public
--------------------------------------------------------------------------------
-rwxr-xr-x 1 oracle dba 1204291 Jun 22 2005 olsnodes.bin
集群的节点列表
[oracle@westzq3 bin]$ olsnodes
westzq3
westzq4
--------------------------------------------------------------------------------
-rwxr-xr-x 1 oracle dba 1360885 Jun 22 2005 racgons.bin
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/8242091/viewspace-591764/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/8242091/viewspace-591764/