1

I have installed and configured DRBD on my Ubuntu 9.10 Servers, by following the links below.

link text1 and link text2

I'm in a plan to configure Ubuntu Servers for High Availability, so i have tested DRBD working and it's fine as per the links i referred. But my major requirement is I could get other server into production if the main server gets down/corrupted. Is it possible to configure DRBD so that any changes made on primary server to '/' are replicated to secondary server?.

EDIT:

Dear Experts:

I have a Ubuntu server which hosts apache, tomcat, mysql, ldap and so on. I don't know how to say... like if this server gets corrupted or malfunctions I should immediately get another system with same databases applications, services, files and directories (just like a clone) into working. I wondering if there is something like primary and secondary which replicate (entire system) each other and if in case the primary server fails I can immediately come up with the secondary.

I'm not only talking about DRBD it might be any third party tool that meets my entire requirement. I have to do this by the time assigned to me. Somehow you try to understand what I'm in need of and put an end to this

Thank you!

2 Answers 2

3

Replicating the entire system in a high-availability scenario is probably not a good idea, for two reasons:

  1. There are a few configuration parameters that are unique to each server: for example, the hostname and IP address, possibly the mapping of DRBD devices to disks. Setting the system up so that it can choose the correct configuration based on some "environmental" parameter (e.g., CPU serial number) is definitely more trouble than it's worth.

  2. One of the advantages that High-availability setups give you, is the ability to do system upgrades without service downtime: you upgrade the "backup" system, test that it works, exchange the "primary" and "backup" roles, upgrade the former primary system. If something goes bad, you still have at least one system up and running. Setting up an automated entire system replication voids this procedure: if you upgrade one system, the other gets upgraded too: you likely cannot do that while the service is running, and you loose the "disaster-recovery" feature.

That said, it is possible to replicate exactly the parts of the system you need to have a "hot spare" for the production systems, ready to kick in in case the primary server goes down.

The exact details of how you do this depend on the service you want to run (www? mysql? nfs?), but the general idea is: replicate configuration and mutable data. For example, assuming you want to have an highly-available NFS server, you can proceed like the following (on both servers):

  1. Set up a replicated DRBD disk and mount it on /nfs on both servers (primary and backup).

  2. Create directories /nfs/etc and /nfs/data

  3. Symlink /etc/export to /nfs/etc/export and make it export the /nfs/data filesystem to clients.

  4. Have the NFS service managed by heartbeat, instead of by the system init/upstart daemon, so that it goes up and down according to the server role (primary or backup) and the availability of the DRBD disk.

This is rather sketchy, but should be enough to get you started.

4
  • Good answer!. Any more suggestion? please...
    – user3215
    Oct 25, 2010 at 10:56
  • @user3215 What applications/services do you want to run in a HA setup? Knowing more about your specific case would get you more specific advice :-) (Consider asking a new question for each app/service.) Oct 25, 2010 at 12:00
  • I have servers hosting apache, tomcat, mysql, ldap... services.
    – user3215
    Oct 25, 2010 at 13:34
  • I've updated my question
    – user3215
    Oct 25, 2010 at 16:22
1

You may consider combining drdb with virtualization. More info can be found here.

For example, you can create a xen VM that uses a drbd backed disk.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .