oda 版本小于 19.10 使用 NTP
# 使用 root 用户登录 # 编辑配置文件 vi /etc/ntp.conf server <ip of ntp1> prefer server <ip of ntp2> # 重启 ntp 服务 systemctl stop ntpd Use "-q" for the test as it only queries the time systemctl start ntpd systemctl status ntpd # 检查 ntp 运行情况 ntpdate -q <ip of ntp1> server 206.223.27.1, stratum 3, offset 0.007801, delay 0.02850 30 Jul 16:41:28 ntpdate[77304]: adjust time server 206.223.27.1 offset 0.007801 sec
oda 版本大于 19.11 使用 Chrony
# 使用 root 用户登录 # 编辑配置文件 vi /etc/chrony.conf server <ip of ntp1> iburst server <ip of ntp2> iburst driftfile /var/lib/chrony/drift makestep 1.0 -1 rtcsync logdir /var/log/chrony # 重启服务 systemctl restart chronyd systemctl status chronyd # 检查同步情况 chronyc sources -v
查看时间同步运行情况
timedatectl
查看集群时间同步状态
crsctl check ctss CRS-4700: The Cluster Time Synchronization Service is in Observer mode.
刷新oda信息
odacli update-registry -n system -f odacli describe-system