Pseudobolt
Dabbler
- Joined
- Apr 16, 2014
- Messages
- 17
I'm making this post in case anyone else runs into the same issue and looks for an answer in the forums -- I did a search and can't find any threads covering this issue.
You may have the following symptoms:
Error messages may appear in the syslog (you can see them at the bottom of the FreeNAS GUI):
I found this freeBSD troubleshooting guide which helped me determine the problem: the timesource chosen by the operating system is not reliable. Read the link for details -- the short summary is to run the following two commands in the console to display the timesources:
Then try changing the OS kernel time source and restarting ntpd.
Give it a little while and see if the ntpd errors stop. If not, repeat with a different timecounter until you find one that works.
(In my case, the default counter "TSC-low" and the "ACPI-fast" counter both were unreliable, but I when I used "HPET" it worked.)
Once you've found one that works, add it to the sysctls in the freeNAS GUI so that it gets set every time on startup. (Variable name is kern.timecounter.hardware, value is the name of the counter that works for you, eg 'TSC' in the example above.)
Hope this turns out to be helpful for someone down the line. :)
You may have the following symptoms:
- ntp fails to keep correct time. Running 'ntpd -q' (to set the time and exit) will set the time correctly, but over time it drifts and eventually ends up wrong, in my case by more than an hour (after a week or two).
- This in turn will cause Samba (Windows) shares to not work, as the authentication fails because the time difference between client and server is too great.
Error messages may appear in the syslog (you can see them at the bottom of the FreeNAS GUI):
ntpd[12345]: frequency error 765 PPM exceeds tolerance 500 PPM
I found this freeBSD troubleshooting guide which helped me determine the problem: the timesource chosen by the operating system is not reliable. Read the link for details -- the short summary is to run the following two commands in the console to display the timesources:
(You will probably get a different output, but something along these lines.)# dmesg | grep Timecounter
Timecounter "i8254" frequency 1193182 Hz quality 0
Timecounter "ACPI-fast" frequency 3579545 Hz quality 1000
Timecounter "TSC" frequency 2998570050 Hz quality 800
Timecounters tick every 1.000 msec
# sysctl kern.timecounter.hardware
kern.timecounter.hardware: ACPI-fast
Then try changing the OS kernel time source and restarting ntpd.
# sysctl kern.timecounter.hardware=TSC
kern.timecounter.hardware: ACPI-fast -> TSC
# service ntpd restart
Restarting ntpd...
Give it a little while and see if the ntpd errors stop. If not, repeat with a different timecounter until you find one that works.
(In my case, the default counter "TSC-low" and the "ACPI-fast" counter both were unreliable, but I when I used "HPET" it worked.)
Once you've found one that works, add it to the sysctls in the freeNAS GUI so that it gets set every time on startup. (Variable name is kern.timecounter.hardware, value is the name of the counter that works for you, eg 'TSC' in the example above.)
Hope this turns out to be helpful for someone down the line. :)