Lucas Albers napisa(a):
Could you post all your conf files:
drbd.conf, haresource and any changes you made to your vserver pre startup
or post shutdown script?
Your vserver.conf or vserver.sh files if you made any big changes.
Thanks.
Between the two of you I'll get enough information to write it up in english.
Description of my configuration (poor English):
-. two PCs with 2 NICs each (one 100Mbit, one 1000Mbit).
-. I've used Debian (unstable).
-. partitioned HDD: 8GB node OS, swap, 14GB for vserver #1(V1),
14GB for vserver #2 (V2)
-. configured NICs:
on external (100Mbit) public IP - connected through switch to router,
on internal (1000Mbit) private IPs
- crossover cabel connecting nodes.
-. installed:
http://www.kernel.org/pub/linux/kernel/v2.4/linux-2.4.26.tar.bz2
http://www.13thfloor.at/vserver/s_release/v1.27/patch-2.4.26-vs1.27.diff
http://www.13thfloor.at/vserver/s_release/v1.27/util-vserver-0.29.4.tar.bz2
and from debian packages (apt-get):
apt-get install ssh gcc g++ less wget tar bzip2 patch make autoconf \
automake libtool flex bison gdb kernel-package \
libncurses5-dev debhelper initrd-tools genromfs e2fslibs-dev \
debootstrap heartbeat drbd drbd-source
-. compiled kernel with vserver patch applied
with option: Virtual Root device support (NEW) checked.
-. compiled drbd module using: make-kpkg modules_image
-. compiled installed util-vserver
cd /usr/src/util-vserver-0.29.4
./configure --prefix=
make; make install
-. configured drbd on both nodes (D1 and D2) (attached file drbd.conf)
and made ext3 partition on top of two devices (drbd0/nb0 drbd1/nb1)
-. two folders created (on both nodes): /vservers/V1 and /vservers/V2
-. changed /etc/fstab (both nodes)
/dev/nb0/vserver/V1 ext3noauto 0 0
/dev/nb1/vserver/V1 ext2noauto 0 0
-. mounted (D1) drbd0 on /vservers/V1,
mounted (D2) drbd1 on /vservers/V2
-. installed vservers using slightly modified newserver.sh script
for debian (attached)
-. set up /etc/heartbeat/ha.cf (attached)
-. added hacluster user - missed during deb package installation:
adduser --system --shell /bin/false --no-create-home hacluster
-. created links:
ln -s /etc/init.d/drbd /etc/heartbeat/resource.d/datadisk
(this is for HA - 'datadisk' is a must)
ln -s /sbin/vserver /etc/init.d/vserver
(for HA too)
ln -s /sbin/util-vserver-vars /etc/init.d/util-vserver-vars
(for /etc/init.d/vserver above)
-. after 3 days of digging: changed every 'not running' in /sbin/vserver
to 'down'. 'not running' was confusing heartbeat while its grepping
'vserver name status' for 'running' 8-O.
-. configured /etc/heartbeat/haresources (attached)
where:
d1 - is a node name of cluster
193.x.x.2/28/eth0 - is a public IP of V1
IPaddr::10.10.10.100/24/eth1 - is a private IP used by v1 daemons
as loopback, it can't be lo because when d1 is hosting both
vservers it can be occupied only by one of them. I had to
reconfigure each daeomon (postfix, amavis, etc) to use
this as loopback.
datadisk::drbd0 - to mount drbd0 as 'primary'
vserver::V1 - to start vserver after all previous...
-. removed some stop scripts in /etc/init.d/rc6.d
rm -f !K25hwclock.sh
rm -f S90reboot
-. creaded dir (I can't remember why - but for vservers):
mkdir -p /var/lock/subsys/
-. entered vserver V1 V2 ... configured as mail servers
(postfix, amavisd, courier-pop3, clamav, sals, mysql...)
I think thats all.
Hope will help someone,
once again sorry for poor English,
rgrds.,
Konrad
BTW. Someone knows why and in what situation are created
/proc, /dev folders inside of vseerver folder...
while it is not mounted? How to prevent this creation?
resource drbd0 {
inittimeout = -1
protocol = C
fsckcmd = /bin/true
disk {
do-panic
disk-size = 1400k
}
net {
# -max has to be larger than -min, obviously
sync-min= 500k
sync-max= 1M# maximal average syncer bandwidth
tl-size = 5000 # transfer log size, ensures strict write ordering
timeout = 60# unit: 0.1 seconds
connect-int = 10# unit: seconds
ping-int= 10# unit: seconds
ko-count= 4 # if some block send times out this many times,
# the peer is considered dead, even if it still
# answeres ping requests
}
on d1 {
device = /dev/nb0
disk= /dev/hda3
address = 192.168.0.101
port= 7788
}
on d2 {
device = /dev/nb0
disk= /dev/hda3
address = 192.168.0.102
port= 7788
}
}
resource drbd1 {
inittimeout = -1
protocol = C
fsckcmd = /bin/true
disk {
do-panic
disk-size = 1400k
}
net {
# -max has to be larger than -min, obviously
sync-min= 500k
sync-max= 1M# maximal average syncer bandwidth