博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
【转】How to check HBA host and its corresponding WWPN on RHEL 5, 6 or 7?
阅读量:3513 次
发布时间:2019-05-20

本文共 6859 字,大约阅读时间需要 22 分钟。

 SOLUTION UNVERIFIED - 已更新 2018年二月6日05:35 - 

环境

  • Red Hat Enterprise Linux 5
  • Red Hat Enterprise Linux 6
  • Red Hat Enterprise Linux 7
  • FC/FCoE Host Bus Adapter (QLogic, Emulex, Brocade, Cisco, etc.)

问题

  • How to check HBA host and its corresponding WWPN?
  • How do I lookup WWN of installed HBAs?
  • How do I locate the world wide number of an hba WWPN (world wide port name)?
  • How do I locate the world wide name of an hba?
  • How to find out which Port Name is being used by an HBA Fibre Channel port?
  • I need to associated my HBA ports WWPN within the Fibre Channel switch. How can I found out the correct name?

决议

 

  • For more information about setting up SAN storage refer to the appropriate storage guide:

    • RHEL5
    • RHEL6
    • RHEL7: .
  • The wwpn (world wide port name) and companion wwnn (world wide node name) of an hba within the current configuration are available within the sysfs tree, can be found using a find command and viewed either via systool command from sysfsutils package (#yum install sysfsutils), or via simple grep command:

$ find /sys/class/fc_host/*/ -name 'port_name'             << retrieve path to wwpn entry$ find /sys/class/fc_host/*/ -name 'node_name'             << retrieve path to wwnn entry$ grep -v "zZzZ" -H /sys/class/fc_host/host*/*_name/sys/class/fc_host/host6/fabric_name:0x100000051e900105    << switch port name, wwpn/sys/class/fc_host/host6/node_name:0x200000e08b87de9a      <<    HBA node name, wwnn/sys/class/fc_host/host6/port_name:0x210000e08b87de9a      <<    HBA port name, wwpn/sys/class/fc_host/host6/symbolic_name:QLE2462 FW:v7.03.00 DVR:v8.07.00.18.07.2-k:.In the case where it is insufficient to know just the WWNN/WWPN that exists for a scsi host and it is desired to know the actual pci address assigned to a particular scsi host -- then the following can be used:$ find ./sys/devices -type d -name 'host*' | egrep -v "host_busy|fc_host|scsi_host" | sort./sys/devices/pci0000:00/0000:00:01.0/0000:04:00.0/host4./sys/devices/pci0000:00/0000:00:04.0/0000:08:00.0/host10./sys/devices/pci0000:00/0000:00:05.0/0000:0b:00.0/host5./sys/devices/pci0000:00/0000:00:07.0/0000:0e:00.0/host8./sys/devices/pci0000:00/0000:00:07.0/0000:0e:00.1/host9./sys/devices/pci0000:00/0000:00:0a.0/0000:14:00.0/host6   <<   card pci address for host6/scsi6./sys/devices/pci0000:00/0000:00:0a.0/0000:14:00.1/host7:.$ systool -c fc_host -vClass = "fc_host"  Class Device = "host6"  Class Device path = "/sys/devices/pci0000:00/0000:00:0a.0/0000:14:00.0/host6/fc_host/host6"    dev_loss_tmo        = "45"    fabric_name         = "0x100000051e900105"             << switch port name, wwpn    issue_lip           =     max_npiv_vports     = "127"    node_name           = "0x200000e08b87de9a"             <<   HBA node name, wwnn    npiv_vports_inuse   = "0"    port_id             = "0x010300"    port_name           = "0x210000e08b87de9a"             <<   HBA port name, wwpn    port_state          = "Online"    port_type           = "NPort (fabric via point-to-point)"    speed               = "4 Gbit"    supported_classes   = "Class 3"    supported_speeds    = "1 Gbit, 2 Gbit, 4 Gbit"    symbolic_name       = "QLE2462 FW:v7.03.00 DVR:v8.07.00.18.07.2-k"    system_hostname     = ""    tgtid_bind_type     = "wwpn (World Wide Port Name)"    uevent              = :.
  • Additional information is available within , which discusses end-to-end transport identification (disk, scsi address, host [hba/pci address], switch port, storage port, lun). This references an unsupported/as-is utility called mapdevs that can be run on RHEL 5, 6, and 7 to display, among other things, an hba-to-storage wwn map.

# ./mapdevs -Hp#scsi_addr   name                   version                f/w                       device#----------- ---------------------- ---------------------- ------------------------- ----------------------------------------------: 6:*:*:*     qla2xxx                8.07.00.38.07.4-k1     8.06.00 (9496)            /sys/devices/pci0000:00/0000:00:0a.0/0000:14:00.0/host6 7:*:*:*     qla2xxx                8.07.00.38.07.4-k1     8.06.00 (9496)            /sys/devices/pci0000:00/0000:00:0a.0/0000:14:00.1/host7#            --------- PCI -------------#                          subsystem      model        model#scsi_addr   vendor device vendor device  name         description#----------- ------ ------ ------ ------  ------------ --------------------------------------------------: 6:*:*:*     0x1077 0x2432 0x1077 0x0138  QLE2462      PCI-Express Dual Channel 4Gb Fibre Channel HBA 7:*:*:*     0x1077 0x2432 0x1077 0x0138  QLE2462      PCI-Express Dual Channel 4Gb Fibre Channel HBA#scsi_addr   name               speed    state    symbolic_name                                  port_type#----------- ------------------ -------- -------- ---------------------------------------------- -----------------------------------------------: 6:*:*:*     qla2xxx            4 Gbit   Online   QLE2462 FW:v8.06.00 DVR:v8.07.00.38.07.4-k1    NPort (fabric via point-to-point) 7:*:*:*     qla2xxx            4 Gbit   Online   QLE2462 FW:v8.06.00 DVR:v8.07.00.38.07.4-k1    NPort (fabric via point-to-point):#SCSI               HBA                                             Fabric              Storage                                        Port#Addr          Luns wwnn               wwpn               portid    wwn                 wwnn               wwpn                portid  info#------------- ---- ------------------/------------------/--------  ------------------  ------------------/------------------/--------/---------    6:0:0:-          65 0x200000e08b87de9a 0x210000e08b87de9a 0x010300  0x100000051e900105  0x5001438005663d33 0x5001438005663d32 0x0a0400 FCP Target6:0:1:-          67 0x200000e08b87de9a 0x210000e08b87de9a 0x010300  0x100000051e900105  0x5001438005663d31 0x5001438005663d30 0x0a0500 FCP Target6:0:2:-           - 0x200000e08b87de9a 0x210000e08b87de9a 0x010300  0x100000051e900105  0x20000024ff0d7d65 0x21000024ff0d7d65 0x010800 FCP Target6:0:x:-           - 0x200000e08b87de9a 0x210000e08b87de9a 0x010300  0x100000051e900105  0x2000001018d6aa11 0x2001001018d6aa11 0x0a0e01 FCP Initiator6:0:x:-           - 0x200000e08b87de9a 0x210000e08b87de9a 0x010300  0x100000051e900105  0x200100e08ba7de9a 0x210100e08ba7de9a 0x010600 FCP Initiator6:0:x:-           - 0x200000e08b87de9a 0x210000e08b87de9a 0x010300  0x100000051e900105  0x20000090fa1927e8 0x10000090fa1927e8 0x0a0100 FCP Initiator6:0:x:-           - 0x200000e08b87de9a 0x210000e08b87de9a 0x010300  0x100000051e900105  0x20000090fa1927e9 0x10000090fa1927e9 0x0a0000 FCP Initiator6:0:x:-           - 0x200000e08b87de9a 0x210000e08b87de9a 0x010300  0x100000051e900105  0x20000090fa16f41e 0x10000090fa16f41e 0x010200 FCP Initiator6:0:x:-           - 0x200000e08b87de9a 0x210000e08b87de9a 0x010300  0x100000051e900105  0x20000090fa16f41f 0x10000090fa16f41f 0x010700 FCP Initiator:.
  • 产品(第)
  •  

转载地址:http://qwhmj.baihongyu.com/

你可能感兴趣的文章
C#常用的设计模式
查看>>
C#-快速排序算法
查看>>
docker 部署SpringBoot项目
查看>>
mybatis基础知识(四)&输入映射与输出映射
查看>>
gitflow工作流
查看>>
【MongoDB】update修改器($set、$unset、$inc、$push、$pull、$pop)
查看>>
JAVA 继承
查看>>
电脑键盘突然不能打字,很多键变成快捷键了
查看>>
Hbase表映射Hive表三种方法
查看>>
Java中获取List长度
查看>>
this关键字有什么用处?怎么用? 1.访问成员变量,区分成员变量和局部变量。 2.访问成员方法。 3.访问构造方法。 4.返回对当前对象的引用 5.将对当前对象的引用作为参数传递给其他方法。
查看>>
自学sql
查看>>
基于Springboot的社区开发项目
查看>>
nowcoder 左神算法1
查看>>
code刷题
查看>>
左神进阶2窗口
查看>>
dubbo入门
查看>>
http 错误类型
查看>>
一篇文章解决HTTP 请求头!
查看>>
学习日记02
查看>>