Methods for Querying FC HBA Info in Operating Systems

For Linux

查看系统是否正常识别 HBA 卡。

~]# lspci | grep Fibre
03:00.0 Fibre Channel: Emulex Corporation Saturn-X: LightPulse Fibre Channel Host Adapter (rev 03)
03:00.1 Fibre Channel: Emulex Corporation Saturn-X: LightPulse Fibre Channel Host Adapter (rev 03)

~]# cat /sys/class/scsi_host/host*/model*name
LPe12002
LPe12002

查看 WWN 信息

~]# cat /sys/class/fc_host/host*/port_name
0x210000e08b907955
0x210000e08b902856

For Windows

通用查询程序: Fibre Channel Information Tool

软件安装后在 DOS 命令行下输入 fcinfo 来即可获取 HBA 卡的相关信息,如下图所示。

对于 Windows Server 2012 及后续版本,Windows 系统 PowerShell 自带了查询 FC HBA 卡 WWN 信息和 iSCSI 启动器信息的命令:Get-InitiatorPort