Wednesday, January 1, 2014

How to change the bonding mode without rebooting the system?


Resolution

In Red Hat Enterprise Linux 5 or 6, the bonding mode can be changed like this:
Here is an example about how to change bonding mode from 0 to 1 in RHEL5 or 6:

1. Find current bonding mode:
#cd /sys/class/net/bond0/bonding
#cat mode
 balance-rr   0              
The current bonding mode is round-robin.

2. Change the bonding mode:
#ifdown bond0
#echo 1 >mode
#cat mode
active-backup 1
Now the bonding mode has been changed to active-backup.
3. Up the bond0 again:
#ifup bond0
4. Check if the bonding mode has been changed:
#cat /proc/net/bonding/bond0

In Red Hat Enterprise Linux 4, the bonding mode can be changed like this:

Here is an example about how to change bonding mode from 0 to 1 in RHEL4:
1. Find current bonding mode:
# cat /proc/net/bonding/bond0
...
Bonding mode: round-robin
The  current bonding mode is round-robin.

2. Down all bonding information and change the bonding mode:
# ifdown bond0
(down other bonding interfaces if you have)
# rmmod bonding
- Edit /etc/modprobe.conf to change the bonding options (the line should look like the following)
options bonding mode=0 miimon=100
- This can be changed to:
options bonding mode=1 miimon=100

3. Up the bond0 (and other bonding interface) again. The bonding module will be reloaded automatically:
# ifup bond0

4. Check if the bonding mode has been changed:

#cat /proc/net/bonding/bond0

No comments:

Post a Comment