您好,登錄后才能下訂單哦!
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 all Verifying 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 nodes Date: Mar 3, 2018 12:58:07 AM CVU home: /u01/app/product/12.2.0/crs/ User: grid [grid@jytest2 ~]$ cluvfy comp clocksync -n all Verifying 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 nodes Date: Mar 3, 2018 1:11:12 AM CVU home: /u01/app/product/12.2.0/crs/ User: grid
使用grid用戶執行crsctl check ctss命令來查看CTSS的運行模式,命令結果顯示為觀察模式
[grid@jytest1 ~]$ crsctl check ctss CRS-4700: The Cluster Time Synchronization Service is in Observer mode. [grid@jytest2 ~]$ crsctl check ctss CRS-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 ctss CRS-4701: The Cluster Time Synchronization Service is in Active mode. CRS-4702: Offset (in msec): 100 [grid@jytest1 ~]$ cluvfy comp clocksync -n all Verifying Clock Synchronization ...PASSED Verification of Clock Synchronization across the cluster nodes was successful. CVU operation performed: Clock Synchronization across the cluster nodes Date: Mar 3, 2018 1:14:39 AM CVU home: /u01/app/product/12.2.0/crs/ User: grid [grid@jytest2 ~]$ crsctl check ctss CRS-4701: The Cluster Time Synchronization Service is in Active mode. CRS-4702: Offset (in msec): 0 [grid@jytest2 ~]$ cluvfy comp clocksync -n all Verifying Clock Synchronization ...PASSED Verification of Clock Synchronization across the cluster nodes was successful. CVU operation performed: Clock Synchronization across the cluster nodes Date: Mar 3, 2018 1:15:14 AM CVU home: /u01/app/product/12.2.0/crs/ User: grid
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。