博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
如何查看WWN号
阅读量:6711 次
发布时间:2019-06-25

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

如何查看WWN号  

WWN即World Wide Name,用来标识网络上的一个连接或连接集合,主要用于FC和SAS。就像网卡的MAC地址一样,WWN是用在光纤网络的。

 

 
  如何查看WWN号
如何查看WWN号 - pete - DOORGODS
如何查看WWN号 - pete - DOORGODS
AIX:
    1,获得AIX主机连接的光纤设备:
       # lsdev -Cc adapter -S a | grep fcs
        fcs0      Available 09-08 FC Adapter
        fcs1      Available 09-09 FC Adapter
    其中,显示有两块光纤卡.fcs0和fcs1
    2,查看光纤卡的WWN号
       # lscfg -vpl fcs0
  fcs0             U787B.001.DNWG664-P1-C1-T1  FC Adapter
        Part Number.................10N8620
        Serial Number...............1B74404468
        Manufacturer................001B
        EC Level....................A
        Customer Card ID Number.....5759
        FRU Number.................. 10N8620
        Device Specific.(ZM)........3
        
Network Address.............10000000C96E2898
        ROS Level and ID............02C82138
        Device Specific.(Z0)........1036406D
        Device Specific.(Z1)........00000000
        Device Specific.(Z2)........00000000
        Device Specific.(Z3)........03000909
        Device Specific.(Z4)........FFC01159
        Device Specific.(Z5)........02C82138
        Device Specific.(Z6)........06C12138
        Device Specific.(Z7)........07C12138
        Device Specific.(Z8)........20000000C96E2898
        Device Specific.(Z9)........BS2.10X8
        Device Specific.(ZA)........B1F2.10X8
        Device Specific.(ZB)........B2F2.10X8
        Device Specific.(ZC)........00000000
        Hardware Location Code......U787B.001.DNWG664-P1-C1-T1
    其中标红的部分就是光纤卡的WWN号
    
HP-Unix:
    1,列出HP机上连接的光纤卡设备:
        # ioscan -fnC fc
Class     I  H/W Path  Driver S/W State   H/W Type     Description
=================================================================
fc        0  0/3/1/0   fcd  CLAIMED     INTERFACE    HP A6826-60001 2Gb Dual Port PCI/PCI-X Fibre Channel Adapter (FC Port 1)
                      /dev/fcd0
fc        1  0/3/1/1   fcd  CLAIMED     INTERFACE    HP A6826-60001 2Gb Dual Port PCI/PCI-X Fibre Channel Adapter (FC Port 2)
                      /dev/fcd1
    由此图可以看到,/dev/fcd0和/dev/fcd1是两个光纤卡
    2, 查看光纤卡的WWN号
       # fcmsutil /dev/fcd0
                           Vendor ID is = 0x001077
                           Device ID is = 0x002312
            PCI Sub-system Vendor ID is = 0x00103c
                   PCI Sub-system ID is = 0x0012ba
                               PCI Mode = PCI-X 133 MHz
                       ISP Code version = 3.3.18
                       ISP Chip version = 3
                               Topology = PTTOPT_FABRIC
                             Link Speed = 2Gb
                     Local N_Port_id is = 0xa10500
                  Previous N_Port_id is = None
            
N_Port Node World Wide Name = 0x50060b00001db241

            N_Port Port World Wide Name = 0x50060b00001db240

            Switch Port World Wide Name = 0x205e000dec0e2e00

            Switch Node World Wide Name = 0x2001000dec0e2e01
                           Driver state = ONLINE
                       Hardware Path is = 0/3/1/0
                     Maximum Frame Size = 2048
         Driver-Firmware Dump Available = NO
         Driver-Firmware Dump Timestamp = N/A
                         Driver Version = @(#) libfcd.a HP Fibre Channel ISP 23xx & 24xx Driver B.11.23.04 /ux/core/isu/FCD/kern/src/common/wsio/fcd_init.c:Oct 18 2005,08:21:11
    其中红色部分显示了HBA卡的WWNN和WWPN号,另外还能看到该HBA卡连接的光纤交换机端口的WWN号
Solaris:
    solaris上用luxadm命令来管理存储设备以及光纤相关设备.
    1, 查询现有存储设备和光纤设备,可以读到包括磁盘设备的WWN号
        # luxadm probe
    2, 查看HBA的prot,可以得到HBA卡的port值以及连接属性:
       # luxadm -e port
        /devices/pci@0,0/pci1022,7450@2/pci1077,101@1/fp@0,0:devctl          NOT CONNECTED
        /devices/pci@0,0/pci1022,7450@2/pci1077,101@1,1/fp@0,0:devctl      CONNECTED
    从中可以看到仅有一块光纤卡连接到存储设备
    3, 选择那个已经连接的HBA卡,查看其WWN号
       格式: # luxadm -e dump_map 设备port.其中port值可从步骤2得到.如下图啊所示:
       # luxadm -e dump_map /devices/pci@0,0/pci1022,7450@2/pci1077,101@1/fp@0,0:devctl
Pos  Port_ID Hard_Addr Port WWN         Node WWN         Type
0    0       0        210000e08b19827a 200000e08b19827a 0x1f (Unknown Type,Host Bus Adapter)
Redhat:
    在Redhat中,设备管理的相关信息都保存在内核中,即/proc目录.所以我们一般查询CPU,内存,磁盘等信息,也是在该目录下. 其中HBA卡相关信息保存在/proc/scsi/qla2300/目录下,不同设备对应不同的文件名,例如
    # grep scsi /proc/scsi/qla2300/1
    Number of reqs in pending_q= 0, retry_q= 0, done_q= 0, scsi_retry_q= 0
    scsi-qla0-adapter-node=200000e08b9cf661;
    scsi-qla0-adapter-port=210000e08b9cf661;
    就可以查到系统第一块HBA卡的WWNN和WWPN号.
   
如何查看WWN号 - pete - DOORGODS
如何查看WWN号 - pete - DOORGODS
AIX:
    1,获得AIX主机连接的光纤设备:
       # lsdev -Cc adapter -S a | grep fcs
        fcs0      Available 09-08 FC Adapter
        fcs1      Available 09-09 FC Adapter
    其中,显示有两块光纤卡.fcs0和fcs1
    2,查看光纤卡的WWN号
       # lscfg -vpl fcs0
  fcs0             U787B.001.DNWG664-P1-C1-T1  FC Adapter
        Part Number.................10N8620
        Serial Number...............1B74404468
        Manufacturer................001B
        EC Level....................A
        Customer Card ID Number.....5759
        FRU Number.................. 10N8620
        Device Specific.(ZM)........3
        Network Address.............10000000C96E2898
        ROS Level and ID............02C82138
        Device Specific.(Z0)........1036406D
        Device Specific.(Z1)........00000000
        Device Specific.(Z2)........00000000
        Device Specific.(Z3)........03000909
        Device Specific.(Z4)........FFC01159
        Device Specific.(Z5)........02C82138
        Device Specific.(Z6)........06C12138
        Device Specific.(Z7)........07C12138
        Device Specific.(Z8)........20000000C96E2898
        Device Specific.(Z9)........BS2.10X8
        Device Specific.(ZA)........B1F2.10X8
        Device Specific.(ZB)........B2F2.10X8
        Device Specific.(ZC)........00000000
        Hardware Location Code......U787B.001.DNWG664-P1-C1-T1
    其中标红的部分就是光纤卡的WWN号
    
HP-Unix:
    1,列出HP机上连接的光纤卡设备:
        # ioscan -fnC fc
Class     I  H/W Path  Driver S/W State   H/W Type     Description
=================================================================
fc        0  0/3/1/0   fcd  CLAIMED     INTERFACE    HP A6826-60001 2Gb Dual Port PCI/PCI-X Fibre Channel Adapter (FC Port 1)
                      /dev/fcd0
fc        1  0/3/1/1   fcd  CLAIMED     INTERFACE    HP A6826-60001 2Gb Dual Port PCI/PCI-X Fibre Channel Adapter (FC Port 2)
                      /dev/fcd1
    由此图可以看到,/dev/fcd0和/dev/fcd1是两个光纤卡
    2, 查看光纤卡的WWN号
       # fcmsutil /dev/fcd0
                           Vendor ID is = 0x001077
                           Device ID is = 0x002312
            PCI Sub-system Vendor ID is = 0x00103c
                   PCI Sub-system ID is = 0x0012ba
                               PCI Mode = PCI-X 133 MHz
                       ISP Code version = 3.3.18
                       ISP Chip version = 3
                               Topology = PTTOPT_FABRIC
                             Link Speed = 2Gb
                     Local N_Port_id is = 0xa10500
                  Previous N_Port_id is = None
            N_Port Node World Wide Name = 0x50060b00001db241
            N_Port Port World Wide Name = 0x50060b00001db240
            Switch Port World Wide Name = 0x205e000dec0e2e00
            Switch Node World Wide Name = 0x2001000dec0e2e01
                           Driver state = ONLINE
                       Hardware Path is = 0/3/1/0
                     Maximum Frame Size = 2048
         Driver-Firmware Dump Available = NO
         Driver-Firmware Dump Timestamp = N/A
                         Driver Version = @(#) libfcd.a HP Fibre Channel ISP 23xx & 24xx Driver B.11.23.04 /ux/core/isu/FCD/kern/src/common/wsio/fcd_init.c:Oct 18 2005,08:21:11
    其中红色部分显示了HBA卡的WWNN和WWPN号,另外还能看到该HBA卡连接的光纤交换机端口的WWN号
Solaris:
    solaris上用luxadm命令来管理存储设备以及光纤相关设备.
    1, 查询现有存储设备和光纤设备,可以读到包括磁盘设备的WWN号
        # luxadm probe
    2, 查看HBA的prot,可以得到HBA卡的port值以及连接属性:
       # luxadm -e port
        /devices/pci@0,0/pci1022,7450@2/pci1077,101@1/fp@0,0:devctl          NOT CONNECTED
        /devices/pci@0,0/pci1022,7450@2/pci1077,101@1,1/fp@0,0:devctl      CONNECTED
    从中可以看到仅有一块光纤卡连接到存储设备
    3, 选择那个已经连接的HBA卡,查看其WWN号
       格式: # luxadm -e dump_map 设备port.其中port值可从步骤2得到.如下图啊所示:
       # luxadm -e dump_map /devices/pci@0,0/pci1022,7450@2/pci1077,101@1/fp@0,0:devctl
Pos  Port_ID Hard_Addr Port WWN         Node WWN         Type
0    0       0        210000e08b19827a 200000e08b19827a 0x1f (Unknown Type,Host Bus Adapter)
Redhat:
    在Redhat中,设备管理的相关信息都保存在内核中,即/proc目录.所以我们一般查询CPU,内存,磁盘等信息,也是在该目录下. 其中HBA卡相关信息保存在/proc/scsi/qla2300/目录下,不同设备对应不同的文件名,例如
    # grep scsi /proc/scsi/qla2300/1
    Number of reqs in pending_q= 0, retry_q= 0, done_q= 0, scsi_retry_q= 0
    scsi-qla0-adapter-node=200000e08b9cf661;
    scsi-qla0-adapter-port=210000e08b9cf661;
    就可以查到系统第一块HBA卡的WWNN和WWPN号.

 本文转自 pk2008 51CTO博客,原文链接:http://blog.51cto.com/837244/1104291

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

你可能感兴趣的文章
Azure China (12) 域名备案问题
查看>>
STM32 常用GPIO操作函数记录
查看>>
XML:使用DOM技术解析xML文件中的城市,实现select级联选择
查看>>
JQuery:JQuery添加元素
查看>>
图解GitHub基本操作
查看>>
linux集群时间同步搭建
查看>>
C++12.1.4 类的前向声明、不完全类型类
查看>>
H5以及Node读取excel
查看>>
Nginx基础篇(1)- Nginx的快速搭建和基本参数
查看>>
opencv python K-Means聚类
查看>>
从DevOps到AIOps,阿里如何实现智能化运维?
查看>>
Vue中的RouteMock实现思路及其问题
查看>>
前端每日实战:25# 视频演示如何用纯 CSS 创作一个慧星拖尾效果的 loader 动画...
查看>>
2018年第18周-Java语言思想-并发
查看>>
Node.js EventEmitter解读
查看>>
innodb事务隔离级别及实现机制
查看>>
分布式服务Dubbo的前世今生
查看>>
Forge模型转换和网页浏览在Android上的实践
查看>>
对React Native中Reduce理解
查看>>
greenDao多表关联
查看>>