常用作業系統檢視主機的WWN號碼

路途中的人2012發表於2016-06-24
FC HBA,也即Fibre Channel Host Bus Adapter,光纖通道主機介面卡,簡稱光纖介面卡。
在FC網路環境中,主機需要和FC網路、FC儲存裝置(SAN磁碟陣列)連線時需要使用一種介面卡,就如同連線乙太網需要乙太網卡一樣,這種介面卡就叫做FC HBA,簡稱FC HBA卡。
和乙太網卡的MAC地址一樣,HBA上也有獨一無二的標識,:WWN(World Wide Name),FC HBA上的WWN有兩種:
① Node WWN(WWNN):每塊HBA有其獨有的Node WWN;
② Port WWN(WWPN):每塊HBA卡上每個port有其獨一無二的Port WWN。
由於通訊是透過port進行的,因此多數情況下需要使用WWPN而不是WWNN。 WWN的長度為8bytes,用16進製表示並用冒號分隔,例如:50:06:04:81:D6:F3:45:42

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號.

VMWARE ESX3.5

vmware EXS3.5
[root@EXS3 root]# more /proc/scsi/lpfc/2
Emulex LightPulse FC SCSI elx_7.4.0.13-2
IBM 42C2069 4Gb 1-Port PCIe FC HBA for System x on PCI bus 10 device 00 irq 153
BoardNum: 0
SerialNum: 11S43W7509YK10278318TM
Firmware Version: 2.50A6 (Z2D2.50A6)
Hdw: 2057706d
VendorId: 0xfe0010df
Portname: 10:00:00:00:c9:52:94:0a Nodename: 20:00:00:00:c9:52:94:0a

Link Down
[root@EXS3 root]#

from:http://hi.baidu.com/chance_gao/blog/item/c8beb7fb5dc3ec2a4e4aea47.html

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29067253/viewspace-2120882/,如需轉載,請註明出處,否則將追究法律責任。

相關文章