Advertisements

Removing a network channel bonding interface in Suse Linux 11

I have a Suse Linux 11 where someone made a backup copy before editing and it ended up starting a new bonding interface

root@linux:~ # cat /etc/*release
SUSE Linux Enterprise Server 11 (x86_64)
VERSION = 11
PATCHLEVEL = 3
Build no: 1565
Build date: Fri Aug 14 07:53:12 CEST 2015
Kiwi version: 7.02.58
LSB_VERSION=”core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64″

The interface is called bond4 and the backup file is /etc/sysconfig/network/ifcfg-bond4_original

root@linux:~ # cat /proc/net/bonding/bond4_original
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: None
MII Status: down
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Slave Interface: em50
MII Status: down
Speed: Unknown
Duplex: Unknown
Link Failure Count: 0
Permanent HW addr: 28:80:23:a5:c8:71
Slave queue ID: 0

Slave Interface: p6p2
MII Status: down
Speed: Unknown
Duplex: Unknown
Link Failure Count: 0
Permanent HW addr: 28:80:23:b3:07:dd
Slave queue ID: 0

I checked the configuration and ifcfg-bond4 and ifcfg-bond4_original are almost exactly the same file except for the parameter STARTMODE

root@linux:/etc/sysconfig/network # ls -l
total 108
-rw-r–r– 1 root root 14225 May 11 17:13 config
-rw-r–r– 1 root root 10590 May 11 17:16 dhcp
drwxr-xr-x 1 root root 108 May 11 17:13 if-down.d
drwxr-xr-x 1 root root 134 May 11 17:13 if-up.d
-rw——- 1 root root 303 May 11 17:13 ifcfg-bond2
-rw——- 1 root root 254 Jun 7 14:15 ifcfg-bond4
-rw——- 1 root root 254 Aug 16 10:26 ifcfg-bond4_original
-rw——- 1 root root 60 May 11 17:13 ifcfg-em49
-rw——- 1 root root 150 May 11 17:13 ifcfg-em50
-rw——- 1 root root 172 Jul 17 2015 ifcfg-lo
-rw——- 1 root root 189 May 11 17:13 ifcfg-p6p2
-rw——- 1 root root 164 May 11 17:13 ifcfg-p7p1
-rw——- 1 root root 164 May 11 17:13 ifcfg-p8p1
-rw——- 1 root root 252 May 11 17:13 ifcfg-vlan1700
-rw-r–r– 1 root root 29333 Jul 17 2015 ifcfg.template
-rw-r–r– 1 root root 239 Jul 17 2015 ifroute-lo
drwx—— 1 root root 0 May 5 2010 providers
-rw-r–r– 1 root root 26 Feb 8 2016 routes
drwxr-xr-x 1 root root 1722 May 11 17:17 scripts

Editing the file /etc/sysconfig/network/ifcfg-bond4_original

root@linux:/etc/sysconfig/network # vi ifcfg-bond4_original
BONDING_MASTER=’yes’
BONDING_MODULE_OPTS=’mode=active-backup miimon=100′
BONDING_SLAVE0=’em50′
BONDING_SLAVE1=’p6p2′
BOOTPROTO=’static’
BROADCAST=”
ETHTOOL_OPTIONS=”
IPADDR=”
MTU=”
NAME=”
NETWORK=”
REMOTE_IPADDR=”
STARTMODE=’off’
USERCONTROL=’no’

Removing the interfaces from the bonding

root@linux:~ # ifenslave -d bond4_original em50 p6p2

root@linux:~ # cat /proc/net/bonding/bond4_original
Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: None
MII Status: down
MII Polling Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms): 0

Removing the bonding

root@linux:~ # ifdown bond4_original
bond4_original

root@linux:~ # cat /proc/net/bonding/bond4_original
cat: /proc/net/bonding/bond4_original: No such file or directory

root@linux:~ # ls -l /proc/net/bonding
total 0
-r–r–r– 1 root root 0 Aug 16 10:41 bond2

Advertisements
%d bloggers like this: