Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a small LAN that has no connection to the internet. It consists of two ubuntu servers clustered together providing NFS services to two IP cameras.

I need to synchronize the time on all the equipment. The Cameras support NTP so my plan was to run NTP on the server cluster.

Can I configure NTPD to just use the system time until this project gets funding to add a 3G/4G connection?

This is actually going to be harder than I thought. I'm running a heartbeat cluster with DRBD. I'm going to need to have my primary server provide NTP to the two IP cameras and the other server in the cluster. If my primary server fails I need the secondary server to take over the NTP time server.

What do you guys suggest I do here??

share|improve this question

3 Answers 3

up vote 7 down vote accepted

Your best-bet is to create a time cluster. A set of three (or more) systems, configured with peer associations. The cluster will negotiate a common consensus of time and should defend against clock-drift on all of them. It won't be truly accurate, for that you'll need a radio clock like you already know.

peer 192.168.62.4
peer 192.168.62.12
share|improve this answer
1  
I just found a section in my book that says I can reference the local hardware clock. I would add the line "server 127.127.1.1" in the ntp.conf file. I'll take what you said into consideration though! –  Matthew Oct 22 '12 at 16:33
1  
@Matthew You'll need to do that to get reference clocks on each, but having three in a peer-group should help keep clock drift from getting too far out of true. –  sysadmin1138 Oct 22 '12 at 16:49
6  
Actually I'd say the best bet is to buy a cheap GPS and set up a proper NTP service using that as a reference. This would be the second best (and cheaper) option :-) –  voretaq7 Oct 22 '12 at 16:54
    
You may prefer to pick one clock and set that as a lower stratum than the others. Otherwise, each machine may just prefer its own clock and no actual synchronization will take place. –  David Schwartz Oct 22 '12 at 18:03
    
Voretaq I completely agree, but my boss is serious about this budget. Soon one of our IP cameras will have a GPS and I can use that camera as a NTP server. It's not very redundant but it will make them happy. anyway I'll make sure of that sysadmin1138! –  Matthew Oct 22 '12 at 19:08

If you're offline but want actual time, connecting any run-of-the-mill GPS receiver to your systems will keep time synched to within a second. You'll notice a relatively high jitter, but you'll keep regular time.

For some effort on your part, acquiring a GPS with a pulse-per-second feature will provide fantastic time keeping. In particular, the Garmin 18x LVC can be purchased for under $65. For the effort of giving it a 5 volt power supply and a serial port on the bare wires, you can have an accurate time keeping system for a very low impact on the budget.

There are plenty of tutorials on this subject if you search for "Garmin 18x NTP" or some other variation.

share|improve this answer
    
I know about the GPS but its not a option right now. –  Matthew Oct 22 '12 at 21:37

To add to all the above check out http://css-timemachines.com/ - they have a $299 minimum features NTP server. If you add that to the peering suggestion above you would have to spend a whole pile of money to get only a fraction better!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.