The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to expand (add more servers to cluster properly)?

Discussion in 'Bind / DNS / Nameserver Issues' started by Metro2, Nov 2, 2007.

  1. Metro2

    Metro2 Well-Known Member

    Joined:
    May 24, 2006
    Messages:
    376
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    I could really use the help and advice of someone knowledgeable who has been through the experience of growing from one server to multiple servers.

    I'm trying to expand my small hosting company by adding new servers and eventually getting rid of my oldest server which is kind of like the "master" server right now, and there are a few things that I'm very unsure about - mainly DNS. I'm hoping that someone here will take a few minutes to read about my current setup and hopefully point me in the right direction. I'll start by explaining my current setup, and then my goal, and hopefully it will make enough sense to someone here that maybe your response will make sense back to me.

    My current situation / setup:

    I have 2 dedicated servers.

    The first one, I call the "master" box, because it is basically the DNS brain plus has customer accounts on it. I have two nameservers registered for it, so it's like this:
    Hostname - mainbox.example.net
    Nameserver 1 - ns1.example.net / 123.456.789.123
    Nameserver 2 - ns2.example.net / 123.456.789.124
    RHEL 4

    The second box is just one that I've "added on" via the DNS Clustering feature in WHM. It does not have it's own nameservers, I guess it just shares the DNS Zones with the "master" box, so it's like this:
    Hostname - secondbox.example.net
    Nameservers in Basic WHM setup are set that same as they are on the "master" box.

    The main problem with this arrangement is that if "mainbox" goes down, so does "secondbox", because it relies on mainbox for DNS since I only have to nameservers registered.

    My goal:

    - I'd like to add a third and fourth box to the DNS cluster, and get rid of "mainbox" and let the new box take over it's role.

    - I'd like register more nameservers, like ns3.exmaple.net and ns4.example.net, and find a way to set things so that if one box fails, the accounts on the other box still remain live.

    Basically, I want to expand to have multiple servers all under the same company domain like example.net, with a failover DNS setup so that I can just continue to add more boxes and not have all of them go down if a "master" server goes down.

    So a few of my questions are:

    - For starters - should I register ns3.example.net and ns4.example.net and assign them two IP's from the "secondbox.example.net", OR should I make it so "mainbox.example.net" has IP's for NS1 and NS3, and then "secondbox.example.net" has NS2 and NS4?

    - When I add a third box, "thirdbox.example.net" and then DNS Cluster it through WHM on "mainbox.example.net", how can I finally safely get rid of mainbox? Would it be by registering the NS1 and NS3 to two IP's on "thirdbox.example.net" and then transferring all of the accounts from mainbox over to thirdbox, and then shutting down mainbox?

    I'm really confused as to where to go from here. I need to have at least two dedicateds running, but it's time to get rid of that original "master" or "mainbox" because it has begun to experience problems that nobody has been able to resolve at my data center.

    If anyone has taken the time to read this - thank you VERY much.

    If anyone can point me down the correct path / method for expanding to more servers and get rid of the old "main" one, I would be forever in your debt.

    I have contacted a few consultants whom I trust very much, because I would be willing to pay what I can for some help with this, but they're too booked up to help me.

    Can anyone please help me figure out the right way to go about this, so I can try to expand grow my small hosting business?

    Thank you, sincerely.
     
  2. bgardmore

    bgardmore Member

    Joined:
    Nov 20, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    I am not sure why you are running both nameservers off the same box all that means is you are pointing the 2 nameservers to the same zone files, sure its a workaround if you only have the one box but a waste when you have 2 already

    First things first - move ns2.example.com to the second server ( make sure you are running it as a dns server) that way you now have two separate nameservers running on the same cluster on 2 separate machines, make sure the cluster is set to update each others zone files so they are replicated on both machines - now you have redundancy on the DNS * see note below regarding registrar update

    Once you have a third machine in the cluster ( just add it and set it replicate the dns) and you want to get rid of "master" move all your sites on the master over on to the third server move ns1.example.com to point to the third server.

    *Only other thing to do is when pointing the nameservers to the new machines you need to update the nameservers at your registry to point to the correct ip's
     
  3. Metro2

    Metro2 Well-Known Member

    Joined:
    May 24, 2006
    Messages:
    376
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    That is definitely one of the reasons I'm doing this - for a long time I only had 1 server. Now I have 2, so I can get this redundancy in place and leave NS1 on the old box, and move NS2 to the new box.

    This is where I've run into a small issue - at my registrar, I have changed the NS2 Registered Nameserver from the seconday IP on the old box to the primary IP on the new box. However, in WHM Basic Setup when I click the "Assign IP Address" button for Secondary Nameserver to try to change it to the new IP, it says:

    "Sorry, the nameserver ns2.example.net already has the ip xx.xx.xx.xx assigned to it."
    (replacing example with my hostname and x's with the existing ip address of course)

    Thank you VERY MUCH for your response - you've confirmed for me that I'm on the right track, and just have a few kinks to work out now.
     
  4. bgardmore

    bgardmore Member

    Joined:
    Nov 20, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Go to your "master" machines WHM > Networking setup > nameserver IP's and delete ns2 if you have an A record for the nameserver delete this as well, now try and create ns2 on the secondary machine
     
  5. Metro2

    Metro2 Well-Known Member

    Joined:
    May 24, 2006
    Messages:
    376
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    USA
    cPanel Access Level:
    Root Administrator
    Thanks again for your advice!

    This is what I did, on the "master" machine:

    1. Went to WHM > Networking Setup > nameserver IP's and deleted NS2

    2. Went to DNS Functions > Edit DNS Zone > example.net and removed the NS2 A line for the old IP address.

    3. DNS Functions > Synchronize DNS Records (just in case the second box didn't automatically pick it up)

    4. Went to the second server and attempted to assign the IP and perhaps I've done something wrong, but I'm still getting the message
    "Sorry, the nameserver ns2.example.net already has the ip xx.xx.xx.xx assigned to it." It is still trying to use the old NS2 ip address from the "master" box.
     
  6. Shiboning

    Shiboning Member

    Joined:
    Sep 18, 2004
    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    1
    This thread is already a few months old; I wonder if you have solved the problem. In case other people are looking for the answer:

    You can fix this by going to WHM >> Main >> Server Configuration >> Tweak Settings and enable the "Disable whois lookups for the nameserver IP manager" option.

    This automation of CPanel has become a stumbling block.

    Sam
     

Share This Page