dns cluster out of sync / zones missing

mike25

Well-Known Member
Aug 29, 2003
83
0
156
Raleigh NC, USA
I have been moving domains to a new server for a few days. I have setup clustering and everything seemed well. I moved the old IP addresses for the name servers over to the new server only to discover that the DNS records for domains located elsewhere in the cluster where now not resolving correctly from the new server. All account that had been moved were resolving fine. I had synced all records correctly. the entires for the domains were in the /etc/named.conf and the zone records were present in the /var/named/ directory. terminating and then recreating the dns zone on the new server would correct the problem, but that was to time consuming for thousands of zones. after a close inspection it seemed that the zone files were missing from the /var/named/chroot/var/named/ directory. copying all of the missing zones to from /var/named to /var/named/chroot/var/named corrected the issue, there were about 2000 zones missing. Does any one know what would cause this to happen? Why are there two seperate locations for db files to begin with? shouldnt this all be in one central location?
 

freedman

Well-Known Member
Feb 13, 2005
314
5
168
I have been moving domains to a new server for a few days. I have setup clustering and everything seemed well. I moved the old IP addresses for the name servers over to the new server only to discover that the DNS records for domains located elsewhere in the cluster where now not resolving correctly from the new server. All account that had been moved were resolving fine. I had synced all records correctly. the entires for the domains were in the /etc/named.conf and the zone records were present in the /var/named/ directory. terminating and then recreating the dns zone on the new server would correct the problem, but that was to time consuming for thousands of zones. after a close inspection it seemed that the zone files were missing from the /var/named/chroot/var/named/ directory. copying all of the missing zones to from /var/named to /var/named/chroot/var/named corrected the issue, there were about 2000 zones missing. Does any one know what would cause this to happen? Why are there two seperate locations for db files to begin with? shouldnt this all be in one central location?
most likely the serial numbers for the new entries aren't newer than the old ones.. you may have to update them manually
the .db files in /var/named should start with something like this:

; cPanel 10
; Zone file for sfaddiction.com
$TTL 14400
@ 86400 IN SOA ns1.ROOTNAMESERVER.com. PERSON.DOMAIN.com. (
2007012900 ; serial, todays date+todays
86400 ; refresh, seconds
7200 ; retry, seconds
3600000 ; expire, seconds
86400 ) ; minimum, seconds


the serial number is the critical piece.. go with the convention YYYMMDDxx and increment xx.. that way when it's edited in cpanel later, when they update the date, it'll all work fine.