11g RAC r2 的启停命令概述1
目标:
- 熟悉主要进程的启停顺序
- 了解独占模式 -excl
- crsctl start crs与crsctl start cluster 区别
1.熟悉主要进程的启停顺序
1.1 启动节点rac1:
[root@rac1 bin]# ./crsctl start crs -excl
CRS-: Oracle High Availability Services has been started. --启动OHASD进程
CRS-: Attempting to start 'ora.gipcd' on 'rac1'
CRS-: Attempting to start 'ora.mdnsd' on 'rac1'
CRS-: Start of 'ora.gipcd' on 'rac1' succeeded --启动ora.gipcd
CRS-: Start of 'ora.mdnsd' on 'rac1' succeeded --启动ora.mdnsd
CRS-: Attempting to start 'ora.gpnpd' on 'rac1'
CRS-: Start of 'ora.gpnpd' on 'rac1' succeeded --启动ora.gpnpd
CRS-: Attempting to start 'ora.cssdmonitor' on 'rac1'
CRS-: Start of 'ora.cssdmonitor' on 'rac1' succeeded --启动ora.cssdmonitor
CRS-: Attempting to start 'ora.cssd' on 'rac1'
CRS-: Attempting to clean 'ora.diskmon' on 'rac1'
CRS-: Clean of 'ora.diskmon' on 'rac1' succeeded --清除ora.diskmon
CRS-: Attempting to start 'ora.diskmon' on 'rac1'
CRS-: Start of 'ora.diskmon' on 'rac1' succeeded --启动ora.diskmon
CRS-: Start of 'ora.cssd' on 'rac1' succeeded --启动ora.cssd
CRS-: Attempting to start 'ora.ctssd' on 'rac1'
CRS-: Attempting to start 'ora.drivers.acfs' on 'rac1'
CRS-: Start of 'ora.ctssd' on 'rac1' succeeded --启动ora.ctssd
CRS-: Start of 'ora.drivers.acfs' on 'rac1' succeeded --启动ora.drivers.acfs
CRS-: Attempting to start 'ora.asm' on 'rac1'
CRS-: Start of 'ora.asm' on 'rac1' succeeded --启动ora.asm
CRS-: Attempting to start 'ora.crsd' on 'rac1'
CRS-: Start of 'ora.crsd' on 'rac1' succeeded --启动ora.crsd 观察节点rac2: --节点未启动,说明 crsctl start crs -excl 只启动单节点进程
[root@rac2 bin]# ps -ef|grep grid
root : pts/ :: grep grid
[root@rac2 bin]#
1.2 关闭节点rac1
[root@rac1 bin]# ./crsctl stop crs -f
CRS-: Starting shutdown of Oracle High Availability Services-managed resources on 'rac1'
CRS-: Attempting to stop 'ora.crsd' on 'rac1'
CRS-: Stop of 'ora.crsd' on 'rac1' succeeded --关闭ora.crsd
CRS-: Attempting to stop 'ora.cssdmonitor' on 'rac1'
CRS-: Attempting to stop 'ora.ctssd' on 'rac1'
CRS-: Attempting to stop 'ora.asm' on 'rac1'
CRS-: Attempting to stop 'ora.drivers.acfs' on 'rac1'
CRS-: Attempting to stop 'ora.mdnsd' on 'rac1'
CRS-: Stop of 'ora.cssdmonitor' on 'rac1' succeeded --关闭ora.cssdmonitor
CRS-: Stop of 'ora.mdnsd' on 'rac1' succeeded --关闭ora.mdnsd
CRS-: Stop of 'ora.ctssd' on 'rac1' succeeded --关闭ora.ctssd
CRS-: Stop of 'ora.drivers.acfs' on 'rac1' succeeded --关闭ora.drivers.acfs
CRS-: Stop of 'ora.asm' on 'rac1' succeeded --关闭ora.asm
CRS-: Attempting to stop 'ora.cssd' on 'rac1'
CRS-: Stop of 'ora.cssd' on 'rac1' succeeded --关闭ora.cssd
CRS-: Attempting to stop 'ora.gpnpd' on 'rac1'
CRS-: Attempting to stop 'ora.diskmon' on 'rac1'
CRS-: Stop of 'ora.gpnpd' on 'rac1' succeeded --关闭ora.gpnpd
CRS-: Attempting to stop 'ora.gipcd' on 'rac1'
CRS-: Stop of 'ora.diskmon' on 'rac1' succeeded --关闭ora.diskmon
CRS-: Stop of 'ora.gipcd' on 'rac1' succeeded --关闭ora.gipcd
CRS-: Shutdown of Oracle High Availability Services-managed resources on 'rac1' has completed --关闭OHASD进程
CRS-: Oracle High Availability Services has been stopped.
[root@rac1 bin]#
总结:重要进程的启动顺序为:OHASD -> ora.gpnpd -> ora.cssd -> ora.asm -> ora.crsd
2. 了解独占模式 -excl
既然是以独占模式启动,那么有些资源一定是不能被其他节点共享的。出现抢占资源会出现什么情况
2.1 启动节点rac1:
[root@rac1 bin]# ./crsctl start crs -excl -- -excl表示以独占模式启动
CRS-: Oracle High Availability Services has been started.
CRS-: Attempting to start 'ora.gipcd' on 'rac1'
CRS-: Attempting to start 'ora.mdnsd' on 'rac1'
CRS-: Start of 'ora.gipcd' on 'rac1' succeeded
CRS-: Start of 'ora.mdnsd' on 'rac1' succeeded
CRS-: Attempting to start 'ora.gpnpd' on 'rac1'
CRS-: Start of 'ora.gpnpd' on 'rac1' succeeded
CRS-: Attempting to start 'ora.cssdmonitor' on 'rac1'
CRS-: Start of 'ora.cssdmonitor' on 'rac1' succeeded
CRS-: Attempting to start 'ora.cssd' on 'rac1'
CRS-: Attempting to clean 'ora.diskmon' on 'rac1'
CRS-: Clean of 'ora.diskmon' on 'rac1' succeeded
CRS-: Attempting to start 'ora.diskmon' on 'rac1'
CRS-: Start of 'ora.diskmon' on 'rac1' succeeded
CRS-: Start of 'ora.cssd' on 'rac1' succeeded
CRS-: Attempting to start 'ora.ctssd' on 'rac1'
CRS-: Attempting to start 'ora.drivers.acfs' on 'rac1'
CRS-: Start of 'ora.ctssd' on 'rac1' succeeded
CRS-: Start of 'ora.drivers.acfs' on 'rac1' succeeded
CRS-: Attempting to start 'ora.asm' on 'rac1'
CRS-: Start of 'ora.asm' on 'rac1' succeeded
CRS-: Attempting to start 'ora.crsd' on 'rac1'
CRS-: Start of 'ora.crsd' on 'rac1' succeeded
[root@rac1 bin]#
2.2 RAC1在独占模式下时,看看节点RAC2抢占资源时会发生什么:
[root@rac2 bin]# ./crsctl start crs -excl
CRS-: Oracle High Availability Services has been started.
CRS-: Attempting to start 'ora.gipcd' on 'rac2'
CRS-: Attempting to start 'ora.mdnsd' on 'rac2'
CRS-: Start of 'ora.gipcd' on 'rac2' succeeded
CRS-: Start of 'ora.mdnsd' on 'rac2' succeeded
CRS-: Attempting to start 'ora.gpnpd' on 'rac2'
CRS-: Start of 'ora.gpnpd' on 'rac2' succeeded
CRS-: Attempting to start 'ora.cssdmonitor' on 'rac2'
CRS-: Start of 'ora.cssdmonitor' on 'rac2' succeeded
CRS-: Attempting to start 'ora.cssd' on 'rac2'
CRS-: Attempting to clean 'ora.diskmon' on 'rac2'
CRS-: Clean of 'ora.diskmon' on 'rac2' succeeded
CRS-: Attempting to start 'ora.diskmon' on 'rac2'
CRS-: Start of 'ora.diskmon' on 'rac2' succeeded
16 CRS-4402: The CSS daemon was started in exclusive mode but found an active CSS daemon on node rac1, number 1, and is terminating
17 CRS-2674: Start of 'ora.cssd' on 'rac2' failed
CRS-: Attempting to clean 'ora.cssd' on 'rac2'
CRS-: Clean of 'ora.cssd' on 'rac2' succeeded
CRS-: Attempting to stop 'ora.diskmon' on 'rac2'
CRS-: Stop of 'ora.diskmon' on 'rac2' succeeded
CRS-: Attempting to stop 'ora.cssdmonitor' on 'rac2'
CRS-: Stop of 'ora.cssdmonitor' on 'rac2' succeeded
CRS-: Attempting to stop 'ora.gpnpd' on 'rac2'
CRS-: Stop of 'ora.gpnpd' on 'rac2' succeeded
CRS-: Attempting to stop 'ora.mdnsd' on 'rac2'
CRS-: Stop of 'ora.mdnsd' on 'rac2' succeeded
CRS-: Attempting to stop 'ora.gipcd' on 'rac2'
CRS-: Stop of 'ora.gipcd' on 'rac2' succeeded
CRS-: Command Start failed, or completed with errors.
[root@rac2 bin]#
出现状况了(CRS-4402,CRS-2674),现在看看两个节点的的进程状况.
2.3 查看两个节点此时的进程状况
节点RAC1的进程状态:
[root@rac1 bin]# ps -ef|grep grid
root : ? :: /u01/grid/bin/ohasd.bin exclusive
grid : ? :: /u01/grid/bin/oraagent.bin
grid : ? :: /u01/grid/bin/gipcd.bin
grid : ? :: /u01/grid/bin/mdnsd.bin
grid : ? :: /u01/grid/bin/gpnpd.bin
root : ? :: /u01/grid/bin/orarootagent.bin
grid : ? :: /u01/grid/bin/diskmon.bin -d -f
root : pts/ :: grep grid
[root@rac1 bin]# 节点RAC2的进程状态:
[root@rac2 bin]# ps -ef|grep grid
root : ? :: /u01/grid/bin/ohasd.bin exclusive
root : pts/ :: grep grid
[root@rac2 bin]#
哈哈,在争夺资源时RAC1,RAC2两败俱伤!独占模式一般用于数据库恢复,升级时。
以非独占模式启动则是去掉 -excl:crsctl start crs
3. crsctl start crs与crsctl start cluster 区别
Oracle 11g r2 把一些grid类的组件进行了打包,叫做 grid infrastructure ,简称GI,主要包括如下组件:
1) ohas :新增的 oracle high availability service。
2) crs:原有的clusterware 组件,功能有很大改变。
3) asm:以前是集成在dbca,现在单独抽了出来,添加了asmca,增强了asmcmd,增强了advm,acfs。
4) oracle net:就是以前数据库的监听那部分,增加了scan。 1. crsctl start/stop crs 是对当前节点的相关资源进行操作的,是包含ohas的,通过check 可以查看结果
[grid@node1 bin]$ ./crsctl check crs
CRS-4638: Oracle High Availability Services is online
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online crsctl start/stop crs 是会影响到这4种进程的 2. crsctl start/stop cluster 可对集群的所有节点(当然包括当前节点)的相关资源进行操作的,前提是目标节点ohas必需是OK的,通过check 可以查看结果
[grid@node1 bin]$ ./crsctl check cluster
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online 添加 -all 或者 -n node1,node2 参数 可对集群的所有节点或者指定 的 node1,node2 节点操作 [grid@node1 bin]$ ./crsctl check cluster -all
**************************************************************
node1:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
**************************************************************
node2:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
************************************************************** crsctl start/stop cluster 只会影响到 这三种进程,不会影响到 ohas。 可以通过 crsctl enable/disable has 来控制has的是否随OS的启动而启动。类似 crs 也有 crsctl enable/disable crs
11g RAC r2 的启停命令概述1的更多相关文章
- oracle 11g rac R2 for linux change(public,vip)IP ,hostname (oracle 11g rac R2 修改公有,虚拟,私有IP,网卡)
结构如下: 说明: 节点IP,主机名的修改步骤来自ORACLE support文档: 如何修改集群的公网信息(包括 VIP) (文档 ID 1674442.1) 实验环境情况如下: 实验 节点名称 数 ...
- Hadoop组件启停命令和服务链接汇总
1.启停命令 Zookeeper zkServer.sh start zkServer.sh stop/status/restart zkCli.sh -server IP:Port Hadoop(h ...
- Oracle常用启停命令
一.监听启停 Oracle监听的启动.停止和状态查看 Oracle监听启动: lsnrctl start Oracle监听停止: lsnrctl stop Oracle监听状态 lsnrctl sta ...
- 安装Oracle 11g RAC R2 之Linux DNS 配置
Oracle 11g RAC 集群中引入了SCAN(Single Client Access Name)的概念,也就是指集群的单客户端访问名称.SCAN 这个特性为客户端提供了单一的主机名,用于访问集 ...
- 11g RAC R2 之Linux DNS 配置
在动手配置前,最好先了解下DNS的理论,以免犯不必要的错误.这都是被坑后的觉悟 -_-!!! Oracle 11g RAC 集群中引入了SCAN(SingleClientAccessName)的概念, ...
- nginx 启停命令
nginx 启停配置 #!/bin/sh # # nginx Startup script for nginx # # chkconfig: - 85 15 # processname: nginx ...
- 【RAC】Oracle 10g RAC相关启停命令,维护命令
Oracle10g RAC关闭及启动步骤 情况1:需要关闭DB(所有实例),OS及Server. a.首先停止Oracle10g环境 $ lsnrctl stop (每个节点上停止监听,也可以用s ...
- 11g RAC R2 体系结构---用户及用户组
10.2 RAC 到11.2 RAC 用户及用户组的变化: 在10.2 RAC 的部署中,只需要一个用户(oracle)和一个用户组(dba).Database.Clusterware都是用oracl ...
- Rac grid用户启停监听报错无权限
[grid@max1 ~]$ lsnrctl stop LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 04-NOV-2016 00:20: ...
随机推荐
- 【阿里云产品公测】利用PTS服务优化网站数据库读写性能
[阿里云产品公测]利用PTS服务优化网站数据库读写性能 作者:阿里云用户千鸟 写这个帖子主要也是因为在用PTS测试网站的时候,手动访问网站进入报错页面,主要原因是数据库连接对象存在问题,导致并发多的时 ...
- ASP.NET通过byte正确安全的判断上传文件格式
本文介绍一种更安全的方式上传图片,他能有效的防止一些通过修改文件后缀或MIME来伪造的图片的上传,从而保证服务器的安全,希望对大家有所帮助. ASP.NET中在判断文件格式时,我们以前常用的方法就是通 ...
- 来TN公司两周的记录
刚好上两周班,现在记录一下吧. 第一周:全部是培训,关于系统的架构.BOSS.NGBOSS.编码规范.开发规范.项目文档等.听了之后对公司的技术还是有一定的了解.至少知道公司不只一个web站. 第二周 ...
- web前端开发(3)
css 类命名使用骆驼命名法,可以与划线法结合使用. 骆驼命名法用于区别单词,划线命名用于表达从属关系. 尽量不要使用子选择器,否则容易引起冲突隐患. css可以分为 base.common.page ...
- LearnMVC5-AddAModel
本人是MVC新手,将从微软官网学习MVC并将看过的英文文档翻译成中文,由于本人英文水平不好,有翻译不准确.错误的地方万望指出,我看到后将会在第一时间修改.另外也希望这一系列文章能为后来者起到引导作用. ...
- mybatis--MapperProxy事务
上篇 详细分析了org.mybatis.spring.mapper.MapperScannerConfigurer 和 org.mybatis.spring.SqlSessionFactoryBean ...
- Linux+Apache+Php+Oracle 基础环境搭建
前言: 不能保证100%一次通过,每个系统都会或多或少有区别,如果缺少某些依赖包的话,还请见谅 1.安装Apache需要编译安装的包,各官方网站下载 ...
- POJ 2516 Minimum Cost 最小费用流
题目: 给出n*kk的矩阵,格子a[i][k]表示第i个客户需要第k种货物a[i][k]单位. 给出m*kk的矩阵,格子b[j][k]表示第j个供应商可以提供第k种货物b[j][k]单位. 再给出k个 ...
- Qt之软件打包
新建文件:gen.bat,写入: set PATH=C:/Qt/Qt5.5.1/5.5/mingw492_32/bin;C:/Qt/Qt5.5.1/Tools/mingw492_32/bin;%PAT ...
- Table of Contents - CXF
Getting Started A simple JAX-WS service Writing a service with Spring Tools WSDL to Java RESTful Ser ...