Centos 7 服务器无法看到光纤通道 LUN SCSI 设备

Centos 7 服务器无法看到光纤通道 LUN SCSI 设备

我有一个通过 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。

如果系统虚拟内存太低,则不要继续。如果您有足够的可用虚拟内存,那么您可以继续执行以下命令来扫描新的 LUN。

# 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 块设备。

相关内容