Use hotplug and turn on/off PCI device for replacing NIC

Posted by Ryota Hashimoto on Ask Ubuntu See other posts from Ask Ubuntu or by Ryota Hashimoto
Published on 2013-05-29T03:59:43Z Indexed on 2014/06/06 3:41 UTC
Read the original article Hit count: 248

Filed under:
|

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

© Ask Ubuntu or respective owner

Related posts about networking

Related posts about pci