热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

关于oraclerac节点的驱逐

关于orac

我这里主要是想讲讲rac中关于node被驱逐进而导致reboot的情况。
首先说说rac中的心跳, 关于oracle clusterware中的心跳有两种,如下:
1. Disk heartbeat (voting device) - IOT
2. Network heartbeat (across the interconnect) - misscount
这里的disk hearbeat是指votedisk心跳,我们都知道votedisk是仲裁盘,
那么它到底有什么作用呢?Oracle文档有这样描述的:

votedisk:
The Voting Disk is used by the Oracle cluster manager in various layers.
The Node Monitor (NM)uses the Voting Disk for the Disk Hearbeat, which is
essential in the detection and resolution of cluster "split brain".
NM monitors the Voting Disk for other competing sub-clusters and uses it for the
eviction phase. Hence the availability from the Voting Disk is critical for the
operation of the Oracle Cluster Manager.
The shared volumes created for the OCR and the voting disk should be configured
using RAID to protect against media failure. This requires the use of an external
cluster volume manager, cluster file system, or storage hardware that provides
RAID protection.
Disk heartbeat:
Each node writes a disk heartbeat to each voting disk once per second。Each node
reads their kill block once per second, if the kill block is overwritten node commits
suicide.During reconfig (join or leave) CSSD monitors all nodes and determines whether
a node has a disk heartbeat, including those with no network heartbeat.If no disk
heartbeat within I/O timeout (MissCount during cluster reconfiguration) then node is declared as dead.
Voting disk needs to be mirrored, should it become unavailable, cluster will come down.
If an I/O error is reported immediately on access to the vote disk, we immediately mark the vote disk
as offline so it isn't at the party anymore. So now we have (in our case) just two voting disks available.
We do keep retrying access to that dead disk, and if it becomes available again and the data is
uncorrupted we mark it online again. If a second vote disk suffered an I/O error in the window
that the first disk was marked offline. So now we don't have quorum. Bang reboot.

网络心跳就不多说了,指的是rac私网心跳。如下一段摘自网络:

Voting files are used by CSS to ensure data integrity of the database by detecting and resolving network
problems that could lead to a split-brain, so must be accessible at all times. There are other techniques
used by other cluster managers, like quorum server, and quorum disks which function differently, but serve
the same purpose.
Note that a majority of vote disks, i.e. N/2 + 1, must be accessible by each node to ensure that all pairs
node have at least one voting file that they both see, which allows proper resolution of network issues;
this is to address the possible complaint that 2 voting files provide redundancy, so a third should not be
necessary.
During normal processing, each node writes a disk heartbeat once per second and also reads its kill block
once per second. When the kill block indicates that the node has been evicted, the node exits, causing a node
reboot.As long as we have enough voting disks online, the node can survive, but when the number of offline
voting disks is greater than or equal to the number of online voting disks, the Cluster Communication Service
daemon will fail resulting in a reboot. The rationale for this is that as long as each node is required to
have a majority of voting disks online, there is guaranteed to be one voting disk that both nodes in a 2
node pair can see.

上面提到了对于votedisk(仲裁盘),当cluster中有节点出现故障时,offline的votedisk个数必须小于存活votedisk个数,
否则会导致存活的节点reboot。
下面再来说说几个重要的参数值.
misscount: 网络心跳可以丢失的次数(单位是秒)
不同平台和版本的misscount默认值是不一样的,详见如下表格:






























OS

10g (R1 &R2)

11g

Linux

60

30

Unix

30

30

VMS

30

30

Windows

30

30


另外如果使用了第三方cluster软件时,那么misscount值默认即为600s,这里脑裂也是第三方cluster软件来完成的。
diskhearbeat即disktimeout,在10.2.0.1+版本以后(打了patch 4896338)默认值是200s。
disktimeout也简称为DTO,但是文档上又把DTO细分为两种,如下:
-- SDTO,是short disk time out的简称,即节点添加或删除时cluster需要进行reconfigure的时间。
-- LDTO,是指正常的rac操作中允许votedisk i/o完成超时的时间。
rebootime:在10g~11g中默认都为3s,即是rac出现脑裂或节点被驱逐的时候,该节点将会在rebootime时间内被重启。
文档中提到node的驱逐从10201版本以后,不在根据DTO来决定,而是基于disktimeout,
默认情况下,misscount的值小于disktimeout。
那么, 在什么情况下会导致node被驱逐呢?如下:
· Node is not pinging via the network heartbeat
· Node is not pinging the Voting disk
· Node is hung/busy and is unable to perform either of the earlier tasks
根据文档中的描述,翻译过来的node reboot条件表格:





























Network Ping

Disk Ping

Reboot(是否重启)

在misscount值 内完成

在misscount值内完成


在misscount值内完成

Disk ping时间超过misscount值,但是小于disktimeout值。


在misscount值内完成

Disk ping时间超过disktimeout值


Network ping时间超过misscount值

在misscount值内完成




修改如上几个参数值的方法如下:
$ORA_CRS_HOME/bin/crsctl set css misscount
where is the maximum i/o latency to the voting disk +1 second
10.2.0.1+版本,如果应用了patch4896338,那么还需要有如下的操作:
$CRS_HOME/bin/crsctl set css reboottime [-force] ( is seconds)
$CRS_HOME/bin/crsctl set css disktimeout [-force] ( is seco
最后需要说明一下的是,在使用了第三方集群如cluster软件以后,oracle就不再推荐修改misscount,
可以引发潜在的错误。oracle是这样解释的:
Do not change default misscount values if you are running Vendor Clusterware along with Oracle Clusterware.
The default values for misscount should not be changed when using vendor clusterware. Modifying misscount in
this environment may cause clusterwide outages and potential corruptions.
如上的信息大家可以参考如下的几个mos文档:
10g RAC- Steps To Increase CSS Misscount- Reboottime and Disktimeout
CSS Timeout Computation in Oracle Clusterware
Reconfiguring the CSS disktimeout of 10gR2 Clusterware for Proper LUN Failover of the
Dell MD3000i iSCSI Storage [ID 462616.1]
How to start/stop the 10g CRS ClusterWare [ID 309542.1]

推荐阅读
  • 在Oracle11g以前版本中的的DataGuard物理备用数据库,可以以只读的方式打开数据库,但此时MediaRecovery利用日志进行数据同步的过 ... [详细]
  • 本文介绍了Oracle存储过程的基本语法和写法示例,同时还介绍了已命名的系统异常的产生原因。 ... [详细]
  • 本文介绍了Oracle数据库中tnsnames.ora文件的作用和配置方法。tnsnames.ora文件在数据库启动过程中会被读取,用于解析LOCAL_LISTENER,并且与侦听无关。文章还提供了配置LOCAL_LISTENER和1522端口的示例,并展示了listener.ora文件的内容。 ... [详细]
  • 本文介绍了使用PHP实现断点续传乱序合并文件的方法和源码。由于网络原因,文件需要分割成多个部分发送,因此无法按顺序接收。文章中提供了merge2.php的源码,通过使用shuffle函数打乱文件读取顺序,实现了乱序合并文件的功能。同时,还介绍了filesize、glob、unlink、fopen等相关函数的使用。阅读本文可以了解如何使用PHP实现断点续传乱序合并文件的具体步骤。 ... [详细]
  • Spring特性实现接口多类的动态调用详解
    本文详细介绍了如何使用Spring特性实现接口多类的动态调用。通过对Spring IoC容器的基础类BeanFactory和ApplicationContext的介绍,以及getBeansOfType方法的应用,解决了在实际工作中遇到的接口及多个实现类的问题。同时,文章还提到了SPI使用的不便之处,并介绍了借助ApplicationContext实现需求的方法。阅读本文,你将了解到Spring特性的实现原理和实际应用方式。 ... [详细]
  • ZSI.generate.Wsdl2PythonError: unsupported local simpleType restriction ... [详细]
  • Python正则表达式学习记录及常用方法
    本文记录了学习Python正则表达式的过程,介绍了re模块的常用方法re.search,并解释了rawstring的作用。正则表达式是一种方便检查字符串匹配模式的工具,通过本文的学习可以掌握Python中使用正则表达式的基本方法。 ... [详细]
  • 自动轮播,反转播放的ViewPagerAdapter的使用方法和效果展示
    本文介绍了如何使用自动轮播、反转播放的ViewPagerAdapter,并展示了其效果。该ViewPagerAdapter支持无限循环、触摸暂停、切换缩放等功能。同时提供了使用GIF.gif的示例和github地址。通过LoopFragmentPagerAdapter类的getActualCount、getActualItem和getActualPagerTitle方法可以实现自定义的循环效果和标题展示。 ... [详细]
  • 成功安装Sabayon Linux在thinkpad X60上的经验分享
    本文分享了作者在国庆期间在thinkpad X60上成功安装Sabayon Linux的经验。通过修改CHOST和执行emerge命令,作者顺利完成了安装过程。Sabayon Linux是一个基于Gentoo Linux的发行版,可以将电脑快速转变为一个功能强大的系统。除了作为一个live DVD使用外,Sabayon Linux还可以被安装在硬盘上,方便用户使用。 ... [详细]
  • 本文介绍了在处理不规则数据时如何使用Python自动提取文本中的时间日期,包括使用dateutil.parser模块统一日期字符串格式和使用datefinder模块提取日期。同时,还介绍了一段使用正则表达式的代码,可以支持中文日期和一些特殊的时间识别,例如'2012年12月12日'、'3小时前'、'在2012/12/13哈哈'等。 ... [详细]
  • 使用圣杯布局模式实现网站首页的内容布局
    本文介绍了使用圣杯布局模式实现网站首页的内容布局的方法,包括HTML部分代码和实例。同时还提供了公司新闻、最新产品、关于我们、联系我们等页面的布局示例。商品展示区包括了车里子和农家生态土鸡蛋等产品的价格信息。 ... [详细]
  • 十大经典排序算法动图演示+Python实现
    本文介绍了十大经典排序算法的原理、演示和Python实现。排序算法分为内部排序和外部排序,常见的内部排序算法有插入排序、希尔排序、选择排序、冒泡排序、归并排序、快速排序、堆排序、基数排序等。文章还解释了时间复杂度和稳定性的概念,并提供了相关的名词解释。 ... [详细]
  • 超级简单加解密工具的方案和功能
    本文介绍了一个超级简单的加解密工具的方案和功能。该工具可以读取文件头,并根据特定长度进行加密,加密后将加密部分写入源文件。同时,该工具也支持解密操作。加密和解密过程是可逆的。本文还提到了一些相关的功能和使用方法,并给出了Python代码示例。 ... [详细]
  • OCI连接MySQL_PLSQL Developer连接远程数据库OCI客户端安装方法
    本文介绍了使用OCI客户端连接MySQL和PLSQL Developer连接远程数据库的安装方法,避免了在本地安装Oracle数据库或类似的开发套件的麻烦,同时解决了PLSQL Dev连接远程Oracle时的配置问题。 ... [详细]
  • java drools5_Java Drools5.1 规则流基础【示例】(中)
    五、规则文件及规则流EduInfoRule.drl:packagemyrules;importsample.Employ;ruleBachelorruleflow-group ... [详细]
author-avatar
Icy芸土_644
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有