千家信息网

Oracle Cluster Time Management

发表于:2024-10-27 作者:千家信息网编辑
千家信息网最后更新 2024年10月27日,Cluster Time Synchronization Service(CTSS)可以检测集群中节点之间的时间同步问题。CTSS被作为Oracle CLusterware的一部分进行安装。如果它检测
千家信息网最后更新 2024年10月27日Oracle Cluster Time Management

Cluster Time Synchronization Service(CTSS)可以检测集群中节点之间的时间同步问题。CTSS被作为Oracle CLusterware的一部分进行安装。如果它检测到在系统中存在时间同步服务(比如NTP或Chrony)或者存在时间同步服务配置是valid或broken,那么它将以观察模式运行。例如,如果集群中的任何一个节点上 存在/etc/ntp.conf文件,那么就算没有运行时间同步服务CTSS也会以观察模式运行。如果CTSS在集群的任何一个节点上都没有检测到存在时间同步服务或时间同步服务配置信息,它就会变成主动模式运行并且对集群执行时间管理。如果CTSS在集群中的一个节点上以主动模式运行,在另一个节点上以观察模式运行,并且没有NTP,时间同步软件在运行,那么你可以通过创建一个名叫/etc/ntp.conf的文件来将CTSS修改为观察模式。对于CTSS改变为观察模式 会在alert.log中写入消息。当节点加入集群时,如果CTSS以主动模式运行时,那么它将会使用集群中存在引用时钟的节点与这些加入节点进行时间比较。如果两个时间之间存在差异并且这种差异在特定设置限制,那么CTSS将执行时间同步。集群中的时钟节点由于各种原因将不能使用引用时钟(CTSS用来作为基础的时间,它所在的节点是集群中第一个启动的节点)进行同步。当发生这种情况时,CTSS执行回转时间同步,它将加速或减慢节点上的系统时间直到它们与引 用系统时间处于同步状态。在这种时间同步方法中,CTSS不会向后调整时间,它将保证系统时间单向增加。

当Orale集群软件启动时,如果CTSS以主动模式运行并且时间差异超过了设置限制(限制为24小时),那么CTSS会在alert.log中生成一个告警,并退出,那么Oracle集群软件会启动失败。如果你必须手动对加入集群的节点进行时 间调整,在启动Oracle集群软件之后CTSS可以对这些节点管理时间。当执行回转时间同步时,CTSS从来不会使用引用时钟向后调整时间。CTSS定期写包含它如何使用引用时钟来调整节点时间的告警到alert.log中。

CTSS当出现以下情况下会向Oracle集群alert.log与syslog中写告警信息:
.检查到时间发生改变
.检查到与引用时钟相比存在着显著的时间差异
.从观察模式切换到主动模式或者从主动模式切换到观察模式

使用CTSS来同步集群中的时间可以促进对Oracle集群问题的诊断,因为不需要考虑不同节点上影响时间的一系列事件了。
激活与禁止集群时间同步
为了对集群设置定时间管理服务可以激活CTSS。如果想要使用不同的集群时间同步服务可以禁止CTSS。为了激活CTSS,必须要对集群中的所有节点停止与删除第三方的时间同步服务。当激活CTSS时会检查集群的时间管理服务方式。
下面的RAC因为所有节点存在第三方的时间同步服务配置信息使得CTSS以观察方式运行
检测集群节点是否存在第三方时间同步服务

[root@jytest1 ~]# find / -name ntp.conf/etc/ntp.conf[root@jytest2 ~]# find / -name ntp.conf/etc/ntp.conf[grid@jytest1 ~]$ cluvfy comp clocksync -n allVerifying Clock Synchronization ...CTSS is in Observer state. Switching over to clock synchronization checks using NTP  Verifying Network Time Protocol (NTP) ...    Verifying '/etc/ntp.conf' ...PASSED    Verifying '/etc/chrony.conf' ...PASSED    Verifying '/var/run/chronyd.pid' ...PASSED    Verifying Daemon 'chronyd' ...PASSED    Verifying NTP daemon or service using UDP port 123 ...PASSED    Verifying chrony daemon is synchronized with at least one external time source ...FAILED (PRVG-13606)  Verifying Network Time Protocol (NTP) ...FAILED (PRVG-1063)Verifying Clock Synchronization ...FAILED (PRVG-1063, PRVG-13606)Verification of Clock Synchronization across the cluster nodes was unsuccessful on all the specified nodes.Failures were encountered during execution of CVU verification request "Clock Synchronization across the cluster nodes".Verifying Clock Synchronization ...FAILED  Verifying Network Time Protocol (NTP) ...FAILED  PRVG-1063 : configuration files for more than one time synchronization  service were found on nodes of the cluster  configuration file "/etc/chrony.conf" was found on nodes "jytest2,jytest1"  configuration file "/etc/ntp.conf" was found on nodes "jytest2,jytest1"    Verifying chrony daemon is synchronized with at least one external time    source ...FAILED    jytest2: PRVG-13606 : chrony daemon is not synchronized with any external             time source on node "jytest2".    jytest1: PRVG-13606 : chrony daemon is not synchronized with any external             time source on node "jytest1".CVU operation performed:      Clock Synchronization across the cluster nodesDate:                         Mar 3, 2018 12:58:07 AMCVU home:                     /u01/app/product/12.2.0/crs/User:                         grid[grid@jytest2 ~]$ cluvfy comp clocksync -n allVerifying Clock Synchronization ...CTSS is in Observer state. Switching over to clock synchronization checks using NTP  Verifying Network Time Protocol (NTP) ...    Verifying '/etc/ntp.conf' ...PASSED    Verifying '/etc/chrony.conf' ...PASSED    Verifying '/var/run/chronyd.pid' ...PASSED    Verifying Daemon 'chronyd' ...PASSED    Verifying NTP daemon or service using UDP port 123 ...PASSED    Verifying chrony daemon is synchronized with at least one external time source ...FAILED (PRVG-13606)  Verifying Network Time Protocol (NTP) ...FAILED (PRVG-1063)Verifying Clock Synchronization ...FAILED (PRVG-1063, PRVG-13606)Verification of Clock Synchronization across the cluster nodes was unsuccessful on all the specified nodes.Failures were encountered during execution of CVU verification request "Clock Synchronization across the cluster nodes".Verifying Clock Synchronization ...FAILED  Verifying Network Time Protocol (NTP) ...FAILED  PRVG-1063 : configuration files for more than one time synchronization  service were found on nodes of the cluster  configuration file "/etc/chrony.conf" was found on nodes "jytest2,jytest1"  configuration file "/etc/ntp.conf" was found on nodes "jytest2,jytest1"    Verifying chrony daemon is synchronized with at least one external time    source ...FAILED    jytest2: PRVG-13606 : chrony daemon is not synchronized with any external             time source on node "jytest2".    jytest1: PRVG-13606 : chrony daemon is not synchronized with any external             time source on node "jytest1".CVU operation performed:      Clock Synchronization across the cluster nodesDate:                         Mar 3, 2018 1:11:12 AMCVU home:                     /u01/app/product/12.2.0/crs/User:                         grid

使用grid用户执行crsctl check ctss命令来查看CTSS的运行模式,命令结果显示为观察模式

[grid@jytest1 ~]$ crsctl check ctssCRS-4700: The Cluster Time Synchronization Service is in Observer mode.[grid@jytest2 ~]$ crsctl check ctssCRS-4700: The Cluster Time Synchronization Service is in Observer mode.

现在删除集群节点中的第三方时间同步服务

[root@jytest1 ~]# rm -rf /etc/ntp.conf[root@jytest1 ~]# rm -rf /etc/chrony.conf[root@jytest1 ~]# rm -rf /var/run/chronyd.pid[root@jytest2 ~]# rm -rf /etc/ntp.conf[root@jytest2 ~]# rm -rf /etc/chrony.conf[root@jytest2 ~]# rm -rf /var/run/chronyd.pid

再次检查CTSS的运行模式,可以看到CTSS从观察模式变为了主动模式

[grid@jytest1 ~]$ crsctl check ctssCRS-4701: The Cluster Time Synchronization Service is in Active mode.CRS-4702: Offset (in msec): 100[grid@jytest1 ~]$ cluvfy comp clocksync -n allVerifying Clock Synchronization ...PASSEDVerification of Clock Synchronization across the cluster nodes was successful.CVU operation performed:      Clock Synchronization across the cluster nodesDate:                         Mar 3, 2018 1:14:39 AMCVU home:                     /u01/app/product/12.2.0/crs/User:                         grid[grid@jytest2 ~]$ crsctl check ctssCRS-4701: The Cluster Time Synchronization Service is in Active mode.CRS-4702: Offset (in msec): 0[grid@jytest2 ~]$ cluvfy comp clocksync -n allVerifying Clock Synchronization ...PASSEDVerification of Clock Synchronization across the cluster nodes was successful.CVU operation performed:      Clock Synchronization across the cluster nodesDate:                         Mar 3, 2018 1:15:14 AMCVU home:                     /u01/app/product/12.2.0/crs/User:                         grid
时间 集群 节点 同步 模式 服务 运行 观察 主动 时钟 差异 激活 第三方 系统 软件 检查 检测 管理 调整 信息 数据库的安全要保护哪些东西 数据库安全各自的含义是什么 生产安全数据库录入 数据库的安全性及管理 数据库安全策略包含哪些 海淀数据库安全审计系统 建立农村房屋安全信息数据库 易用的数据库客户端支持安全管理 连接数据库失败ssl安全错误 数据库的锁怎样保障安全 瑶海区千策网络技术 陕西线下生鲜配送软件开发 java 操作日志到数据库 网络安全知识读本内容 事业单位软件开发招聘信息 川大网络安全学院院长 数据库修改表名是 关于网络安全的黑板报 成都医联科技互联网电子病历 伊川软件开发 黑魂三无法登陆服务器有 摩根士丹利 网络安全 游戏软件开发很忙吗 目前戴尔塔式服务器最新是几代 双十一使用多少台服务器 浙江工业软件开发流程 广州通信软件开发费用 网络安全歌谣顺口溜图文版 湘潭杯网络安全 科技与互联网的相互影响PPT 数据库历史语句查询 甘肃服务器机柜哪里买云空间 网络安全与信息安全管理比赛 朝阳区管理网络技术服务怎么样 网络安全攻击事件溯源方案 数据库建立表格时怎么赋初值 手机打电话显示未连接到服务器 网络安全宣传周 答题 国内客户软件开发 怎么查看服务器的加密算法
0