In this section we will setup active-passive bonding for non-iSCSI traffic, and the interfaces on the iSCSI side.
We need to have redundancy on our customer/user facing ethernet. Because we are using Xen and the bridge in the kernel doesn't yet seem to like active/active interfaces, we are going to setup an active-passive bond.
We need to load the bonding driver with the correct mode for bond0. Add the following to the end of /etc/modprobe.d/aliases:
alias bond0 bonding options bond0 miimon=100 mode=active-backup
Now lets setup the bond interface. Add the following to /etc/network/interfaces:
auto bond0 iface bond0 inet static address 192.168.1.51 network 192.168.1.0 netmask 255.255.255.0 broadcast 192.168.1.255 gateway 192.168.1.1 up ifenslave bond0 eth0 eth1 down ifenslave -d bond0 eth0 eth1
Remove all other references to eth0 and eth1. You do not need any "auto" contexts for eth0 and eth1. Remember to change the IP address as appropriate.
Since we want our virtual machines to have networking we need the netloop module loaded. Add the following to /etc/modules:
netloop
Now we need to add a script to /etc/xen/scripts that will setup the bridge and virtual ehernet devices and attach them all together. Download the script from the following URL: network-bond
eddie:~# cd /etc/xen/scripts; wget http://www.performancemagic.com/~gregc/debian/network-bond; chmod +x network-bond
Edit /etc/xen/xend-config.sxp and find this line:
(network-script network-dummy)
and replace with:
(network-script network-bond)
Now it is about time for a reboot. We need to make sure that the xen kernel boots OK, that the bond interface is setup correctly, and that the bridge and virtual ethernet adaptors are all setup correctly. Having done this and fixed any problems you can move on.
Now we need to setup the two ethernet adaptors on the iSCSI network. We separate out the iSCSI network and the 'normal' network to ensure we have the best possible connection for our iSCSI I/O.
And the following to /etc/network/interfaces
auto eth2 eth3 iface eth2 inet static address 192.168.130.51 netmask 255.255.255.0 network 192.168.130.0 broadcast 192.168.130.255 iface eth3 inet static address 192.168.131.51 netmask 255.255.255.0 network 192.168.131.0 broadcast 192.168.131.255
Remember to change the IP addresses as appropriate. Bring these two interfaces up, and lets continue.
eddie:~# ifup eth2 eddie:~# ifup eth3