CHAPTER 4 PCI Card Hot Maintenance in Red Hat Enterprise Linux 6
4.8 Removing PCI Express cards
112
C122-E175-01EN
3. Execute the higher-level application processing required before NIC removal.
Stop all access to the interface as follows. Stop the application that was confirmed in step 2 as using the
interface, or exclude the interface from the target of use by the application.
4. Deactivate the NIC.
Execute the following command to deactivate all the interfaces that you confirmed in step 2.
The applicable command depends on whether the target interface is a single NIC interface or the SLAVE
interface of a bonding device.
[For a single NIC interface]
# /sbin/ifdown ethX
If the single NIC interface has a VLAN device, you also need to remove the VLAN interface. Perform the
following operations. (These operations precede deactivation of the physical interface.)
# /sbin/ifdown ethX.Y
# /sbin/vconfig rem ethX.Y
[For the interface under bonding]
If the bonding device is operating in mode 1, use the following steps for safety purposes on the SLAVE
interface to be removed to exclude it from operation. In any other mode, removing it immediately should
not cause any problems. Confirm that the SLAVE interface is the interface currently being used for
communication.
# cat /sys/class/net/bondY/bonding/active_slave
If the displayed interface name corresponds to the SLAVE interface to be removed, execute the following
command to switch to communicating now with the other SLAVE interface.
# /sbin/ifenslave -c bondY ethZ
(ethZ: bondY-configured interface not subject to hot
replacement)
Finally, remove the SLAVE interface being replaced, from the bonding configuration. Immediately after
being removed, the interface is automatically no longer used.
# /sbin/ifenslave -d bondY ethX
To remove the interfaces, including the bonding device, deactivate them collectively by executing the
following command.
# /sbin/ifdown bondY
5. Power off the PCI slot.
See ‘Powering on and off PCI Express slots’ in “4.6.2 PCI Express card replacement procedure in detail”.
6. Remove the NIC from the PCI Express slot.
7. Remove the interface configuration file.
Delete the configuration files of all the interfaces confirmed in step 2, by executing the following command.
# rm /etc/sysconfig/network-scripts/ifcfg-ethX
When deleting a bonding device, also delete the related bonding items (ifcfg-bondY files).
8. Edit the settings in the udev function rule file.
The entries of the interface assigned to the removed NIC still remain in the udev function rule file,
/etc/udev/ rules.d/70-persistent-net.rules. Leaving the entries will affect the determination of interface
names for replacement cards or added cards in the future. For this reason, delete or comment out those
entries.
The following example shows editing of the udev function rule file, /etc/udev/rules.d/70-persistent-
net.rules. (In this example, the file is edited when the eth10 interface is removed.)
[Example of descriptions in the file before editing]
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ¥
ATTR{address}=="00:0e:0c:70:c3:38", ATTR{type}=="1", ¥
KERNEL=="eth*", NAME="eth0"
:
:
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ¥
ATTR{address}=="00:0e:0c:70:c3:40", ATTR{type}=="1", ¥
KERNEL=="eth*", NAME="eth10"