High Availability DB-Server

Discussion in 'Server Operation' started by TheTank, Dec 12, 2009.

  1. TheTank

    TheTank New Member

    Hello everyone.

    I was wondering if someone could help me out with a requirement for a High Availability DB-Server.

    I had looked at the DBs built in replication systems but they were just for the DB contents. Everything else around it would need extra effort.

    While I had also thought about using virtualization (we also use VBox, but not for HA) the HA requirement would mean the server could only be alive on one machine in the cluster, and if that one fails, pop up (with as little loss as possible) on another one.

    The idea being
    * if a customer only wants one machine: install the image directly on the host.
    * if a customer wants a HA system, use a virtualized setup with a floating server (if that will even work)

    The thing is:
    a) I was deemed 'the expert' (because they could not find anyone else) to do this but my knowledge is really limited.
    b) to somehow have a HA system that is easily installable at a customers location by a 'service engineer' (some setup steps could be automated but in general, the easier the better).

    A colleague of my suggested KVM would be just the tool for it, but I have yet to figure out how to get it to magically appear on cluster node 2 if the 1st fails (I am using proxmox based on the howto)
    Also Xen was named to have this feature.

    I have looked at the HowTos (excellent work btw!) but am unsure what I really need and what not.
    Why do I need DRBD f.i.?

    thanks in advance!
     
    Last edited: Mar 19, 2010
  2. TheTank

    TheTank New Member

    Just in case anyone is interested, here is an update.

    I have looked into using Debian Lenny, Proxmox, KVM, DRBD and Corosync to allow hot-standby of our systems and have a POC running.
    This will be a 2-node setup.

    Concept:
    We create a partition that will be replicated via DRBD.
    Into this we persist our KVM VMs
    Heartbeat manages the master/slave setup and starts/stops the VM via a script

    On the master node we
    1. mount the partition
    2. copy over the KVM configs (it expects it in a certain place)
    3. elevate this node to master for Proxmox
    4. add the mounted partition as a resource to Proxmox
    5. start the VM

    on the slave exactly the opposite (if it is still running)

    Proxmox:
    A nice environment with an installer CD and Web UI. It does offer many features out of he box such as migration of VMs, clustering servers and such.

    Problem is, in our case we cannot use the CD so I had to revert to installing it manually and then step-by-step building up the system.

    Problem 2: Proxmox does not directly support what we intend on doing.

    Really rough overview of the steps:
    1. Install & configure Debain Lenny amd64
    2. Install and configure psmisc samba ntp ssh
    3. configure network & hosts file using static IP's
    4. Update the repository list for DRBD & Corosnyc (formerly Pacemaker) & PVE
    5. install the PVE kernel (pve-kernel-2.6.32) and configure your boot menu
    6. installing bridge-utils and bridge the network interfaces
    7. install drbd8-modules-[version]-amd64 drbd8-utils (in my case version = 2.6)
    WARNING: the Proxmox repo contains a drbd8-utils that is incompatible to the modules, so make sure your versions match!
    For me it was 2:8.0.14-2
    8. configure & set-up drbd
    9. install and configure corosync
    with our script mentioned above
    10. install and set-up proxmox-ve-[pve kernel version]

    If we install a VM that is supposed to be virtualized, we must make sure to install it to the replicated resource.
    My script simply went through the list of VMs in that folder, update the config and would then start/stop them.

    Open issues:
    * for each new VM we add in, we manually have to copy the config to the replicated drive (from /etc/qemu_server), maybe a cronjob can handle this.
    * Apache seems to sometimes not want to start after rebooting. A apache2 restart allows me to access the Web GUI again.
    * As I mentioned, Proxmox does not really support what we want, though it has been indicated that this might be something for 2.0

    If there is a desire to have a (incomplete) tutorial, pls just say so and I'll try to get clearance from my boss.

    Currently I have been redirected to something else (similar, but in this case I only replicate PostgreSQL via DRBD&Corosync.. egad, anyone have a clue?) so updates might take a little.
     
    Last edited: Mar 19, 2010
  3. TheTank

    TheTank New Member

    @Mods:
    can someone change the title of this topic as IMHO it has evolved beyond the typical 'pls help me' to a little more informative.

    Maybe just remove the 'Advice pls:' please.

    thanks
     

Share This Page