免费注册 查看新帖 |

Chinaunix

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

怎么查看光纤卡的WWN? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-04-28 17:29 |只看该作者 |倒序浏览
如题

论坛徽章:
0
2 [报告]
发表于 2007-04-28 17:37 |只看该作者
run 'luxadm -e dump_map <HBA device path>'

Example:

# luxadm -e dump_map /devices/pci@8,600000/SUNW,qlc@2/fp@0,0:devctl.out

Pos AL_PA ID Hard_Addr Port WWN         Node WWN         Type
0     1   7d    0      21000003ba864591 20000003ba864591 0x1f (Unknown Type,Host Bus Adapter) <----- HBA WWN
1     ef  0     ef     21000014c3503f02 20000014c3503f02 0x0  (Disk device)
2     e8  1     e8     2100000c50fd3c4c 2000000c50fd3c4c 0x0  (Disk device)
3     e4  2     e4     2100000c50fd3bcb 2000000c50fd3bcb 0x0  (Disk device)
4     dc  6     dc     50800200002054d1 50800200002054d0 0xd  (SES device)
5     e2  3     e2     2100000c50fd40e7 2000000c50fd40e7 0x0  (Disk device)
6     e1  4     e1     2100000c50fd786a 2000000c50fd786a 0x0  (Disk device)
7     e0  5     e0     2100000c50fd4034 2000000c50fd4034 0x0  (Disk device)

论坛徽章:
0
3 [报告]
发表于 2007-04-28 18:02 |只看该作者
楼上正解!如果是通过光纤交换机连接阵列,则还可以用switchshow查看!

论坛徽章:
2
双鱼座
日期:2014-02-23 12:10:03操作系统版块每日发帖之星
日期:2015-12-17 06:20:00
4 [报告]
发表于 2007-04-28 20:26 |只看该作者
# luxadm -e port
/devices/pci@8,600000/SUNW,qlc@2/fp@0,0:devctl CONNECTED

# luxadm -e dump_map /devices/pci@8,600000/SUNW,qlc@2/fp@0,0:devctl

论坛徽章:
0
5 [报告]
发表于 2007-04-29 00:11 |只看该作者
Document Audience: SPECTRUM
Document ID: 76953
Title: Sun StorEdge[TM] SAN Software: How to Get the WWN of Sun FiberChannel HBAs for LUN Masking
Copyright Notice: Copyright &copy; 2005 Sun Microsystems, Inc. All Rights Reserved
Update Date: Mon Aug 15 00:00:00 MDT 2005
Products:  Sun StorEdge SAN 4.3 Software,  Storage Area Network (SAN),  Sun StorEdge SAN 4.4.1 Software,  Sun StorEdge SAN 4.4 Software,  Sun StorEdge SAN 4.2 Software,  Sun StorEdge SAN 4.0 Software,  Sun StorEdge 4.4.3 SAN Software,  Sun StorEdge SAN 4.1 Software
Technical Areas:  RAID (Redundant Array of Independent Disks),  Administration,  Boot,  Fibre Host Bus Adapter (HBA),  OBP (OpenBoot PROM),  Commands

--------------------------------------------------------------------------------


--------------------------------------------------------------------------------

Keyword(s):leadville, hba, wwn, lun masking

Description: Top

The Sun FiberChannel Host Bus Adapters (HBAs) do not report their World Wide Number (WWN) during the boot cycle. Therefore, acquiring the WWN of the HBA is not straight forward during setup. There are several ways to find the WWN. This document is an attempt to consolidate these methods in one location.

Document Body: Top

Method 1

The WWN is stamped on the HBA. Record the WWN prior to inserting the HBA into the system.

Method 2

The Storage Area Network (SAN) foundation software must be installed for this method to work. If you already have a device attached to the HBA, you can get the WWN using 'luxadm' commands. The steps, with an example, are as follows:

1) Use luxadm to display the path:

     # luxadm -e port

Found path to 1 HBA ports

      /devices/pci@4,4000/SUNW,qlc@4/fp@0,0:devctl    CONNECTED

NOTE: If the path does not report CONNECTED, it means that no devices are attached to the HBA. Therefore, the following 'luxadm dump_map' command will not report the WWN for the HBA.

2) Using the path shown in the previous command, use 'luxadm' to report the WWN:

     # luxadm -e dump_map /devices/pci@4,4000/SUNW,qlc@4/fp@0,0:devctl

     Pos AL_PA ID Hard_Addr Port WWN         Node WWN       Type

     0     2   7c    0   210000e08b05b4c1 200000e08b05b4c1 0x1f (Unknown Type)
     1     d9  8     d9  50020f230000a81b 50020f200000a81b 0x0  (Disk device)
     2     1   7d    0   210000e08b052b82 200000e08b052b82 0x1f (Unknown Type,
                                                                 Host Bus Adapter)

Note: The HBA is the device notated as "(Unknown Type, Host Bus Adapter)." The Port and Node WWN are reported. The Port WWN is the number to use for LUN-masking.

In this example, the WWN of the HBA is 210000e08b052b82.

Method 3

If no devices are connected to the HBA port, connect a cable from the HBA port to a switch port. The switch reports the WWN of any device connected to the port. The command to display the HBA's WWN will vary depending upon the switch type.

Method 4

The WWN is reported at the "ok" prompt as part of the device properties. This method requires the host to be shutdown. Ensure HBA firmware is up to date prior to use of this method.

1) If the system is not at the "ok" prompt, execute the following:

     # init 0

2) Once at the "ok" prompt:

       ok  cd /devices/pci@4,4000/SUNW,qlc@4
       ok  .properties

This is an example of the output. You can see the 'port-wwn' is listed.

       assigned-addresses       81022010 00000000 00002000 00000000 00000100
                                82022014 00000000 00200000 00000000 00002000
                                82022030 00000000 00220000 00000000 00020000
       port-wwn                 21 01 00 e0 8b 27 25 4f
       node-wwn                 20 00 00 e0 8b 27 25 4f
       reg                      00022000 00000000 00000000 00000000 00000000
                                01022010 00000000 00000000 00000000 00000100
                                02022014 00000000 00000000 00000000 00001000
       compatible               pci1077,2200.1077.4083.5
                                pci1077,2200.1077.4083
                                pci1077,4083
                                pci1077,2200.5
                                pci1077,2200
                                pciclass,010000
                                pciclass,0100
       manufacturer             QLGC
       #size-cells              00000000
       #address-cells           00000002
       device_type              scsi-fcp
       name                     SUNW,qlc
       version                  ISP2200 Host Adapter Driver: 1.14.02 05/28/03                                    
       fcode-rom-offset         00000000   

Method 5

To receive the WWN from the following command, make sure that the SFK ( SAN Foundation Kit ), its patches and all applicable HBA firmware are installed. Your system will need to rebooted with the reconfigure option.

prtconf -vp|grep -i wwn - will provide the wwn of all configured HBAs on the system this is a snapshot of what the prom saw at boot.

#prtconf -vp|grep -i wwn
port-wwn: 210000e0.8b0706a7

node-wwn: 200000e0.8b0706a7

port-wwn: 210100e0.8b2706a7

node-wwn: 200000e0.8b2706a7

port-wwn: 210100e0.8b243b0f

node-wwn: 210100e0.8b243b0f

port-wwn: 210000e0.8b043b0f

node-wwn: 210000e0.8b043b0f

Method 6

PRTPICL (get HBA properties, including WWN if "NOT CONNECTED" in 'luxadm -e port')

prtpicl -v -c scsi-fcp (for just Sun QLogic & Sun Emulex) } prtpicl will not show Emulex WWN (6297103)

prtpicl -v -c scsi (for just Sun JNI) } Use 'prtconf -vp' to get Ivory WWN (4981437)

论坛徽章:
4
技术图书徽章
日期:2013-09-23 10:22:37狮子座
日期:2013-10-15 23:31:54卯兔
日期:2013-11-11 17:33:15金牛座
日期:2013-11-15 17:25:28
6 [报告]
发表于 2007-04-29 09:05 |只看该作者
dmesg | grep WW

就能看到WWPN跟WWNN

论坛徽章:
0
7 [报告]
发表于 2007-04-29 12:02 |只看该作者
谢谢老大们的回复
四平兄这个文档讲得真详细,是怎么搜出来的啊

论坛徽章:
0
8 [报告]
发表于 2007-04-29 14:31 |只看该作者
四平,真实高人啊。。。。请问文档出自哪里?我也想知道。

谢谢

论坛徽章:
0
9 [报告]
发表于 2010-08-30 17:16 |只看该作者
# luxadm -e port
/devices/pci@8,600000/SUNW,qlc@2/fp@0,0:devctl CONNECTED

# luxadm -e dump_map  ...
东方蜘蛛 发表于 2007-04-28 20:26



    同意

论坛徽章:
2
双鱼座
日期:2014-02-23 12:10:03操作系统版块每日发帖之星
日期:2015-12-17 06:20:00
10 [报告]
发表于 2010-08-30 18:57 |只看该作者
又来一位挖祖坟的
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP