# find /sys/devices | egrep ‘nvme[0-9][0-9]?$’
This commands returns output similar to the following:
/sys/devices/pci0000:80/0000:80:03.0/0000:b0:00.0/0000:b1:04.0/0000:b2:00.0/misc/nvme0 /sys/devices/pci0000:80/0000:80:03.0/0000:b0:00.0/0000:b1:05.0/0000:b4:00.0/misc/nvme1
In this example, the PCIe addresses are highlighted in bold text.
# egrep –H ‘.*’ /sys/bus/pci/slots/*/address
This command returns output similar to the following:
/sys/bus/pci/slots/10/address:0000:b8:00 /sys/bus/pci/slots/11/address:0000:b6:00 /sys/bus/pci/slots/12/address:0000:b2:00 (instance nvme0, pcie slot 12, drive label nvme2) /sys/bus/pci/slots/13/address:0000:b4:00 (instance nvme1, pcie slot 13, drive label nvme3)
In this example, the bus addresses for the corresponding NVMe instances are highlighted in bold text.
If the device is a member of an LVM Volume group, it might be necessary to move data off the device using the pvmove command. Then, use the vgreduce command to remove the physical volume, and optionally, use the pvremove command to remove the LVM meta data from the disk.
echo 0 > /sys/bus/pci/slots/slot-number/power
where slot-number is the slot number obtained in Step 2.
The slot number can be a single digit or hyphenated numbers such as 0-2.