linux scsi physical topology

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.

1
задан 20 June 2016 в 23:46
3 ответа

А, у вас есть 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"

1
ответ дан 3 December 2019 в 20:37

Попробуйте lsscsi .
Особенно lsscsi -c и lsscsi -H .

1
ответ дан 3 December 2019 в 20:37

Спасибо, но я попробовал все параметры 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
0
ответ дан 3 December 2019 в 20:37

Теги

Похожие вопросы