[ntp:questions] ntpd and database servers

Richard B. Gilbert rgilbert88 at comcast.net
Thu Jan 14 22:37:47 UTC 2010


nodata wrote:
> Hello,
> 
> I have had two problems recently that I was unable to solve properly, so 
> I am turning to the list to help.
> 
> I had two database servers where the clock was wrong, by a couple of 
> hours (too fast). On the first server, ntpd was running but refusing to 
> sync the clock because of the time difference. On the second server, 
> ntpd was not running.
> 
> These database servers can be stopped quarterly. For data integrity 
> purposes the clock must not jump backwards. It's more important that the 
> database server is up and running that if the timestamps are off by a 
> couple of hours.
> 
> Which brings me to my problem: once this problem came to our attention, 
> we wanted to fix it, slowing the system clock until time caught up. It 
> wouldn't matter if this took a few weeks.
> 
> What is the correct way of solving this? Both on the first server with 
> ntpd running but out of sync and refusing to update, and on the second 
> server where ntpd was not running (and I want to avoid a sync on start, 
> and then avoid the same problem as the first server).
> 
> Hope someone can offer their advice for this situation and question.
> 
> 
> 
> 
> Note: (sorry to be rude) I'm not looking for an answer which is "plan 
> downtime", or "except the risk of a clock jumping backwards". Thanks.

NTP can, at most, correct your clock at the rate of 43 seconds per day!
It WILL take quite a while to correct a two hour error.  If you can't 
schedule down time to get your clocks straightened out you will have to 
live with it for a while.  How long it will take is left as an exercise 
for the student! ;-)

Once you have them set to the correct time, NTPD should be able to 
maintain the correct time, which it will do by slightly adjusting the 
"size" of the ticks.  Assuming that your clock is not in error by more 
than about 100 parts per million, NTPD will keep your clock in synch 
with UTC (formerly known as GMT).  Most operating systems will allow you 
to instruct your computer to display the time in your local timezone if 
you wish.




More information about the questions mailing list