免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 5051 | 回复: 3
打印 上一主题 下一主题

使用系统命令在Redhat Server查看HBA和WWN的方法 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2011-01-30 18:14 |只看该作者 |倒序浏览
在redhat下查看wwn是件麻烦事,有的人说用vendor自带的工具查,有的说可以看/proc/scsi/下的某个目录文件,偏偏我遇到的,这些都看不见,虽然使用的是QLogic,但是系统没安装,未经许可也不方便随便安装这些软件,只能另想办法。

查了很多资料,终于知道有个命令systool可以实现

[ tmp]# systool -c fc_host -v
Class = "fc_host"

  Class Device = "host13"
  Class Device path = "/sys/class/fc_host/host13"
    fabric_name         = "0xxxxxxxxxxxxx"
    issue_lip           = <store method only>
    node_name           = "0xxxxxxxxxxx"
    port_id             = "0x331400"
    port_name           = "0xxxxxxxxxxx"
    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       = "QLE2460 FW:v4.04.09 DVR:v8.03.01.04.05.05-k"
    system_hostname     = ""
    tgtid_bind_type     = "wwpn (World Wide Port Name)"
    uevent              = <store method only>

    Device = "host13"
    Device path = "/sys/devices/pci0000:00/0000:00:0a.0/0000:02:00.0/host13"
      ct                  =
      els                 =
      fw_dump             =
      nvram               = "ISP "
      optrom_ctl          = <store method only>
      optrom              =
      reset               = <store method only>
      sfp                 = ""
      uevent              = <store method only>
      vpd                 = "?0"


  Class Device = "host14"
  Class Device path = "/sys/class/fc_host/host14"
    fabric_name         = "0xxxxxxxxxxx"
    issue_lip           = <store method only>
    node_name           = "0xxxxxxxxxxx"
    port_id             = "0x331400"
    port_name           = "0xxxxxxxxxxx"
    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       = "QLE2460 FW:v4.04.09 DVR:v8.03.01.04.05.05-k"
    system_hostname     = ""
    tgtid_bind_type     = "wwpn (World Wide Port Name)"
    uevent              = <store method only>

    Device = "host14"
    Device path = "/sys/devices/pci0000:80/0000:80:0b.0/0000:81:00.0/host14"
      ct                  =
      els                 =
      fw_dump             =
      nvram               = "ISP "
      optrom_ctl          = <store method only>
      optrom              =
      reset               = <store method only>
      sfp                 = ""
      uevent              = <store method only>
      vpd                 = "?0"
     

可以看出os把两个hba识别为host13和host14(嗯~~风格和solaris很不一样)。一般情况下,一个卡
的node_name和port_name 就是指该HBA卡的wwn,他们的值是一样的。速度啊什么的该列的参数都给你列出来了。

还有一个借助systool能看到你的hba卡和哪些设备连接(或者说能看到哪些存储)。


[tmp]# systool -c fc_remote_ports -v|more
Class = "fc_remote_ports"

  Class Device = "0-0"
  Class Device path = "/sys/class/fc_remote_ports/rport-13:0-0"
    dev_loss_tmo        = "60"
    fast_io_fail_tmo    = "off"
    node_name           = "0xxxxxxxxxxxx"
    port_id             = "0x330400"
    port_name           = "0xxxxxxxxxxx"
    port_state          = "Online"
    roles               = "FCP Initiator"
    scsi_target_id      = "-1"
    supported_classes   = "Class 3"
    uevent              = <store method only>
....

论坛徽章:
1
天秤座
日期:2013-10-23 13:20:42
2 [报告]
发表于 2011-01-30 20:48 |只看该作者
你说的是 cat /sys/class/fc_host/host#/port_name
这个有时候,没有,和pc server的型号似乎有关

招聘 : 技术支持/维
论坛徽章:
0
3 [报告]
发表于 2011-01-31 09:16 |只看该作者
但是不一定所有的 HBA 卡的 WWN 都能查看到,要看具体的驱动是不是提供了查询的功能

论坛徽章:
0
4 [报告]
发表于 2011-02-02 22:04 |只看该作者
不一定所有的 HBA 卡的 WWN 都能查看到,要看具体的驱动是不是提供了查询的功能
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP