Use hotplug and turn on/off PCI device for replacing NIC
- by Ryota Hashimoto
How can I turn off the PCI slots and change the device (especially NIC) without shutting the server down?
I found a similar question (How do I turn off PCI devices?) but there are no /sys/bus/pci/slot and no files in /sys/bus/pci/slots.
I'm using 12.04 LTS.
$ uname -a
Linux d1-c1-r1-p1 3.2.0-38-generic #61-Ubuntu SMP Tue Feb 19 12:18:21 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
$ lspci | grep Eth
04:00.0 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
04:00.1 Ethernet controller: Intel Corporation I350 Gigabit Network Connection (rev 01)
09:00.0 Ethernet controller: Intel Corporation 82599EB 10-Gigabit SFI/SFP+ Network Connection (rev 01)
09:00.1 Ethernet controller: Intel Corporation 82599EB 10-Gigabit SFI/SFP+ Network Connection (rev 01)
$ ls /sys/bus/pci/
devices/ drivers_probe slots/
drivers/ rescan uevent
drivers_autoprobe resource_alignment
$ ls /sys/bus/pci/devices/0000\:04\:00.0/
broken_parity_status driver modalias rescan subsystem
class enable msi_bus reset subsystem_device
config firmware_node net resource subsystem_vendor
consistent_dma_mask_bits irq numa_node resource0 uevent
device local_cpulist power resource2 vendor
dma_mask_bits local_cpus remove resource3