我有一個透過 SCSI SAN 連接的光纖通道,但我看不到。我希望能夠存取這些驅動器,就像它們已安裝一樣。
也許整個事情是我對 SCSI 設備沒有太多經驗,但我希望在 /dev/ 中看到一些東西,但我沒有。
以下是我能看到的一些命令,看起來我的伺服器看到了該卡,但沒有製作它的設備?我認為這是一個潛在的驅動程式問題,但我不確定。
希望這不需要在論壇重定向中進行搜索,但如果這超出了範圍,請告訴我。
即使它最終成為一個鏈接,可以閱讀以更好地理解這個問題,如果它能幫助我解決這個問題,我也會很樂意接受它。
lspci -nn | grep "Fibre Channel"
0d:00.0 Fibre Channel [0c04]: QLogic Corp. ISP2432-based 4Gb Fibre Channel to PCI Express HBA [1077:2432] (rev 03)
0d:00.1 Fibre Channel [0c04]: QLogic Corp. ISP2432-based 4Gb Fibre Channel to PCI Express HBA [1077:2432] (rev 03)
>
[root@ ~]# dmesg | grep HUASY
[ 3.377927] scsi 0:0:0:0: Direct-Access HUASY S5500T 2 PQ: 1 ANSI: 4
[ 3.419624] scsi 0:0:1:0: Direct-Access HUASY S5500T 2 PQ: 1 ANSI: 4
[ 3.717599] scsi 1:0:0:0: Direct-Access HUASY Dorado2100 2 PQ: 1 ANSI: 4
[ 3.755084] scsi 1:0:1:0: Direct-Access HUASY S5500T 2 PQ: 1 ANSI: 4
[ 3.796961] scsi 1:0:2:0: Direct-Access HUASY S5500T 2 PQ: 1 ANSI: 4
[ 4.371104] scsi 0:0:2:0: Direct-Access HUASY Dorado2100 2 PQ: 1 ANSI: 4
[ 1173.634215] scsi 0:0:0:0: Direct-Access HUASY S5500T 2 PQ: 1 ANSI: 4
[ 1173.675895] scsi 0:0:1:0: Direct-Access HUASY S5500T 2 PQ: 1 ANSI: 4
[ 1173.719362] scsi 0:0:2:0: Direct-Access HUASY Dorado2100 2 PQ: 1 ANSI: 4
[ 1177.544427] scsi 1:0:0:0: Direct-Access HUASY Dorado2100 2 PQ: 1 ANSI: 4
[ 1177.581499] scsi 1:0:1:0: Direct-Access HUASY S5500T 2 PQ: 1 ANSI: 4
[ 1177.623165] scsi 1:0:2:0: Direct-Access HUASY S5500T 2 PQ: 1 ANSI: 4
難道我不應該看到所有這些裝置的 /dev/device 名稱嗎?
lsscsi
[0:0:0:0] disk HUASY S5500T 2 -
[0:0:1:0] disk HUASY S5500T 2 -
[0:0:2:0] disk HUASY Dorado2100 2 -
[1:0:0:0] disk HUASY Dorado2100 2 -
[1:0:1:0] disk HUASY S5500T 2 -
[1:0:2:0] disk HUASY S5500T 2 -
[2:0:0:0] cd/dvd Virtual CDROM 1.00 /dev/sr0
[3:0:0:0] disk Virtual Floppy 1.00 /dev/sda
[4:0:0:0] disk SEAGATE ST973402SS S229 -
[4:0:1:0] disk SEAGATE ST973402SS S229 -
[4:1:0:0] disk Dell VIRTUAL DISK 1028 /dev/sdb
>
rescan-scsi-bus.sh
Scanning SCSI subsystem for new devices
Scanning host 0 for all SCSI target IDs, all LUNs
sg2 changed: LU not available (PQual 1)
OLD: Host: scsi0 Channel: 00 Id: 00 Lun: 00
Vendor: HUASY Model: S5500T Rev: 2
Type: Direct-Access ANSI SCSI revision: 04
sg3 changed: LU not available (PQual 1)
OLD: Host: scsi0 Channel: 00 Id: 01 Lun: 00
Vendor: HUASY Model: S5500T Rev: 2
Type: Direct-Access ANSI SCSI revision: 04
sg4 changed: LU not available (PQual 1)
OLD: Host: scsi0 Channel: 00 Id: 02 Lun: 00
Vendor: HUASY Model: Dorado2100 Rev: 2
Type: Direct-Access ANSI SCSI revision: 04
Scanning host 1 for all SCSI target IDs, all LUNs
sg5 changed: LU not available (PQual 1)
OLD: Host: scsi1 Channel: 00 Id: 00 Lun: 00
Vendor: HUASY Model: Dorado2100 Rev: 2
Type: Direct-Access ANSI SCSI revision: 04
sg6 changed: LU not available (PQual 1)
OLD: Host: scsi1 Channel: 00 Id: 01 Lun: 00
Vendor: HUASY Model: S5500T Rev: 2
Type: Direct-Access ANSI SCSI revision: 04
sg7 changed: LU not available (PQual 1)
OLD: Host: scsi1 Channel: 00 Id: 02 Lun: 00
Vendor: HUASY Model: S5500T Rev: 2
Type: Direct-Access ANSI SCSI revision: 04
Scanning host 2 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning for device 2 0 0 0 ...
OLD: Host: scsi2 Channel: 00 Id: 00 Lun: 00
Vendor: Model: Virtual CDROM Rev: 1.00
Type: CD-ROM ANSI SCSI revision: -1
Scanning host 3 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning for device 3 0 0 0 ...
OLD: Host: scsi3 Channel: 00 Id: 00 Lun: 00
Vendor: Model: Virtual Floppy Rev: 1.00
Type: Direct-Access ANSI SCSI revision: -1
Scanning host 4 for SCSI target IDs 0 1 2 3 4 5 6 7, all LUNs
Scanning for device 4 0 0 0 ...
NEW: Host: scsi4 Channel: 00 Id: 00 Lun: 00
Vendor: SEAGATE Model: ST973402SS Rev: S229
Type: Direct-Access ANSI SCSI revision: 05
Scanning for device 4 0 1 0 ...
NEW: Host: scsi4 Channel: 00 Id: 01 Lun: 00
Vendor: SEAGATE Model: ST973402SS Rev: S229
Type: Direct-Access ANSI SCSI revision: 05
Scanning for device 4 1 0 0 ...
OLD: Host: scsi4 Channel: 01 Id: 00 Lun: 00
Vendor: Dell Model: VIRTUAL DISK Rev: 1028
Type: Direct-Access ANSI SCSI revision: 05
2 new or changed device(s) found.
[4:0:0:0]
[4:0:1:0]
0 remapped or resized device(s) found.
0 device(s) removed.
答案1
首先,找出 Linux 機器中配置了多少個主機匯流排適配器。您可以使用「systool -fc_host -v
來驗證系統中可用的FC。
# ls /sys/class/fc_host
host0 host1
在本例中,您需要掃描host0和host1 HBA。
如果系統虛擬記憶體太低,請不要繼續。
# echo "1" > /sys/class/fc_host/host0/issue_lip
# echo "1" > /sys/class/fc_host/host1/issue_lip
注意:您需要監視 /var/log/messages 中的“issue_lip”以確定掃描何時完成。
接下來,透過計算可用磁碟來驗證新 LUN 是否可見。
# fdisk -l 2>/dev/null | egrep '^Disk' | egrep -v 'dm-' | wc -l
如果新增了任何新的 LUN,那麼您可以看到比掃描 LUN 之前更多的計數。
lsblk
此外,您可以透過執行或查看新增的磁碟
ls -l /dev/disk/by-path/*
...
lrwxrwxrwx 1 root root 10 Aug 15 16:49 /dev/disk/by-path/pci-0000:15:00.1-fc-0x22430080e524ebac-lun-4 -> ../../sdcx
lrwxrwxrwx 1 root root 10 Aug 15 16:49 /dev/disk/by-path/pci-0000:15:00.1-fc-0x22430080e524ebac-lun-5 -> ../../sdcy
您可以從中識別 FC 區塊設備。