About this list Date view Thread view Subject view Author view Attachment view

From: Helmut Wollmersdorfer (helmut.wollmersdorfer_at_gmx.at)
Date: Mon 22 Aug 2005 - 16:55:56 BST

Herbert Poetzl wrote:

> btw, a failover setup with drbd would probably interest
> other folks too, care to write a few lines for a howto?

Yes I will write a HOWTO and populate in the wikis of DRBD, vserver and
heartbeat. But first I have to be sure, that it works stable.

The short story for the experts:
- install a vserver-kernel, compile drbd-module against it
   (for current debian see
- install the utilities of vserver, heartbeat, drbd
- configure a drbd device dedicated to a single vserver-guest
- mount it as e.g. /dev/drbd0 /var/lib/vservers
- install a vserver-guest on it
- copy the relevant configuration files to the second node
   (I used tar and scp)
- add a resource group like
     xp2400 drbddisk::vser-42 \
     Filesystem::/dev/drbd0::/var/lib/vservers::ext3 vserver::vs27
   to /etc/ha.d/haresources

There are some other difficulties to avoid - most related to services
listening to some ports ... somewhere ... two nodes and dozens of cables
to each node;-)

Such a resource script is needed (which IMHO needs some exeption
handling added;-) in /etc/ha.d/resource.d/vserver

# This script is intended to be used as resource script by heartbeat
# Jan 2005 by Helmut Wollmersdorfer.



case "$CMD" in
             $VSERVER $RES start
             # exec, so the exit code propagates
        exec $VSERVER $RES stop
         $VSERVER $RES status | grep running > /dev/null
        if [ $? -eq 0 ]
            echo "running"
            echo "stopped"
        echo "Usage: vserver VSERVER-NAME {start|stop|status}"
        exit 1

exit 0

Helmut Wollmersdorfer
Vserver mailing list

About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Mon 22 Aug 2005 - 16:56:30 BST by hypermail 2.1.3