linux scsi物理拓扑

有没有什么办法可以在linux的SCSI总线上find驱动器的物理拓扑结构?

这里是一个例子:

>: 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 

我可以跟踪他们的RAID卡

 >: 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) 

但我不能追踪任何进一步的(突袭卡或扩展器上的端口),scsi目标数字是连续的,介意我有四个空插槽,所以我会有预期目标数字“跳过”几个。

谢谢。

试试lsscsi
特别是lsscsi -clsscsi -H

谢谢,但我尝试了所有的选项来lsscsi,但他们仍然是增量的。

 >: lsscsi -H [0] megaraid_sas >: lsscsi -c Attached devices: Host: scsi0 Channel: 02 Target: 00 Lun: 00 Vendor: DELL Model: PERC H710 Rev: 3.13 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi0 Channel: 02 Target: 01 Lun: 00 Vendor: DELL Model: PERC H710 Rev: 3.13 Type: Direct-Access ANSI SCSI revision: 05 Host: scsi0 Channel: 02 Target: 02 Lun: 00 Vendor: DELL Model: PERC H710 Rev: 3.13 Type: Direct-Access ANSI SCSI revision: 05 

啊,你有MegaRAID。

试试MegaCLI。

http://docs.avagotech.com/docs/12351587

http://erikimh.com/megacli-cheatsheet/

http://www.dell.com/support/article/us/en/19/623352/en

它可以做很多东西。 你需要“MegaCli -pdList -ALL”