DA high availabity failover cluster - ideas please?

danellison

Verified User
Joined
Jul 18, 2007
Messages
14
Location
southern Illinois
Greetings all. I am working with a pair of dual xeon dell 2850 servers running centos-5.5. These machines are clustered using DRBD dual primary for digital block replication and the centos cluster suite (openais, cman, clvmd, gfs2 and rgmanager.) I have a failover domain defined with an IP address and a group for directadmin services.

I do not run the DA startips script, instead I let the cluster manager control the failover IP and only run DA on the machine that is presently the "master" in the cluster. I want ALL resellers to share this failover IP address. Each machine has its own DA license. I am sharing a common gfs2 filesystem mounted on /usr/local/directadmin.

My /usr/local/directadmin/conf directory is a symlink to /etc/directadminconf which contains the appropriate licensing for each individual machine. I have modified the directadmin startup script to run the ipswap.sh script prior to starting the directadmin services so that no matter which machine is acting as master the DA panel shows the right IPs (its own IP and the failover IP that I want to share.)

After running the ipswap.sh script I do indeed see the right IP in the admin level IP Management screen regardless of which machine is acting as master. However, instead of listing the licensed IP as "server" it simply shows a status of "free." Is there a command line way to set this IP as "server" instead of "free"?

There are many "gotchas" involved in this process I think. I need a little guidance to help get past them. Surely this is doable. Anybody have any inisight? Your ideas greatly appreciated.

I will try to write up a summary of how I pulled this all off when completed in case any of the rest of you might have need for such a configuration.

Until then, thanks in advance.

Dan
 
After running the ipswap.sh script I do indeed see the right IP in the admin level IP Management screen regardless of which machine is acting as master. However, instead of listing the licensed IP as "server" it simply shows a status of "free." Is there a command line way to set this IP as "server" instead of "free"?

You can do it in shell.
 
And just how do I do it from the shell?

Could you give me the details please on how to do this from the shell? I am making the assignment from the shell already so if I can figure out what the command is I have no problem making that change. I just don't know what the shell command is :confused:

Thanks again,
Dan
 
cd /usr/local/directadmin/data/admin/ips

edit the IP you want from

Code:
status=free

to

Code:
status=server
 
[SOLVED] That'll work

Thanks again. I was looking for a way to do it with the DA API I guess. I always try not to modify DA files directly. However, in this case your suggestion works perfectly. I now have status=server with the right IP regardless of which box is acting as the master and actually running DA.

You're the MAN!

Dan
 
I think i missunderstood something here.

You using two directadmin box for host same domain using 2 different ip if i understood well..

My question is, how do you do with dns? I mean, if server.com point to 192.168.0.1 (examples ips ofc) into dns and that server crash the dns should now be pointed to 192.168.0.2 but this will take a bit of time..

So, both server have the same external ip that "show-up" just when the "current-master" crash?

Well, a configuration guide should be appreciated, i would learn how do that aswell :)

Regards
 
how's this progressing, i was trying to setup something like this years ago and gave up and just used a single box at a time system which works with 99.9% uptime over 5-10 years of use.

i think an easier way would be to use a 3 server setup with the main server directing traffic to one of two or more live directadmin servers that have the same data replicated... exactly how i never got into because it seemed more work that it was worth... but having a DA failover system/cluster is what i want! it would be nice it it was more or less plug-n-play, however and think its something that we wold all pay for (attention DirectAdmin)...
 
Thanks again. I was looking for a way to do it with the DA API I guess. I always try not to modify DA files directly. However, in this case your suggestion works perfectly. I now have status=server with the right IP regardless of which box is acting as the master and actually running DA.
The API replicates control panel functionality; it doesn't replicate functionality you perform from the shell.

Jeff
 
My question is, how do you do with dns? I mean, if server.com point to 192.168.0.1 (examples ips ofc) into dns and that server crash the dns should now be pointed to 192.168.0.2 but this will take a bit of time..
One way of doing this is to run DNS only on the first box; leave it turned off on the second box, until the first box fails. Then list both box's DNS as the only nameservers for the domain(s).

Jeff
 
Back
Top