We currently migrate to MediaWiki from our old installation, but not all content has been migrated yet. Take a look at the Wiki Team page for instructions how to help or browse through our new wiki at wiki.linux-vserver.org to find the information already migrated.
The idea is simple:
Install a vserver on a DRBD resource and let it failover to the other node of a cluster.
This configuration uses vserver, DRBD and heartbeat. This page will not describe, how these packages are installed and configured. Only the important topics are mentioned.
Steps of installation:
In detail
Prepare the disk space:
You will need some block device like /dev/hdaX, or a better choice is to use LVM.
lvcreate -L3000 -nlvvs03 vg0
A recommended method is, to have DRBD metadata on an extra block device for each DRBD device.
Prepare space for it:
lvcreate -L132 -nlvvs03md vg0
Create an entry in /etc/drbd.conf using your favorite editor:
resource vs03 { protocol C; incon-degr-cmd "echo '!DRBD! pri on incon-degr' | wall ; sleep 60 ; halt -f"; startup { wfc-timeout 100; degr-wfc-timeout 120; # 2 minutes. } disk { on-io-error pass_on; } net { # sndbuf-size 512k; # timeout 60; # 6 seconds (unit = 0.1 seconds) # connect-int 10; # 10 seconds (unit = 1 second) # ping-int 10; # 10 seconds (unit = 1 second) # max-buffers 2048; # max-epoch-size 2048; # ko-count 4; # on-disconnect reconnect; } syncer { rate 10M; group 1; al-extents 257; } on cel600 { device /dev/drbd1; disk /dev/vg0/lvvs03; address 192.168.0.22:7789; meta-disk /dev/vg0/lvvs03md[0]; } on xp2400 { device /dev/drbd1; disk /dev/vg0/lvvs03; address 192.168.0.21:7789; meta-disk /dev/vg0/lvvs03md[0]; } }
Start DRBD
/etc/init.d/drbd start
The DRBD resource is in an undefined state. It needs to be forced to be 'primary' on the current node.
drbdsetup /dev/drbd1 primary --do-what-I-say
Obviously a filesystem is needed on top of DRBD:
mke2fs -j /dev/drbd1
Also we need a mount point somewhere:
mkdir /mnt/vs03
As heartbeat is intended to manage the vserver, using the heartbeat script for mounting is a first test:
/etc/ha.d/resource.d/Filesystem /dev/drbd1 /mnt/vs03 ext3 start
There are many methods how to install a vserver. Here 'debootstrap' is used. The important option is '--rootdir' to force the installation to the DRBD device.
vserver -v vs03 build --force --rootdir /mnt/vs03 \ -m debootstrap --hostname vs03.nack.at \ --netdev eth0 --interface 192.168.0.3/24 --context 3 -- \ -d sarge -m http://ftp.at.debian.org/debian/
To be continued ...