Hi,
I am having problems with 2.6.24-ovz005.1 and DRBD.
One option would be to use 2.6.18, but its r8169 driver is not working properly (I get constant "link down" "link up" messages at /var/log/messages and the NIC won't work properly).
DRBD is not included in the 2.6.24 RPM kernel, probably because it won't compile cleanly, so you have to apply a patch as described here:
http://forum.openvz.org/index.php?t=msg&th=6293
And then rebuild and install the kernel, which I did.
This is my /etc/drbd.conf:
global {
usage-count no;
}
resource r0 {
protocol C;
handlers {
pri-on-incon-degr "echo o > /proc/sysrq-trigger ; halt -f";
pri-lost-after-sb "echo o > /proc/sysrq-trigger ; halt -f";
local-io-error "echo o > /proc/sysrq-trigger ; halt -f";
}
startup {
degr-wfc-timeout 120;
}
disk {
on-io-error call-local-io-error;
}
syncer {
rate 30M;
al-extents 257;
}
on cluster11 {
device /dev/drbd0;
disk /dev/vg0/drbd;
address 192.168.0.1:7788;
meta-disk internal;
}
on cluster12 {
device /dev/drbd0;
disk /dev/vg0/drbd;
address 192.168.0.2:7788;
meta-disk internal;
}
}
/dev/vg0/drbd is a LVM logical volume existing in both machines.
I am using CentOS 5.2 and drbd82-8.2.6-1.el5.centos.
When I modprobe drbd module everything seems all right:
Aug 13 17:36:27 cluster12 kernel: drbd: initialised. Version: 8.0.0 (api:86/proto:86)
Aug 13 17:36:27 cluster12 kernel: drbd: SVN Revision: 2713 build by root@dhcp0-176.sw.ru, 2007-03-05 16:06:51
Aug 13 17:36:27 cluster12 kernel: drbd: registered as block device major 147
Aug 13 17:36:27 cluster12 kernel: drbd: minor_table @ 0xffff81012f2c8e18
Then I follow the DRBD documentation:
http://www.drbd.org/docs/install/
[root@cluster12 ~]# drbdadm create-md r0
v07 Magic number not found
v07 Magic number not found
You want me to create a v08 style flexible-size internal meta data block.
There apears to be a v08 flexible-size internal meta data block
already in place on /dev/vg0/drbd at byte offset 446777257984
Do you really want to overwrite the existing v08 meta-data?
[need to type 'yes' to confirm] yes
Writing meta data...
initialising activity log
NOT initialized bitmap
New drbd meta data block sucessfully created.
So far so good, but...
[root@cluster12 ~]# drbdadm attach r0
-----[insert 2 min wait here, degr-wfc-timeout????]-----
No response from the DRBD driver! Is the module loaded?
[root@cluster12 ~]# lsmod | grep drbd
drbd 195888 2
[root@cluster12 ~]# tail -n 1 /var/log/messages
Aug 13 17:51:48 cluster12 kernel: drbd0: disk( Diskless -> Attaching )
I even tried to attach both machines at the same time to check if there was some problem with network connectivity, but the result is the same and the NIC traffic LEDs don't blink.
IPTables is disabled and both servers can ping each other.
It is the first time I try DRBD. Can someone provide some insight, please?