欢迎来到之路教程(on itroad-com)
方法2:使用systool
查找有关 HBA 的信息的另一个有用命令是 systool 。
如果尚未安装,我们可能需要安装 sysfsutils 包。
# yum install sysfsutils
要检查可用的 HBA 端口:
# systool -c fc_host Class = "fc_host" Class Device = "host2" Device = "host2" Class Device = "host3" Device = "host3"
要查找 HBA 端口的 WWN:
# systool -c fc_host -v | grep port_name port_name = "0x500143802426baf4" port_name = "0x500143802426baf6"
要检查 HBA 端口的状态(在线/离线):
# systool -c fc_host -v | grep port_state port_state = "Online" port_state = "Online"
有多个命令可用于确定光纤通道 (FC) HBA 的 WWN 及其状态(在线/离线)。
这篇文章讨论了几个最常用的方法。
方法1
要查找系统上安装的 HBA 卡,请使用:
# 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)
要检查可用的 HBA 端口:
# ls -l /sys/class/fc_host total 0 drwxr-xr-x 3 root root 0 Nov 3 2015 host2 drwxr-xr-x 3 root root 0 Nov 3 2015 host3
要查找 HBA 端口的状态(在线/离线):
# more /sys/class/fc_host/host?/port_state :::::::::::::: /sys/class/fc_host/host2/port_state :::::::::::::: Online :::::::::::::: /sys/class/fc_host/host3/port_state :::::::::::::: Online
要查找上述端口的 WWN 号:
# more /sys/class/fc_host/host?/port_name :::::::::::::: /sys/class/fc_host/host2/port_name :::::::::::::: 0x500143802426baf4 :::::::::::::: /sys/class/fc_host/host3/port_name :::::::::::::: 0x500143802426baf6
日期:2020-09-17 00:13:40 来源:oir作者:oir