Introduction
A misconfigured cluster ends up writing a large number of zones to the wrong server. Once the misconfiguration has been corrected, you will want to remove the unmanaged zones from the cluster member. This article provides the steps to remove those zones.
Procedure
- Log into WHM as the ‘root’ user.
- Navigate to "Home / Clusters / DNS Cluster."
- Click the "Disable DNS Clustering" button.
- Navigate to "Home / Service Configuration / Service Manager."
- Scroll down to "DNS Server."
- Deselect the checkboxes next to the nameserver.
- Click the "Save" button.
- Access the server's command line as the 'root' user via SSH or "Terminal" in WHM.
- Backup the
/var/named
folder.tar -czf /backup/var_named.tar.gz /var/named
- Create a directory in which to temporarily store the unwanted zones.
mkdir /backup/named_unwanted_zones
- Create a list of zones that belong on the server.
cut -d ':' -f1 /etc/userdomains >> /etc/managed_domains
- Open
/etc/managed_domains
in your preferred text editor. - Remove the line with the
*
on it. - Save the changes and exit the text editor.
- Run the following command to move all the unmanaged zones out of /var/named.
for domains in $(ls /var/named/*.db | cut -d '/' -f 4 | awk 'BEGIN{FS=OFS="."}{NF--; print}' ); do if ! (grep -q $domains /etc/managed_domains); then mv /var/named/${domains}.db /backup/named_unwanted_zones/${domains}.db; fi done
- Rebuild the named configuration file.
/scripts/rebuilddnsconfig
- Log into WHM as the ‘root’ user.
- Navigate to "Home / Service Configuration / Service Manager."
- Scroll down to "DNS Server."
- Select the checkboxes next to the nameserver.
- Click the "Save" button.
- Navigate to "Home / Clusters / DNS Cluster."
- Click the "Enable DNS Clustering" button.
- Navigate to "Home / DNS Functions / Syncronize DNS Records."
- Select the "Synchronize all zones to all servers" option.
- Click the "Synchronize" button.
We recommend waiting around a week to ensure no issues with unwanted removals have occurred. Once you are sure that nothing that was needed was removed, you can delete the backup files you made to reclaim the space.
Comments
0 comments
Article is closed for comments.