Operating System - Linux
1832307 Members
2316 Online
110041 Solutions
New Discussion

Disabling failback on NIC Bonding

 
Mick Ryan
Advisor

Disabling failback on NIC Bonding

Hi All

I'm running SLES10.0 and have NIC bonding configured using eth0 and eth1 which is all working fine. However, my question relates to NIC failover.

I have eth0 defined as the primary and when eth0 gets disconnected, the service fails over to eth1. When service is restored, it fails back to eth0.

What I'd like, is for the service to stay on eth1 (or whatever the slave is), until I decide to fail it back.

Is this possible? I've been thinking about options like creating a script to look out for a failover message and updating the /sys/class/net/bond0/bonding/primary file, but it'd be a lot nicer and simpler if there was some kind of variable I could set (or not set).

Cheers

Mick
8 REPLIES 8
Ivan Ferreira
Honored Contributor

Re: Disabling failback on NIC Bonding

Try without specifying the "primary" option.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Matti_Kurkela
Honored Contributor

Re: Disabling failback on NIC Bonding

...and the "primary" option Ivan refers to should be wherever the "bonding" kernel module gets its options.

I don't have a SLES10 machine at hand at the moment, so I cannot check how its startup scripts handle the bonded NICs. But I'd start by checking the /etc/modprobe.conf file and/or /etc/modprobe.d directory.

MK
MK
Mick Ryan
Advisor

Re: Disabling failback on NIC Bonding

Thanks, guys. I thought about the primary option, but I wonder how the system decides which is the "correct" interface. In my bond setup, I reference the slaves as eth0/1 which are in turn defined in udev as their respective pci devices, so I'd imagine this would work for me.

Cheers

Mick
Mick Ryan
Advisor

Re: Disabling failback on NIC Bonding

My solution to the problem of confirming the interface after network startup, was to add a POST_UP_SCRIPT to the ifcfg-bond0 file. In the script, I use this command to force the bond onto eth0
ifenslave -c bond0 eth0

Cheers

Mick
rick jones
Honored Contributor

Re: Disabling failback on NIC Bonding

Out of mostly idle curiousity, why do you want to disable the failback?
there is no rest for the wicked yet the virtuous have no pillows
Mick Ryan
Advisor

Re: Disabling failback on NIC Bonding

We had a problem with a Foundry switch that took a port down then brought it back up (as far as the O/S was concerned). However, the port wasn't fully enabled and the upshot was it took the server off the air even though the server still had a valid network port available.

This solution would allow us to control which port is live while still maintaining resilience.
rick jones
Honored Contributor

Re: Disabling failback on NIC Bonding

Ah, so it is to be a workaround/kludge (depending on the point of view :) to some bad switch behaviour. Thanks for satisfying my curiousity.

I trust that Foundry is/was able to address the problem in the switch?
there is no rest for the wicked yet the virtuous have no pillows
Mick Ryan
Advisor

Re: Disabling failback on NIC Bonding

Yes they were and everything is fine. However, the feeling is that this control would be preferable to automated failovers.

Cheers

Mick