1827593 Members
2790 Online
109965 Solutions
New Discussion

MC/SG, NTP and "date -a"

 
SOLVED
Go to solution
Abhik Sarkar_1
Occasional Advisor

MC/SG, NTP and "date -a"

We have a couple of L2000 servers in a SG cluster.
* The servers run Oracle (containing mostly static configuration data)
* They also run mission critical telecoms application.
* The servers have NTP configured, with each machine setup as the other's peer.
* The machines are load-sharing and not active-standby.

The time on the machines happens to about 12 minutes ahead of the actual time. I want to know if there is any way in which I can change the time backwards safely without bringing down both systems together (and hence causing a service outage).

I tried issuing a "date -a" on one of the machines expecting the other to sync, but it didn't seem to have any effect. I wonder if it has anything to do with the setting up of the machine as NTP peers.

Any help will be greatly appeciated.

Many thanks,
Abhik.
10 REPLIES 10
Bernhard Mueller
Honored Contributor

Re: MC/SG, NTP and "date -a"

Abhik,

run the same "date -a -60" command on all your NTP peers at about the same time (e.g.via cron or at)

Then verify that all are only 11 minutes ahead. Then either use a larger number or repeat the cronjob a couple of times.

Regards,
Bernhard
V.Tamilvanan
Honored Contributor

Re: MC/SG, NTP and "date -a"

Hi,

1.Disable the ntp daemon on both the server.
2. Issue date -a command on both the servers.
3. Check after a day or two whether both the servers time are sync with the actual time. then enable the ntp daemon.
Abhik Sarkar_1
Occasional Advisor

Re: MC/SG, NTP and "date -a"

Hi,

Thanks for your replies.

Tamil, I have thought of your idea before, but I wonder if SG has somekind of dependency on NTP. Is it OK to disable NTP on a SG cluster?

Thanks,
Abhik.
V.Tamilvanan
Honored Contributor

Re: MC/SG, NTP and "date -a"

Hi Abhik,

It is OK. No problem.
Robert-Jan Goossens
Honored Contributor

Re: MC/SG, NTP and "date -a"

Hi Abhik,

No there is no problem disableling ntp on a service guard cluster for a period to sync the time ( using date -a As Bernard and Tamil suggested).

HTH,
Robert-Jan
Abhik Sarkar_1
Occasional Advisor

Re: MC/SG, NTP and "date -a"

Thanks everyone.

I will try the following on the live servers and let you know the result:

* Disable NTP on both nodes.
* Add the cron jobs on both nodes
* Check after a few hours if the time has synced with the actual time.
* Re-start NTP on both nodes.

Best regards,
Abhik.
Tim Howell
Frequent Advisor

Re: MC/SG, NTP and "date -a"

!!! I would check with Oracle before running the time backwards with an instance up!!! Especially if you are running in Online Archive mode...

if only we knew...
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: MC/SG, NTP and "date -a"

data -a is the correct command to use but it will take quite a while to make up this difference. Date -a is perfecrtly safe to use
even with databases because it doesn't actually set time backwards. It allows the local clock to "tick" more slowly until the real world "catches up". Time continutes to march forward so that all database timestamps while not necessarily accurate are logically consistant. You are too far out of sync at the moment for NTP to operate.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: MC/SG, NTP and "date -a"

date -a is the correct command to use but it will take quite a while to make up this difference. Date -a is perfecrtly safe to use
even with databases because it doesn't actually set time backwards. It allows the local clock to "tick" more slowly until the real world "catches up". Time continutes to march forward so that all database timestamps while not necessarily accurate are logically consistant. You are too far out of sync at the moment for NTP to operate.
If it ain't broke, I can fix that.
Abhik Sarkar_1
Occasional Advisor

Re: MC/SG, NTP and "date -a"

Hi everyone,

Thanks for your answers and comments. Though I am still waiting for the customer's final confirmation that the time is OK, I checked this morning and I think that it's fine.

Thanks again,
Abhik.