【转】How to identify the HBA cards/ports and WWN in Linux

本文介绍在RHEL系统中通过多种方法确定Fibre Channel(HBA)卡及其端口状态(在线/离线)和WWN编号的具体步骤。包括使用lspci、sysfsutils和systool等命令行工具来识别已安装的HBA卡、检查端口状态及获取WWN号码。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

https://www.thegeekdiary.com/how-to-identify-the-hba-cardsports-and-wwn-in-rheloel/

 

There are several commands to determine the WWN of a Fibre Channel (FC) HBA and their status (online/offline). The post discusses few of the most commonly used methods.

Method 1
To find the HBA cards installed on your system use :

# lspci -nn | grep -i hba
07:00.0 Fibre Channel [0c04]: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA [1077:2532] (rev 02)
07:00.1 Fibre Channel [0c04]: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA [1077:2532] (rev 02)

To check the available HBA ports :

 

# ls -l /sys/class/fc_host
total 0
drwxr-xr-x 3 root root 0 Feb  3  2015 host2
drwxr-xr-x 3 root root 0 Feb  3  2015 host3

To find the state of HBA ports (online/offline) :

# more /sys/class/fc_host/host?/port_state
::::::::::::::
/sys/class/fc_host/host2/port_state
::::::::::::::
Online
::::::::::::::
/sys/class/fc_host/host3/port_state
::::::::::::::
Online

To find the WWN numbers of the above ports :

# more /sys/class/fc_host/host?/port_name
::::::::::::::
/sys/class/fc_host/host2/port_name
::::::::::::::
0x500143802426baf4
::::::::::::::
/sys/class/fc_host/host3/port_name
::::::::::::::
0x500143802426baf6

Method 2 : Using systool
Another useful command to find the information about HBAs is systool. If not already install, you may need to install the sysfsutils package.

# yum install sysfsutils

To check the available HBA ports :

# systool -c fc_host
Class = "fc_host"

  Class Device = "host2"
    Device = "host2"

  Class Device = "host3"
    Device = "host3"

To find the WWNs for the HBA ports :

# systool -c fc_host -v | grep port_name
    port_name           = "0x500143802426baf4"
    port_name           = "0x500143802426baf6"

To check the state of the HBA ports (online/offline) :

# systool -c fc_host -v | grep port_state
    port_state          = "Online"
    port_state          = "Online"

How to identify the HBA cards/ports and WWN in Solaris

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值