[DRBD-user] DRBD8 and bonded interfaces

Michał Szpadzik mszpadzik at o2.pl
Thu Jun 12 16:12:39 CEST 2008

Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.


Hello,

I have got problem with drbd8 when I'm using interface bonding.

Previously I have working configuration where only one physical 
interface was used to communicate (drbd8, heartbeat2, mysql replication 
and ocfs2 synchronization) between hosts.

After ethernet configuration change to bonding, every works OK except 
drbd8. I see that there is no network communication between drbd8 agents 
through bond0 interface.

1. My LAN configuration (hosts asgard & midgard):

midgard:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback

allow-hotplug eth0
iface eth0 inet static
        address 10.11.174.41
        netmask 255.255.255.0
        network 10.11.174.0
        broadcast 10.11.174.255
        gateway 10.11.174.3
        # dns-* options are implemented by the resolvconf package, if 
installed
        dns-nameservers 10.12.16.104 10.12.16.105

auto bond0
iface bond0 inet static
        address 192.168.10.6
        netmask 255.255.255.0
        network 192.168.10.0
        up /sbin/ifenslave bond0 eth1 eth2
        down /sbin/ifenslave -d bond0 eth1 eth2


asgard:~# cat /etc/network/interfaces
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
        address 10.11.174.40
        netmask 255.255.255.0
        network 10.11.174.0
        broadcast 10.11.174.255
        gateway 10.11.174.3
        # dns-* options are implemented by the resolvconf package, if 
installed
        dns-nameservers 10.12.16.104 10.12.16.105

auto bond0
iface bond0 inet static
        address 192.168.10.5
        netmask 255.255.255.0
        network 192.168.10.0
        broadcast 192.168.10.255
        up /sbin/ifenslave bond0 eth1 eth2
        down /sbin/ifenslave -d bond0 eth1 eth2

2. DRBD8 configuration (same at both hosts):

midgard:~# cat /etc/drbd.conf
global {
  usage-count yes;
}
common {
  protocol C;
}
resource lighttpd {
  startup {
    wfc-timeout 0;
    degr-wfc-timeout 120;
  }
  disk {
    on-io-error detach;
  }
  net {
    allow-two-primaries;
    sndbuf-size 512k;
    timeout 60;
    connect-int 10;
    ping-int 10;
    max-buffers 2048;
    max-epoch-size 2048;
  }
  syncer {
    rate 24M;
    al-extents 257;
  }
  on asgard {
    device    /dev/drbd0;
    disk      /dev/sdc1;
    address   192.168.10.5:7777;
    meta-disk internal;
  }
  on midgard {
    device    /dev/drbd0;
    disk      /dev/sdc1;
    address   192.168.10.6:7777;
    meta-disk internal;
  }
}

3. If I only change configuration to physical interfaces, everything 
works just fine:
midgard:~# cat /etc/drbd.conf
global {
  usage-count yes;
}
common {
  protocol C;
}
resource lighttpd {
  startup {
    wfc-timeout 0;
    degr-wfc-timeout 120;
  }
  disk {
    on-io-error detach;
  }
  net {
    allow-two-primaries;
    sndbuf-size 512k;
    timeout 60;
    connect-int 10;
    ping-int 10;
    max-buffers 2048;
    max-epoch-size 2048;
  }
  syncer {
    rate 24M;
    al-extents 257;
  }
  on asgard {
    device    /dev/drbd0;
    disk      /dev/sdc1;
    address   10.11.174.40:7777;
    meta-disk internal;
  }
  on midgard {
    device    /dev/drbd0;
    disk      /dev/sdc1;
    address   10.11.174.41:7777;
    meta-disk internal;
  }
}

Please help :)

-- 
Mike



More information about the drbd-user mailing list