blog.erben.sk Just another sysadmin blog

10Sep/100

How to change Currently Active Slave when runnning bonding in active-backup mode

When you are running bonding in active-backup mode, you can detect which slave is active by listing /proc/net/bonding/bond0. How to change active slave?


[root@rs01 ~]# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.4.0 (October 7, 2008)

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth1
MII Status: up
MII Polling Interval (ms): 0
Up Delay (ms): 0
Down Delay (ms): 0
ARP Polling Interval (ms): 250
ARP IP target/s (n.n.n.n form): 10.0.0.1, 10.0.0.2, 10.0.0.3, 10.0.0.200

Slave Interface: eth1
MII Status: up
Link Failure Count: 2
Permanent HW addr: 00:1b:21:46:64:42

Slave Interface: eth0
MII Status: up
Link Failure Count: 2
Permanent HW addr: 00:24:81:26:c1:43

To switch to other slave, just remove active interface from bonding configuration

echo -eth1 > /sys/class/net/bond0/bonding/slaves

Bonding will continue with other interface, which becomes active. Now you can put interface eth1 back to bonding

echo +eth1 > /sys/class/net/bond0/bonding/slaves

Filed under: linux Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

(required)

No trackbacks yet.