{"id":1510,"date":"2022-07-04T15:24:54","date_gmt":"2022-07-04T15:24:54","guid":{"rendered":"https:\/\/pheonixsolutions.com\/knowledge-base\/?p=1510"},"modified":"2022-07-04T16:56:29","modified_gmt":"2022-07-04T16:56:29","slug":"removing-unmanaged-zones-from-a-cluster-member","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/04\/removing-unmanaged-zones-from-a-cluster-member\/","title":{"rendered":"Removing unmanaged zones from a cluster member"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction<\/h2>\n\n\n\n<p>Sometimes a misconfigured cluster ends up writing a large number of zones to the wrong server.&nbsp; This can happen if someone makes a mistake during cluster configuration. If you&#8217;ve made this error, don&#8217;t feel bad&#8211;you&#8217;re not alone! One of the more common questions we get in support regarding clusters is &#8220;How do I fix this and get the zones that are not managed on this webserver off of it?&#8221;<\/p>\n\n\n\n<p>Procedure<\/p>\n\n\n\n<p>. <strong>Make a backup of&nbsp;\/var\/named.<\/strong><br>One easy way to do this is with the following command. You&#8217;ll want to change the backup location if you use a different backup directory:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">tar -czf \/backup\/var_named.tar.gz \/var\/named\n\n<\/pre>\n\n\n\n<p>. Create a directory to keep the zones you don&#8217;t want temporarily.<br>One way to do this is with the following command:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">mkdir \/backup\/named_unwanted_zones<\/pre>\n\n\n\n<p><strong>. Create a list of zones that belong on the server.<\/strong><br>Start with the zones in&nbsp;\/etc\/userdomains&nbsp;and add any zones that must be managed by this server but are not related to user accounts. To get a list of domains from&nbsp;\/etc\/userdomains, use the following command to create a file called&nbsp;\/etc\/managed_domains.&nbsp;<em>Add your hostname and any nameservers that have their own zone files to the list.<\/em><strong>&nbsp;&nbsp;<em>Be<\/em><\/strong><em><strong>&nbsp;sure to remove the line with the * on it&#8211;it&#8217;s usually either the first or last line of the file.<\/strong><\/em><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">cut -d ':' -f1 \/etc\/userdomains &gt;&gt; \/etc\/managed_domains\n<\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Review the cluster configuration to ensure that the problem will not occur again.<\/strong><br>Reference our&nbsp;<a href=\"https:\/\/support.cpanel.net\/hc\/en-us\/articles\/360053742353\">DNS Clustering Guide<\/a>&nbsp;to ensure that you have set things up the way you need them.<\/li><li><strong>Disable DNS Clustering<br>If you do not disable DNS Clustering, you will remove domains from the cluster, resulting in sites not resolving.<\/strong><br>Navigate to&nbsp;<a href=\"https:\/\/docs.cpanel.net\/whm\/clusters\/dns-cluster\/\" target=\"_blank\" rel=\"noreferrer noopener\"><em>WHM \u00bb Clusters \u00bb DNS<\/em>&nbsp;<em>Clustering<\/em>&nbsp;<\/a>and click the button to disable clustering.&nbsp;<\/li><li><strong>Stop the nameserver and disable monitoring for it.<br>You cannot run the nameserver while you are making these manual modifications or errors will occur with DNS resolution that may be cached.&nbsp;<\/strong><br>Navigate to&nbsp;<a href=\"https:\/\/docs.cpanel.net\/whm\/service-configuration\/service-manager\/\" target=\"_blank\" rel=\"noreferrer noopener\">WHM \u00bb Service Configuration \u00bb Service Manager<\/a>&nbsp;and deselect the checkboxes next to the nameserver (either BIND\/named or PowerDNS).<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Part 2: Update<\/h3>\n\n\n\n<ol class=\"wp-block-list\"><li>Run the following command to move all the unmanaged zones (those zones that do not have domains listed in&nbsp;\/etc\/managed_zones) out of&nbsp;\/var\/named:<\/li><\/ol>\n\n\n\n<p>for domains in $(ls \/var\/named\/*.db | cut -d &#8216;\/&#8217; -f 4 | awk &#8216;BEGIN{FS=OFS=&#8221;.&#8221;}{NF&#8211;; print}&#8217; ); do if ! (grep -q $domains \/etc\/managed_domains); then mv \/var\/named\/${domains}.db \/backup\/named_unwanted_zones\/${domains}.db; fi done<\/p>\n\n\n\n<p>2. Then run the following to rebuild the named configuration file:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/scripts\/rebuilddnsconfig<\/pre>\n\n\n\n<p>Part 3: Re-activate<\/p>\n\n\n\n<p>. <strong>Review the cluster configuration<\/strong>&nbsp;one last time to be sure that it won&#8217;t write the unwanted zones back to the server.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Restart the nameserver and re-enable monitoring:<\/strong><br>Navigate to&nbsp;<a href=\"https:\/\/docs.cpanel.net\/whm\/service-configuration\/service-manager\/\" target=\"_blank\" rel=\"noreferrer noopener\">WHM \u00bb Service Configuration \u00bb Service Manager<\/a>&nbsp;and select the checkboxes next to the nameserver (either BIND\/named or PowerDNS).<\/li><li><strong>Enable DNS Clustering:<\/strong><\/li><li>Navigate to&nbsp;<a href=\"https:\/\/docs.cpanel.net\/whm\/clusters\/dns-cluster\/\" target=\"_blank\" rel=\"noreferrer noopener\"><em>WHM \u00bb Clusters \u00bb DNS<\/em>&nbsp;<em>Clustering<\/em>&nbsp;<\/a>and select the button to enable clustering.<\/li><li><strong>Resync zones to the cluster<\/strong>&nbsp;with the&nbsp;<em>Synchronize all zones to all servers<\/em>&nbsp;option in&nbsp;<a href=\"https:\/\/docs.cpanel.net\/whm\/dns-functions\/synchronize-dns-records\/\" target=\"_blank\" rel=\"noreferrer noopener\"><em>WHM \u00bb DNS Functions \u00bb Synchronize DNS Records<\/em><\/a>.<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Part 4: Cleanup<\/h3>\n\n\n\n<p>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 go ahead and delete the backup files you made to reclaim the space.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction Sometimes a misconfigured cluster ends up writing a large number of zones to the wrong server.&nbsp; This can happen if someone makes a mistake during cluster configuration. If you&#8217;ve made this error, don&#8217;t feel bad&#8211;you&#8217;re not alone! One of the more common questions we get in support regarding clusters is &#8220;How do I fix ..<\/p>\n<div class=\"clear-fix\"><\/div>\n<p><a href=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/04\/removing-unmanaged-zones-from-a-cluster-member\/\" title=\"read more...\">Read more<\/a><\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[33],"tags":[],"class_list":["post-1510","post","type-post","status-publish","format-standard","hentry","category-whm"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Removing unmanaged zones from a cluster member - PheonixSolutions Knowledge-Base<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/04\/removing-unmanaged-zones-from-a-cluster-member\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Removing unmanaged zones from a cluster member - PheonixSolutions Knowledge-Base\" \/>\n<meta property=\"og:description\" content=\"Introduction Sometimes a misconfigured cluster ends up writing a large number of zones to the wrong server.&nbsp; This can happen if someone makes a mistake during cluster configuration. If you&#8217;ve made this error, don&#8217;t feel bad&#8211;you&#8217;re not alone! One of the more common questions we get in support regarding clusters is &#8220;How do I fix ..Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/04\/removing-unmanaged-zones-from-a-cluster-member\/\" \/>\n<meta property=\"og:site_name\" content=\"PheonixSolutions Knowledge-Base\" \/>\n<meta property=\"article:published_time\" content=\"2022-07-04T15:24:54+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-07-04T16:56:29+00:00\" \/>\n<meta name=\"author\" content=\"vijender\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"vijender\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/04\\\/removing-unmanaged-zones-from-a-cluster-member\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/04\\\/removing-unmanaged-zones-from-a-cluster-member\\\/\"},\"author\":{\"name\":\"vijender\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/7e483f3adf4e0c18f959adcaf9ea3f3d\"},\"headline\":\"Removing unmanaged zones from a cluster member\",\"datePublished\":\"2022-07-04T15:24:54+00:00\",\"dateModified\":\"2022-07-04T16:56:29+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/04\\\/removing-unmanaged-zones-from-a-cluster-member\\\/\"},\"wordCount\":580,\"commentCount\":0,\"articleSection\":[\"WHM\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/04\\\/removing-unmanaged-zones-from-a-cluster-member\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/04\\\/removing-unmanaged-zones-from-a-cluster-member\\\/\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/04\\\/removing-unmanaged-zones-from-a-cluster-member\\\/\",\"name\":\"Removing unmanaged zones from a cluster member - PheonixSolutions Knowledge-Base\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#website\"},\"datePublished\":\"2022-07-04T15:24:54+00:00\",\"dateModified\":\"2022-07-04T16:56:29+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/7e483f3adf4e0c18f959adcaf9ea3f3d\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/04\\\/removing-unmanaged-zones-from-a-cluster-member\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/04\\\/removing-unmanaged-zones-from-a-cluster-member\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/2022\\\/07\\\/04\\\/removing-unmanaged-zones-from-a-cluster-member\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Removing unmanaged zones from a cluster member\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#website\",\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/\",\"name\":\"PheonixSolutions Knowledge-Base\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/#\\\/schema\\\/person\\\/7e483f3adf4e0c18f959adcaf9ea3f3d\",\"name\":\"vijender\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g\",\"caption\":\"vijender\"},\"url\":\"https:\\\/\\\/pheonixsolutions.com\\\/knowledge-base\\\/author\\\/vijender\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Removing unmanaged zones from a cluster member - PheonixSolutions Knowledge-Base","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/04\/removing-unmanaged-zones-from-a-cluster-member\/","og_locale":"en_US","og_type":"article","og_title":"Removing unmanaged zones from a cluster member - PheonixSolutions Knowledge-Base","og_description":"Introduction Sometimes a misconfigured cluster ends up writing a large number of zones to the wrong server.&nbsp; This can happen if someone makes a mistake during cluster configuration. If you&#8217;ve made this error, don&#8217;t feel bad&#8211;you&#8217;re not alone! One of the more common questions we get in support regarding clusters is &#8220;How do I fix ..Read more","og_url":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/04\/removing-unmanaged-zones-from-a-cluster-member\/","og_site_name":"PheonixSolutions Knowledge-Base","article_published_time":"2022-07-04T15:24:54+00:00","article_modified_time":"2022-07-04T16:56:29+00:00","author":"vijender","twitter_card":"summary_large_image","twitter_misc":{"Written by":"vijender","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/04\/removing-unmanaged-zones-from-a-cluster-member\/#article","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/04\/removing-unmanaged-zones-from-a-cluster-member\/"},"author":{"name":"vijender","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/7e483f3adf4e0c18f959adcaf9ea3f3d"},"headline":"Removing unmanaged zones from a cluster member","datePublished":"2022-07-04T15:24:54+00:00","dateModified":"2022-07-04T16:56:29+00:00","mainEntityOfPage":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/04\/removing-unmanaged-zones-from-a-cluster-member\/"},"wordCount":580,"commentCount":0,"articleSection":["WHM"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/04\/removing-unmanaged-zones-from-a-cluster-member\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/04\/removing-unmanaged-zones-from-a-cluster-member\/","url":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/04\/removing-unmanaged-zones-from-a-cluster-member\/","name":"Removing unmanaged zones from a cluster member - PheonixSolutions Knowledge-Base","isPartOf":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#website"},"datePublished":"2022-07-04T15:24:54+00:00","dateModified":"2022-07-04T16:56:29+00:00","author":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/7e483f3adf4e0c18f959adcaf9ea3f3d"},"breadcrumb":{"@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/04\/removing-unmanaged-zones-from-a-cluster-member\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/04\/removing-unmanaged-zones-from-a-cluster-member\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/2022\/07\/04\/removing-unmanaged-zones-from-a-cluster-member\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/pheonixsolutions.com\/knowledge-base\/"},{"@type":"ListItem","position":2,"name":"Removing unmanaged zones from a cluster member"}]},{"@type":"WebSite","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#website","url":"https:\/\/pheonixsolutions.com\/knowledge-base\/","name":"PheonixSolutions Knowledge-Base","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/pheonixsolutions.com\/knowledge-base\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/pheonixsolutions.com\/knowledge-base\/#\/schema\/person\/7e483f3adf4e0c18f959adcaf9ea3f3d","name":"vijender","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/29c5aebbdf439bbeaeea52d1cf1a0166768889fd6238deb28b6851eebb2cfb32?s=96&d=mm&r=g","caption":"vijender"},"url":"https:\/\/pheonixsolutions.com\/knowledge-base\/author\/vijender\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/1510","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/comments?post=1510"}],"version-history":[{"count":3,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/1510\/revisions"}],"predecessor-version":[{"id":1513,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/posts\/1510\/revisions\/1513"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/media?parent=1510"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/categories?post=1510"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/knowledge-base\/wp-json\/wp\/v2\/tags?post=1510"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}