FS#17612 - [initscripts] net: two different bonding modes
Attached to Project:
Arch Linux
Opened by Daniel (dsf) - Saturday, 26 December 2009, 22:37 GMT
Last edited by Tom Gundersen (tomegun) - Sunday, 08 May 2011, 13:01 GMT
Opened by Daniel (dsf) - Saturday, 26 December 2009, 22:37 GMT
Last edited by Tom Gundersen (tomegun) - Sunday, 08 May 2011, 13:01 GMT
|
Details
Description:
The Problem: 2 network bondes like: bond0 with eth0 and eth1 in mode active-backup bond1 with eth2 and eth3 in mode round-robin modprobe.conf file: options bonding max_bonds=2 alias bond0 bonding options bond0 mode=1 miimon=100 alias bond1 bonding options bond1 mode=0 miimon=50 Always assume in two bonds the mode active-backup!! Additional info: Package initscripts * package version(s) * config and/or log files etc. Steps to reproduce: like explain in Description. The Solution: ( if you agree with fix include in next package release) File MODPROBE.CONF options bonding max_bonds=2 alias bond0 bonding alias bond1 bonding File /etc/conf.d/bonding ( with + what i added ) add variables like: bond_bond0="eth0 eth1" + mode_bond0="1" + miimon_bond0="100" bond_bond1="eth2 eth3" + mode_bond1="0" + miimon_bond1="50" BOND_INTERFACES=(bond0 bond1) File /etc/rc.d/network ( 2 Functions Changed ) ( with + what i added ) Function bond_up: for ifline in ${BOND_INTERFACES[@]}; do if [ "$ifline" = "${ifline#!}" ]; then eval bondcfg="\$bond_${ifline}" + eval bondmode="\$mode_${ifline}" + eval bondmon="\$miimon_${ifline}" if [ -n "${bondcfg}" ]; then /sbin/ifenslave $ifline $bondcfg || error=1 fi + if [ -n "${bondmode}" && -n "${bondmon}" ]; then + /sbin/ifconfig $ifline down || error=1 + /bin/echo $bondmode > /sys/class/net/$ifline/bonding/mode || error=1 + /bin/echo $bondmon > /sys/class/net/$ifline/bonding/miimon || error=1 + /sbin/ifconfig $ifline up || error=1 + fi fi done This works fine for me let me know if you need more details!!!! |
This task depends upon
/etc/modprobe.conf
/etc/conf.d/bonding
/etc/rc.d/network
Thanks, dsf
I have some notice in
+ if [ -n "${bondmode}" && -n "${bondmon}" ]; then
and i changed this to
+ if [ -n "${bondmode}" ] && [ -n "${bondmon}" ]; then
my modprobe.conf located in /etc/modprobe.d/modprobe.conf
Many thanks anyway!