I have used mdadm
, lspci -vvv
, and lshw -c disk -c storage
and I can seem to find the physical addresses of all my NVMEs as well as the logical addresses on the system (minus the missing drive), but I cant find anyway to link the information of nvme of PCIe bus 6.000
to nvme0n1
(just an example).
1 Answer
Using the command:
udevadm info /sys/block/nvme0n1
You can discover the physical nvme's on your system, their model, serial number, pcie bus location (so in term physical location), and logical address. You can also put in the Logical address into udevadm as well as a quick means to see if a failed drive still has a namespace. If the drive still has a logical namespace there is most likely some form of error which will need further investigation with smartctl, whilst if the namespace doesn't even appear then reseating the drive could be an option before the drive is declared failed.
smartctl
might be the ticket, however long ago I posted in here the arguments to smartctl to recognize disks behind a raid controller; you would have to peruse the smartctl instruction book to figure out the correct arguments to navigate through the pci bus to list your nvme's (which should report like any ssd)lsblk -o type,name,label,partlabel,size,fstype,model,serial,wwn,uuid'
to get the most out of it. This may indirectly tell you which failed when you know what you are supposed to see as the result and don't see the specific disk.alias lsblk2='lsblk -o type,name,label,partlabel,size,fstype,model,serial,wwn,uuid'