Once in a life time we might have to change the NTP servers associated with our Exadata systems. The Exadata servers run Linux and like any other Linux system the change is pretty much the same considering you are not yet running the Exadata image 19.x or higher since it comes with Oracle Enterprise Linux 7.x which uses chronyd instead of ntpd. So the procedure presented here is for any Exadata running 18.x image or lower and applies to OEL 6.x. for the ntpd service.
Even though I'm presenting here how to change the NTP configuration, you can use the same approach for basically any file you might have to change on all nodes of your Exadata system.
When we are working with Exadata it is nice (but not secure) to have passwordless SSH configured to enable us to run commands in parallel on all nodes without prompting for password for each node. We can test if passwordless SSH is configured just by using dcli to open a SSH connection to each node of our all_group file:
all_group file contains one row for every node we have in our Exadata system, in my case here it is an Elastic Rack:
- 15 Storage Servers
- 6 Database Servers
- 3 Infiniband Switches
Saying that the hostname command executed worked well we are ready to move forward and validate the current NTP configuration by querying the configured NTP servers from the ntp.conf file on all nodes:
We have identified the rows we have to change in the file. Before performing any change let's test if the current and new NTP servers are responding from these Exadata nodes using the command:
Considering everything is working as expected we can now backup the ntp.conf file in case we need to rollback our change:
OK, we are finally ready to change the NTP configuration. We are using sed here to ease our life so we don't need to go to any text editor like vim to open the ntp.conf file on each node. It is up to you how you prefer performing this change. I always validate my syntax with a test text file before running the command with the production file. To change only the string we need on all ntp.conf files on all nodes in parallel we can use this command:
The change is done and now we should validate if it worked. First let's see if the file was changed properly:
Now we can once again test the new NTP server to make sure it continues working as expected:
Everything being ready we just need to restart the ntpd service on all nodes for the change to take effect and to enable ntpd to reread the ntp.conf file and use the new server specified:
That is it. NTP server changed. It was easy and smooth to change the NTP server in 24 servers at the same time.
I hope you liked it and learned some tricks, even though this one was pretty straightforward.
Have a good one,