Is there any way to find the physical topology of a drive on the SCSI bus in linux?
here's an example:
>: for drive in $(find /dev/disk/by-path -name \*0|sort); do udevadm info --query=path --name $drive ; done
/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:2:0/0:2:0:0/block/sda
/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:2:1/0:2:1:0/block/sdb
/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:2:2/0:2:2:0/block/sdc
/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:2:3/0:2:3:0/block/sdd
/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:2:4/0:2:4:0/block/sde
/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:2:5/0:2:5:0/block/sdf
/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:2:6/0:2:6:0/block/sdg
/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:2:7/0:2:7:0/block/sdh
/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:2:8/0:2:8:0/block/sdi
/devices/pci0000:00/0000:00:02.2/0000:03:00.0/host0/target0:2:9/0:2:9:0/block/sdj
I can trace them up to the RAID card
>: lspci | egrep 02.2\|03.00
00:02.2 PCI bridge: Intel Corporation Xeon E5/Core i7 IIO PCI Express Root Port 2c (rev 07)
03:00.0 RAID bus controller: LSI Logic / Symbios Logic MegaRAID SAS 2208 [Thunderbolt] (rev 01)
but I can't trace any further (port on the raid card or expander), the scsi target numbers are sequential, mind that I have four empty slots so I would have expected target numbers to "skip" a few.
thanks.
Try
lsscsi
.Especially
lsscsi -c
andlsscsi -H
.Ah, you have MegaRAID.
Try MegaCLI.
http://docs.avagotech.com/docs/12351587
http://erikimh.com/megacli-cheatsheet/
http://www.dell.com/support/article/us/en/19/623352/en
It can do a lot of stuff. You need "MegaCli -pdList -aALL"
Thanks, but I tried all options to lsscsi, but they are still incremental.