关于RAC CRS 自动启动

关于CRS自动重启实验

一.检查ASM

[[email protected] ~]# /etc/init.d/oracleasm status

Checking if ASM is loaded: yes

Checking if /dev/oracleasm is mounted: yes

[[email protected] ~]# /etc/init.d/oracleasm listdisks

ASM01

ASM02

ASM03

二.RAC自动启动的时候后台CRS进程

[[email protected] ~]# ls -l /etc/init.d/init.*

-r-xr-xr-x 1 root root  1951 Aug 20 11:57 /etc/init.d/init.crs

-r-xr-xr-x 1 root root  4722 Aug 20 11:57 /etc/init.d/init.crsd

-r-xr-xr-x 1 root root 35402 Aug 20 11:57 /etc/init.d/init.cssd

-r-xr-xr-x 1 root root  3198 Aug 20 11:57 /etc/init.d/init.evmd

三.我查看一下CRS状态

节点1

[[email protected] ~]# crs_stat -t

Name           Type           Target    State     Host

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

ora....B1.inst application    ONLINE    ONLINE    rac1

ora....B2.inst application    ONLINE    ONLINE    rac2

ora.RACDB.db   application    ONLINE    ONLINE    rac1

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

节点2

[[email protected] ~]# crs_stat -t

Name           Type           Target    State     Host

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

ora....B1.inst application    ONLINE    ONLINE    rac1

ora....B2.inst application    ONLINE    ONLINE    rac2

ora.RACDB.db   application    ONLINE    ONLINE    rac1

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

方法:也可以用crs_stat 查看全部进程信息

[[email protected] bin]# ./crs_stat

NAME=ora.RACDB.RACDB1.inst

TYPE=application

TARGET=ONLINE

STATE=ONLINE on rac1

NAME=ora.RACDB.RACDB2.inst

TYPE=application

TARGET=ONLINE

STATE=ONLINE on rac2

NAME=ora.RACDB.db

TYPE=application

TARGET=ONLINE

STATE=ONLINE on rac1

NAME=ora.rac1.ASM1.asm

TYPE=application

TARGET=ONLINE

STATE=ONLINE on rac1

NAME=ora.rac2.gsd

TYPE=application

TARGET=ONLINE

STATE=OFFLINE on rac2

NAME=ora.rac2.ons

TYPE=application

TARGET=ONLINE

STATE=UNKNOWN on rac2

。。。

1.对于OFFLINE的进程可以手动启动

[[email protected] bin]# ./crs_start ora.rac2.gsd

Attempting to start `ora.rac2.gsd` on member `rac2`

Start of `ora.rac2.gsd` on member `rac2` succeeded.

2.对于UNKNOWN的进程  可以先./crs_stop .... 后再 ./crs_start

3.如果crs_stop不能结束,crs_start不能启动的进程,解决方式:

3.1 使用crs_stop -f 参数把crs中状态是UNKNOWN的服务关掉,然后再用crs_start -f(加一个-f的参数)启动所有的服务就可以。分别在两个节点上执行。

3.2 转换到root用户下用/etc/init.d/init.crs stop先禁用crs,然后在用/etc/init.d/init.crs start去启用crs,启用crs后会自启动crs的一系列服务,注意:此种方法最好在两节点都执行。 (但我自己做实验只在节点1上也可以)

[[email protected] ~]# /etc/init.d/init.crs stop

Shutting down Oracle Cluster Ready Services (CRS):

Stopping resources.

Successfully stopped CRS resources

Stopping CSSD.

Shutting down CSS daemon.

Shutdown request successfully issued.

Shutdown has begun. The daemons should exit soon.

[[email protected] bin]# ./crs_stat -t

CRS-0184: Cannot communicate with the CRS daemon.

[[email protected] bin]# ./crs_stat -t

Name           Type           Target    State     Host

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

ora....B1.inst application    ONLINE    ONLINE    rac1

ora....B2.inst application    ONLINE    ONLINE    rac2

ora.RACDB.db   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

2.查看当前关于crs的进程

[[email protected] ~]$ ps -ef |grep crs

root     23206     1  0 03:05 ?        00:00:00 /u01/app/oracle/product/10.2.0/db_1/bin/crsd.bin restart

oracle   30815 29217  0 03:10 pts/4    00:00:00 grep crs

3.kill 掉crs进程

[[email protected] ~]# kill -9 23206

[[email protected] ~]# crs_stat -t

CRS-0184: Cannot communicate with the CRS daemon.

4.此时crs进程秒级的进入boot状态,还有服务init.crsd 运行

[[email protected] ~]# ps -ef|grep crs

root       430     1  0 03:12 ?        00:00:00 /bin/sh /etc/init.d/init.crsd run

root       507   474  0 03:12 ?        00:00:00 /bin/su -l oracle -c /u01/app/oracle/product/10.2.0/db_1/bin/crsctl check boot > /tmp/crsctl.474

oracle     508   507  0 03:12 ?        00:00:00 -bash -c /u01/app/oracle/product/10.2.0/db_1/bin/crsctl check boot > /tmp/crsctl.474

oracle     539   508  0 03:12 ?        00:00:00 /u01/app/oracle/product/10.2.0/db_1/bin/crsctl.bin check boot

root       570  2971  0 03:12 pts/4    00:00:00 grep crs

节点2

[[email protected] ~]$ ps -ef|grep crs

root      4348     1  0 13:56 ?        00:00:01 /u01/app/oracle/product/10.2.0/db_1/bin/crsd.bin reboot

oracle   25981 16487  0 15:16 pts/3    00:00:00 grep crs

[[email protected] ~]$ crs_stat -t

Name           Type           Target    State     Host

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

ora....B1.inst application    ONLINE    ONLINE    rac1

ora....B2.inst application    ONLINE    ONLINE    rac2

ora.RACDB.db   application    ONLINE    ONLINE    rac1

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

5.再次查看进程 只有init.crsd进程运行

[[email protected] ~]# ps -ef|grep crs

root       430     1  0 03:12 ?        00:00:00 /bin/sh /etc/init.d/init.crsd run

root       730  2971  0 03:12 pts/4    00:00:00 grep crs

[[email protected] ~]# ps -ef|grep crs

root       430     1  0 03:12 ?        00:00:00 /bin/sh /etc/init.d/init.crsd run

root       833  2971  0 03:12 pts/4    00:00:00 grep crs

6.一分钟左右查看

[[email protected] ~]# ps -ef|grep crs

root       430     1  0 03:12 ?        00:00:00 /u01/app/oracle/product/10.2.0/db_1/bin/crsd.bin restart

root      4813  2971  0 03:14 pts/4    00:00:00 grep crs

此时的crs 服务已经是启动了

[[email protected] ~]# crs_stat -t

Name           Type           Target    State     Host

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

ora....B1.inst application    ONLINE    ONLINE    rac1

ora....B2.inst application    ONLINE    ONLINE    rac2

ora.RACDB.db   application    ONLINE    ONLINE    rac1

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

关于RAC CRS 自动启动

时间: 2024-10-09 20:09:49

关于RAC CRS 自动启动的相关文章

oracle 11g rac 无法自动启动

如果以上的操作依然不能使数据库资源自动启动,那么参考下面这篇文章修改资源AUTO_START属性. 查看资源状态: crsctl status resource 资源       -p crsctl <command> <object> -h  For example, crsctl relocate resource -h [[email protected] ~]$ crsctl status resource ora.DATADG.dg                   -

orcle 11g rac crs状态正常,节点2数据库未启动

orcle 11g rac crs状态正常,节点2数据库未启动 安装完oracle11g R2 rac后,在节点1上查看数据库状态: [[email protected] ~]$ sqlplus / as sysdba SQL*Plus: Release 11.2.0.4.0 Production on Wed May 17 18:56:34 2017 Copyright (c) 1982, 2013, Oracle.  All rights reserved. Connected to: Or

Oracle Study之--Oracle 11gR2 RAC crs启动故障

Oracle Study之--Oracle 11gR2 RAC crs启动故障 系统环境:     操作系统:RedHat EL5     Cluster:  Oracle 11gR2 Grid     Oracle:   Oracle 11gR2  RAC环境中,其中一个节点crsd进程启动失败: [[email protected] ~]$ crsctl check crsCRS-4638: Oracle High Availability Services is onlineCRS-453

Oracle Study之--Oracle 11gR2 RAC crs启动故障(CRS-4000)

Oracle Study之--Oracle 11gR2 RAC crs启动故障(CRS-4000) 系统环境:     操作系统:RedHat EL5     Cluster:  Oracle 11gR2 Grid     Oracle:   Oracle 11gR2  在启动一个node的CRS时出现以下错误,错误现象: [[email protected] ~]# crsctl start crs   Failure at scls_scr_getval with code 1   Inte

左右RAC CRS 自己主动启动

左右CRS自己主动重新启动实验 一.检验ASM [[email protected] ~]# /etc/init.d/oracleasm status Checking if ASM is loaded: yes Checking if /dev/oracleasm is mounted: yes [[email protected] ~]# /etc/init.d/oracleasm listdisks ASM01 ASM02 ASM03 二.RAC自己主动启动的时候后台CRS进程 [[ema

Oracle 10g RAC 升级(CPU Update)之--升级CRS

Oracle 10g RAC 升级(CPU Update)之--升级CRS 系统环境: 操作系统:RedHat EL5 Cluster: Oracle CRS 10.2.0.1.0 Oracle:  Oracle 10.2.0.1.0 如图所示:RAC 系统架构 案例: 本案例是从 Oracle 10.2.0.1.0 升级到10.2.0.4.0,作为Oracle的补丁升级(CPU Update). 升级步骤:   1.CRS 升级(对于CRS 升级可以采用滚动升级,本案例采用了滚动升级)   2

oracle rac的启动与停止

引言:这写篇文章的出处是因为我的一名学生最近在公司搭建RAC集群,但对其启动与关闭的顺序和原理不是特别清晰,我在教学工作中也发现了很多学员对RAC知识了解甚少,因此我在这里就把RAC里面涉及到的最常用的启动与关闭顺序和命令逐一列举出来,由于RAC的后台资源较多,因此涉及到的命令也很多,最后附上帮助手册让在工作中临时使用时也可以迅速查到,如果这篇文章能够帮到大家就是我今后继续努力撰写的动力,感谢大家对我文章的浏览多提宝贵意见. 11G RAC启动关闭简单的多. 关闭:1,oracle用户关闭服务.

【Oracle】RAC下的一些常用命令(一)

节点层: olsnodes -n:显示每个节点编号. [[email protected] ~]# olsnodes -n rac1    1 rac2    2 -p:显示每个节点用于private interconnect的网络接口名称. [[email protected] ~]# olsnodes -p rac1    rac1-priv rac2    rac2-priv -i:显示每个节点的VIP [[email protected] ~]# olsnodes -i rac1    

oracle CRS-0184 无法与crs守护进程对话

oracle 11g rac crs进程重启时报错 1 创建rac集群时出现上述错误 删除node1机器上的/etc/oracle/scls_scr/rac1/oracle/cssfatal 文件   运行/u01/app/grid/product/11.2.0/grid/root.sh     2 rac运行过程中出现上述错误 两个节点crs_stop -all 如果有unknown 进程需要 crs_stop -f 运行 /u01/app/11.2.0/grid/bun/crsctl sta