Linux scsi 物理拓扑

Linux scsi 物理拓扑

有没有办法在 Linux 中找到 SCSI 总线上驱动器的物理拓扑?

以下是一个例子:

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

但我无法进一步追踪(raid 卡或扩展器上的端口),scsi 目标编号是连续的,请注意我有四个空插槽,所以我希望目标编号“跳过”几个。

谢谢。

答案1

尝试lsscsi.
尤其lsscsi -c是和lsscsi -H

答案2

啊,您有 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 -aALL”

答案3

谢谢,但是我尝试了 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

相关内容