LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-21-2024, 05:06 PM   #1
james000
Member
 
Registered: Sep 2018
Posts: 151

Rep: Reputation: 2
Migration plan for DNS server


Hi,

I have 4 Linux servers and all of them are running :
- NTP service configured on /etc/ntp.conf
- DNS forwarding configured on /etc/named.conf (not actual DNS server)
- Postfix mail relay service /etc/postfix/main.cf (not mail server)
There are over 1000 VMs, which are using these servers for mentioned services. These are old Linux server and I want to decommission them and create new VM with same hostname and IPs and configuration.
I am not concerned about NTP and Mail relay, because those service will not be impacted while I will be doing cut-over from old server to new server. I am concerned about DNS service. By default, if any query comes from client, it will check from first DNS server mentioned in /etc/resolv.conf and then it will fail, without going to next server in sequence.
One option I can think is, I can use DNS service. Here is high level I can think :
- Create CNAME entry pointing from server1 to server2 and remove server1 DNS records. Now if any client tries to send query to server1, it will go to server2
- Power-off server1
- Power-on new server1 and retain same IP and hostname as original/old server
- Once server is online and remove CNAME DNS entry and re-create DNS records as original one. As soon as maps will push, CNAME will go away and queries will redirect to new server-1 again.
- Once all three services are validated, repeat same steps with server-2, server-3 and server-4.

Now one complication is, if /etc/resolv.conf is having FQDN, above will work with CNAME creation. Some of the clients may have just IP address of DNS in their /etc/resolv.conf. How can I deal with that ?

Please advice, if I am on correct theoretically, or I am missing something.

Thanks

Last edited by james000; 05-21-2024 at 05:19 PM.
 
Old 05-22-2024, 05:36 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,487

Rep: Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557Reputation: 1557
Quote:
Originally Posted by james000 View Post
I am concerned about DNS service. By default, if any query comes from client, it will check from first DNS server mentioned in /etc/resolv.conf and then it will fail, without going to next server in sequence.
By default the resolver should try the second entry in resolv.conf have you verified your unusual behavior with test VMs?

If it was me, my approach would be to build the new DNS server as "#3" on a different IP address. Then TEST THE HELL OUT OF IT!

I'm guessing you never implemented a configuration management solution, like Puppet or Salt. If you did, then use it to change the resolvers of your test group of VMS to use #3 and check the results.

If you haven't a config management tool (and with "1000 VMs" why not?) then pick a handful of your 1000 VMs where you've decent access to them and point them at #3 and check the results.

When you're happy that #3 is working the way you hoped then shut down #1 and give #3 the #1 IP address as a primary IP with the #3 IP address as an alias.

Then remove the old #3 IP address from your testing VMs and replace it with the original #1 IP.
 
Old 05-22-2024, 06:37 AM   #3
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,844

Rep: Reputation: 1222Reputation: 1222Reputation: 1222Reputation: 1222Reputation: 1222Reputation: 1222Reputation: 1222Reputation: 1222Reputation: 1222
Yes, moving to new IP adresses is more work but without any disturbance.

If you want to keep IP addresses then I would just shutdown/start, one server at a time. Not bothering with temporary CNAME. And announce a disturbance.
But I would rely on the second entry in the resolv.conf, then the disturbance is just a time-out. It must continue with the second entry!
 
Old 05-23-2024, 12:46 AM   #4
james000
Member
 
Registered: Sep 2018
Posts: 151

Original Poster
Rep: Reputation: 2
If I move DNS forwarding service to new VM, with new IP/hostname, I will have to update /etc/resolv.conf of ALL clients. Yes, using ansible is one way to achieve.

That is how, I migrated non-prod environment. And now this is production. Management is asking, if there is any way, we don't have to see any resolution failure with no downtime? I am assuming, during cut-over of those 10 minutes, when I will swap hostname/IP, some applications or URLs may send query and it will query first server in /etc/resolv.conf, and resolution will fail. Is my expectation correct ? If that is only best way, then I can say, "there will be some resolution failure for few minutes".

Alternatively one way I can think is, I can unplumb IP from DNS server-1 and plumb it on DNS server-2. Then all queries will hit second server and I can work on first server. Can work this way ? There will be little downtime when I do ifdown and ifup, but less than other method.
 
Old 05-23-2024, 07:03 AM   #5
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 2,844

Rep: Reputation: 1222Reputation: 1222Reputation: 1222Reputation: 1222Reputation: 1222Reputation: 1222Reputation: 1222Reputation: 1222Reputation: 1222
The off/on method on the same IP is most simple.
LAN switches and switching routers cache the layer 2 addresses, that should be less than a minute.
Nothing to be changed on the clients, no risk of a deadlock (like not working ansible due to dns failure).
 
1 members found this post helpful.
  


Reply

Tags
dns, linux



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the difference between Reseller Plan hosting and WordPress Hosting Plan ? morning-tea Linux - General 15 03-02-2021 06:19 PM
Back up plan for san migration. lvmconvert--2 leg scenario. PoleStar Linux - Newbie 1 03-06-2015 09:19 AM
LXer: Tamil Nadu's XP migration plan: Go Linux like a BOSS LXer Syndicated Linux News 0 04-04-2014 07:20 AM
LXer: Migration Needs a Plan LXer Syndicated Linux News 0 04-10-2013 12:21 PM
swop out hard disk migration plan baird LinuxQuestions.org Member Success Stories 2 04-30-2007 10:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration