FC HBA,也即Fibre Channel Host Bus Adapter,光纖通道主機適配器,簡稱光纖適配器。node
在FC網絡環境中,主機須要和FC網絡、FC存儲設備(SAN磁盤陣列)鏈接時須要使用一種接口卡,就如同鏈接以太網須要以太網卡同樣,這種接口卡就叫作FC HBA,簡稱FC HBA卡。ios
和以太網卡的MAC地址同樣,HBA上也有獨一無二的標識,:WWN(World Wide Name),FC HBA上的WWN有兩種:網絡
① Node WWN(WWNN):每塊HBA有其獨有的Node WWN;oracle
② Port WWN(WWPN):每塊HBA卡上每一個port有其獨一無二的Port WWN。ide
因爲通訊是經過port進行的,所以多數狀況下須要使用WWPN而不是WWNN。 WWN的長度爲8bytes,用16進製表示並用冒號分隔,例如:50:06:04:81:D6:F3:45:42spa
RedHatLinux as4和Linux as5下查看的地方不同:
RedHatLinux as4下查看:
cat /proc/scsi/qla2xx/1
RedHatLinux as5下查看:
cd /sys/class/fc_host/hostx/1
[root@host1]# cat node_name
0x20000000c97084q4 --WWNN號
[root@host1]# cat port_name
0x10000000c97084q4 --WWPN號
Aix下查看
查看HBA名和數量,有兩個命令均可以查看獲得:
prtconf和lsdev命令:
# prtconf|grep fc
+ fcs2 U7879.001.DQD629X-P1-C5-T1 FC Adapter
* fcnet2 U7879.001.DQD629X-P1-C5-T1 Fibre Channel Network Protocol
Device
+ fcs1 U7879.001.DQDZZCR-P1-C5-T1 FC Adapter
* fcnet1 U7879.001.DQDZZCR-P1-C5-T1 Fibre Channel Network Protocol
Device
+ fcs0 U7879.001.DQD630D-P1-C2-T1 FC Adapter
* fcnet0 U7879.001.DQD630D-P1-C2-T1 Fibre Channel Network Protocol
Device
# lsdev -Cc adapter|grep fcs
fcs0 Available 0F-08 FC Adapter
fcs1 Available 0G-08 FC Adapter
fcs2 Available 0H-08 FC Adapter
查看HBA卡WWN號,這裏也能夠用兩具命令:lscfg和fcstat,fcstat命令看到的信息更爲詳細,能查看到當前運行的狀態:
# lscfg -vpl fcs0
fcs0 U7879.001.DQD630D-P1-C2-T1 FC Adapter
Part Number.................03N5014
EC Level....................A
Serial Number...............1B74704D6A
Manufacturer................001B
Customer Card ID Number.....280D
FRU Number.................. 03N5014
Device Specific.(ZM)........3
Network Address.............10000000C96E113C
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)........06C32138
Device Specific.(Z7)........07C32138
Device Specific.(Z8)........20000000C96E113C
Device Specific.(Z9)........BS2.10X8
Device Specific.(ZA)........B1D2.10X8
Device Specific.(ZB)........B2D2.10X8
Device Specific.(ZC)........00000000
Hardware Location Code......U7879.001.DQD630D-P1-C2-T1
PLATFORM. SPECIFIC
Name: fibre-channel
Model: LP11000
Node: fibre-channel@1
Device Type: fcp
Physical Location: U7879.001.DQD630D-P1-C2-T1
# fcstat fcs0
FIBRE CHANNEL STATISTICS REPORT: fcs0
Device Type: FC Adapter (df1000fd)
Serial Number: 1B74704D6A
Option ROM Version: 02C82138
Firmware Version: B1D2.10X8
World Wide Node Name: 0x20000000C96E113C
World Wide Port Name: 0x10000000C96E113C
FC-4 TYPES:
Supported: 0x0000012000000000000000000000000000000000000000000000000000000000
Active: 0x0000010000000000000000000000000000000000000000000000000000000000
Class of Service: 3
Port Speed (supported): 4 GBIT
Port Speed (running): 4 GBIT
Port FC ID: 0x011000
Port Type: Fabric
Seconds Since Last Reset: 420651
Transmit Statistics Receive Statistics
------------------- ------------------
Frames: 18892136 378709011
Words: 3987421184 189917300736
LIP Count: 0
NOS Count: 0
Error Frames: 0
Dumped Frames: 0
Link Failure Count: 0
Loss of Sync Count: 6
Loss of Signal: 0
Primitive Seq Protocol Error Count: 0
Invalid Tx Word Count: 59
Invalid CRC Count: 0
IP over FC Adapter Driver Information
No DMA Resource Count: 0
No Adapter Elements Count: 0
FC SCSI Adapter Driver Information
No DMA Resource Count: 0
No Adapter Elements Count: 0
No Command Resource Count: 0
IP over FC Traffic Statistics
Input Requests: 0
Output Requests: 0
Control Requests: 0
Input Bytes: 0
Output Bytes: 0
FC SCSI Traffic Statistics
Input Requests: 10636470
Output Requests: 684523
Control Requests: 172
Input Bytes: 750300606877
Output Bytes: 15133936176
HP UX 下查看
#[/oracle]ioscan -fnCfc
Class I H/W Path Driver S/W State H/W Type Description
=================================================================
fc 0 1/0/6/1/0 td CLAIMED INTERFACE HP Tachyon XL2 Fibre Channel Mass Storage Adapter
/dev/td0
fc 1 1/0/8/1/0 td CLAIMED INTERFACE HP Tachyon XL2 Fibre Channel Mass Storage Adapter
/dev/td1
fc 2 1/0/10/1/0 td CLAIMED INTERFACE HP Tachyon XL2 Fibre Channel Mass Storage Adapter
/dev/td2
#[/oracle]fcmsutil /dev/td0
Vendor ID is = 0x00103c
Device ID is = 0x001029
XL2 Chip Revision No is = 2.3
PCI Sub-system Vendor ID is = 0x00103c
PCI Sub-system ID is = 0x00128c
Topology = PTTOPT_FABRIC
Link Speed = 2Gb
Local N_Port_id is = 0x610c13
N_Port Node World Wide Name = 0x50060b00003005a7
N_Port Port World Wide Name = 0x50060b00003005a6
Driver state = ONLINE
Hardware Path is = 1/0/6/1/0
Number of Assisted IOs = 408139267
Number of Active Login Sessions = 1
Dino Present on Card = NO
Maximum Frame. Size = 2048
Driver Version = @(#) td - HP Fibre Channel Tachyon TL/TS/XL2 Driver B.11.31.04
/ux/core/isu/TL/kern/src/common/td/td_drvinit.c: Jan 20 2008, 10:54:21
加上vpd命令能夠看到HBA卡廠商信息:
#[/oracle]fcmsutil /dev/td0 vpd
V I T A L P R O D U C T D A T A
--------- ------------- -------
Product Discription :'A6795A 2Gbps/1Gbps Fibre Channel 4X PCI HBA'
Part number :'A6795-62002'
Engineering Date Code :'B-4434'
Part Serial number :'A56A00295945'
Misc. Information :'PW=15W'
Mfd. Date :'A-4510'
Check Sum : 0x48
EFI version : '001.10'
Asset Tag :'NA'orm