Hi Jan,

It is very possible. I do this on a machine running RHEL4. I actually go a step further and do tagged VLANs (802.1q) on top of the bonded interface, so my configuration is like this:

[EMAIL PROTECTED] network-scripts]# cat ifcfg-eth0
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
MASTER=bond0
SLAVE=yes
USERCTL=no

[EMAIL PROTECTED] network-scripts]# cat ifcfg-eth1
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=none
MASTER=bond0
SLAVE=yes
USERCTL=no

[EMAIL PROTECTED] network-scripts]# cat ifcfg-eth2
DEVICE=eth2
ONBOOT=yes
BOOTPROTO=none
MASTER=bond0
SLAVE=yes
USERCTL=no

[EMAIL PROTECTED] network-scripts]# cat ifcfg-bond0
DEVICE=bond0
ONBOOT=yes
BOOTPROTO=none
USERCTL=no

[EMAIL PROTECTED] network-scripts]# cat ifcfg-bond0.431
DEVICE=bond0.431
BOOTPROTO=static
ONBOOT=yes
IPADDR=X.Y.131.21
NETMASK=255.255.255.0
TYPE=Ethernet
VLAN=yes

[EMAIL PROTECTED] network-scripts]# cat ifcfg-bond0.432
DEVICE=bond0.432
BOOTPROTO=static
ONBOOT=yes
IPADDR=X.Y.132.21
NETMASK=255.255.255.0
TYPE=Ethernet
VLAN=yes

[EMAIL PROTECTED] network-scripts]# cat ifcfg-bond0.433
DEVICE=bond0.433
BOOTPROTO=static
ONBOOT=no
IPADDR=X.Y.133.21
NETMASK=255.255.255.0
TYPE=Ethernet
VLAN=yes

For the haresources or cib.xml file you must use the IPaddr2 script for the virtual IPs as shown here (It is of importance to define the different VLANs on top of the bonded interface in my case):

[EMAIL PROTECTED] network-scripts]# cat /etc/ha.d/haresources
node1_fqdn IPaddr2::X.Y.131.20/24/bond0.431:0 IPaddr2::X.Y.132.20/24/bond0.432:0 IPaddr2::X.Y.133.20/24/bond0.433:0 drbddisk::export Filesystem::/dev/drbd0::/export::ext3::rw,usrquota,grpquota,acl,user_xattr saslauthd cyrus-imapd clamd mimedefang sendmail node2_fqdn IPaddr2::X.Y.131.19/24/bond0.431:0 IPaddr2::X.Y.132.19/24/bond0.432:1 IPaddr2::X.Y.145.133/24/bond0.433:2 drbddisk::web Filesystem::/dev/drbd1::/web::ext3::rw,usrquota,grpquota,acl,user_xattr mysqld httpd

If you have only bonding and use one virtual IP, then the IPaddr script should be enough, since you will only end up having bond0 and bond0:0 as your virtual interface. The need of the IPaddr2 script arises when you need to determine the name of the virtual interfaces so that heartbeat stops and starts the correct virtual IPs correctly.

You must also check your kernel and the bonding modes available for your network cards. Some bonding modes require special switch configurations. Some modes give you better throughput and other modes are oriented towards availability. Check the readme files for the bonding module in your kernel documentation.

HTH,

Diego


Jan Kalcic wrote:
Hi People,

I got my cluster running with heartbeat2 but using haresources file. The
resources I've created are IPAddr, drbd and apache but doesn't matter.
What I need is double the network interface eth0 on each machine, create
a bond interface on this and then create virtual IPAddr on the the bond
interface. Is this possibile?
What I'm looking for is create a High Availability environment in a
multiple switch topology network.

Regards,
Jan
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to