今天一时兴起测试了下当两个节点时间不同步时RAC节点的反应,于是产生了下面的疑惑:
1、修改节点1的时间:
date -s 2013/12/19
hwclock -w
[root@RAC01 bin]# date
Thu Dec 19 00:22:58 CST 2013
[root@RAC01 bin]# clock
Thu 19 Dec 2013 12:23:02 AM CST -0.914656 seconds
[root@RAC01 bin]#
2、节点2的时间没有变化
[root@RAC02 bin]# date
Thu Jan 23 16:37:12 CST 2014
[root@RAC02 bin]# clock
Thu 23 Jan 2014 04:36:41 PM CST -0.445307 seconds
[root@RAC02 bin]#
3、登录数据库查看数据库时间:
在节点1上为:
SQL> select systimestamp from dual;
SYSTIMESTAMP
---------------------------------------------------------------------------
19-DEC-13 12.24.29.056730 AM +08:00
SQL>
节点2上为:
SQL> select systimestamp from dual;
SYSTIMESTAMP
---------------------------------------------------------------------------
23-JAN-14 04.39.00.896250 PM +08:00
SQL>
3、在节点1上创建表:
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
RACwh1
SQL> create table xxx as select * from scott.dept;
Table created.
4、在节点2上查询表xxx:
SQL> select instance_name from v$instance;
INSTANCE_NAME
----------------
RACwh2
SQL> select * from xxx;
DEPTNO DNAME LOC
---------- -------------- -------------
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
疑问1:通过上述情况发现当服务器的时间不一致时,两个节点貌似完好无损???
5、查看节点的ntp服务及ctss状态:
节点1:[root@RAC01 bin]# service ntpd status
ntpd is stopped
[grid@RAC01 ~]$ crsctl check ctss
CRS-4700: The Cluster Time Synchronization Service is in Observer mode.
节点2:[root@RAC02 bin]# service ntpd status
ntpd is stopped
[grid@RAC02 ~]$ crsctl check ctss
CRS-4700: The Cluster Time Synchronization Service is in Observer mode.
疑问2:通过上面的测试,感到比较困惑,为何节点都正常运行,而不是某个节点重启或者数据库、crs等重启呢?ctss在ntp不运行的情况下为何不自动转换为Active mode呢??