千家信息网

Oracle Cluster Time Management

发表于:2025-11-16 作者:千家信息网编辑
千家信息网最后更新 2025年11月16日,Cluster Time Synchronization Service(CTSS)可以检测集群中节点之间的时间同步问题。CTSS被作为Oracle CLusterware的一部分进行安装。如果它检测
千家信息网最后更新 2025年11月16日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安全错误 数据库的锁怎样保障安全 网咖信息网络安全管理制度 可以通过账号密码远程连接数据库 在数据库中的数据共享指的是什么 万方数据库免费帐号 网站数据如何直接连接数据库 贵阳智能安全文化展厅软件开发 txt文档转数据库 介绍网络安全的博客 密云区专业软件开发大概费用 阿里云服务器vm ips防护用户还是服务器 网络技术负责人职责 gom引擎人物数据库 阿里常用的数据库 gprs tcp 服务器 武汉市铭科网络技术有限公司 税控服务器管理系统什么 天津现代化软件开发创新服务 零基础软件测试和软件开发 云服务器端口映射本地电脑 皮卡堂是什么软件开发的 降魔传世数据库添加物品 湖南分布式存储服务器虚拟主机 卡纸一二三年级网络安全绘画 武汉数据库工程师招聘 小米怎么把账号清除数据库 迅雷服务器人员 计算机网络技术和黑客 财付通网络技术有限公司是什么 pnt软件开发
0