您好,欢迎来到星星旅游。
搜索
您的当前位置:首页Linux下查看FC HBA信息

Linux下查看FC HBA信息

来源:星星旅游


查看FC HBA卡信息的方法

在配置磁盘阵列或虚拟磁带库时,往往会以FC接口与主机对接,那么就涉及FC HBA卡的查看,本文就这个问题进行了总结与整理。

一、Windows 系统

在Windows系统中,可以使用FC HBA卡厂家提供的管理软件查看光纤适配器的WWN号码,具体如下:

Qlogic:SANsurfer

Emulex:HBAnyware

二、SuSE Linux 9

查看 /proc/scsi/qla2xxx/* ,并以 adapter-port 为关键字过滤即可查看FC HBA卡的WWN信息:

# cat /proc/scsi/qla2xxx/* | grep adapter-port

scsi-qla0-adapter-port=21000018822c8a2c;

scsi-qla1-adapter-port=21000018822c8a2d;

三、SuSE Linux 10

查看 /sys/class/fc_host/host*/port_name 文件的内容即可看到对应FC HBA卡的WWN信息:

# cat /sys/class/fc_host/host*/port_name

0x210000e08b907955

0x210000e08b902856

四、RedHat Linux AS4

# grep scsi /proc/scsi/qla2xxx/3

Number of reqs in pending_q= 0, retry_q= 0, done_q= 0, scsi_retry_q= 0

scsi-qla0-adapter-node=20000018822d7834;

scsi-qla0-adapter-port=21000018822d7834;

scsi-qla0-target-0=202900a0b8423858;

scsi-qla0-port-0=200800a0b8423858:202900a0b8423858:0000e8:1;

五、RedHat Linux AS5

# cat /sys/class/fc_host/hostx/port_name

六、Solaris 10

提供了fcinfo命令,可以使用 fcinfo hba-port 查看FC HBA的WWN信息:

# fcinfo hba-port

查看光纤卡端口的路径及连接状态:

# luxadm -e port

查看端口的WWN:

# luxadm -e dump_map fibre_channel_HBA_port // 上一命令的输出

# prtconf –vp | grep -i wwn

# prtpicl –v | grep -i wwn (prtpicl - print PICL tree)

六、HP-UX

# ioscan –funC fc // 找到HBA卡,再用fcmsutil查看HBA卡信息

# fcmsutil /dev/fcd0(1)

七、AIX

# lsdev -Cc adapter // 找出HBA卡

# lscfg –vpl fcs0 |grep network address

备注:

Emulex的HBA的WWN的第一个数字为1

Qlogic的HBA的WWN的第一个数字为2

HP Tachyon HBA的WWN的第一个数字为5

Qlogic参数

Connection Options

0 - Loop only

1 - Point-to-point only

2 - Loop preferred,otherwise point-to-point.

按服务器那边的建议,DAS直连存储时选择loop only,通过光纤交换机连接存储时选择point-to-point only

Data Rate

该配置项定义FC端口速率

0 - 1Gb/s

1 - 2Gb/s

2 - Auto

==========================================================================

linux 下查看hba卡的wwn号

.HBA卡信息查询

/sys/class/fc_host/hostx/port_name 或node_name HBA卡的WWN号。

symbolic_name HBA卡型号

speed HBA卡速度

port_state HBA卡状态

spupported_speed HBA卡支持的速度

在/sys/class/fc_host/目录下可以得到很过有关HBA卡的信息。

一 如果没有加载正确的驱动,则有些信息,比如HBA的Link Speed可能无法获得,比

如:

localhost:~ # lspci

00:00.0 Host bridge: Intel Corporation 5000X Chipset Memory Controller Hub

(rev 12)

00:02.0 PCI bridge: Intel Corporation 5000 Series Chipset PCI Express x4 Port 2

(rev 12)

00:03.0 PCI bridge: Intel Corporation 5000 Series Chipset PCI Express x4 Port 3

(rev 12)

00:04.0 PCI bridge: Intel Corporation 5000 Series Chipset PCI Express x8 Port

4-5 (rev 12)

00:05.0 PCI bridge: Intel Corporation 5000 Series Chipset PCI Express x4 Port 5

(rev 12)

00:06.0 PCI bridge: Intel Corporation 5000 Series Chipset PCI Express x8 Port

6-7 (rev 12)

00:07.0 PCI bridge: Intel Corporation 5000 Series Chipset PCI Express x4 Port 7

(rev 12)

00:10.0 Host bridge: Intel Corporation 5000 Series Chipset FSB Registers (rev

12)

00:10.1 Host bridge: Intel Corporation 5000 Series Chipset FSB Registers (rev

12)

00:10.2 Host bridge: Intel Corporation 5000 Series Chipset FSB Registers (rev

12)

00:11.0 Host bridge: Intel Corporation 5000 Series Chipset Reserved Registers

(rev 12)

00:13.0 Host bridge: Intel Corporation 5000 Series Chipset Reserved Registers

(rev 12)

00:15.0 Host bridge: Intel Corporation 5000 Series Chipset FBD Registers (rev

12)

00:16.0 Host bridge: Intel Corporation 5000 Series Chipset FBD Registers (rev

12)

00:1c.0 PCI bridge: Intel Corporation 631xESB/632xESB/3100 Chipset PCI

Express Root Port 1 (rev 09)

00:1d.0 USB Controller: Intel Corporation 631xESB/632xESB/3100 Chipset UHCI

USB Controller #1 (rev 09)

00:1d.1 USB Controller: Intel Corporation 631xESB/632xESB/3100 Chipset UHCI

USB Controller #2 (rev 09)

00:1d.2 USB Controller: Intel Corporation 631xESB/632xESB/3100 Chipset UHCI

USB Controller #3 (rev 09)

00:1d.7 USB Controller: Intel Corporation 631xESB/632xESB/3100 Chipset EHCI

USB2 Controller (rev 09)

00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev d9)

00:1f.0 ISA bridge: Intel Corporation 631xESB/632xESB/3100 Chipset LPC

Interface Controller (rev 09)

00:1f.1 IDE interface: Intel Corporation 631xESB/632xESB IDE Controller (rev

09)

00:1f.2 IDE interface: Intel Corporation 631xESB/632xESB/3100 Chipset SATA

IDE Controller (rev 09)

01:00.0 SCSI storage controller: LSI Logic / Symbios Logic SAS1068E PCI-

Express Fusion-MPT SAS (rev 08)

02:00.0 PCI bridge: Broadcom EPB PCI-Express to PCI-X Bridge (rev c3)

03:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5708

Gigabit Ethernet (rev 12)

04:00.0 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express Upstream

Port (rev 01)

04:00.3 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express to PCI-X

Bridge (rev 01)

05:00.0 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express

Downstream Port E1 (rev 01)

05:01.0 PCI bridge: Intel Corporation 6311ESB/6321ESB PCI Express

Downstream Port E2 (rev 01)

06:00.0 PCI bridge: Broadcom EPB PCI-Express to PCI-X Bridge (rev c3)

07:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5708

Gigabit Ethernet (rev 12)

08:00.0 Fibre Channel: Emulex Corporation Saturn-X: LightPulse Fibre Channel

Host Adapter (rev 03)

08:00.1 Fibre Channel: Emulex Corporation Saturn-X: LightPulse Fibre Channel

Host Adapter (rev 03)

0a:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM57711

10Gigabit PCIe

0a:00.1 Ethernet controller: Broadcom Corporation NetXtreme II BCM57711

10Gigabit PCIe

0e:0d.0 VGA compatible controller: ATI Technologies Inc ES1000 (rev 02)

从蓝色字体只能知道该卡是emulex的FC HBA,但是不知道是什么型号的;进一步:

这个时候可以通过lspci命令直接查看芯片组信息,比如:

localhost:~ # lspci -n

00:00.0 0600: 8086:25c0 (rev 12)

00:02.0 0604: 8086:25e2 (rev 12)

00:03.0 0604: 8086:25e3 (rev 12)

00:04.0 0604: 8086:25f8 (rev 12)

00:05.0 0604: 8086:25e5 (rev 12)

00:06.0 0604: 8086:25f9 (rev 12)

00:07.0 0604: 8086:25e7 (rev 12)

00:10.0 0600: 8086:25f0 (rev 12)

00:10.1 0600: 8086:25f0 (rev 12)

00:10.2 0600: 8086:25f0 (rev 12)

00:11.0 0600: 8086:25f1 (rev 12)

00:13.0 0600: 8086:25f3 (rev 12)

00:15.0 0600: 8086:25f5 (rev 12)

00:16.0 0600: 8086:25f6 (rev 12)

00:1c.0 0604: 8086:2690 (rev 09)

00:1d.0 0c03: 8086:2688 (rev 09)

00:1d.1 0c03: 8086:26 (rev 09)

00:1d.2 0c03: 8086:268a (rev 09)

00:1d.7 0c03: 8086:268c (rev 09)

00:1e.0 0604: 8086:244e (rev d9)

00:1f.0 0601: 8086:2670 (rev 09)

00:1f.1 0101: 8086:269e (rev 09)

00:1f.2 0101: 8086:2680 (rev 09)

01:00.0 0100: 1000:0058 (rev 08)

02:00.0 0604: 1166:0103 (rev c3)

03:00.0 0200: 14e4:1c (rev 12)

04:00.0 0604: 8086:3500 (rev 01)

04:00.3 0604: 8086:350c (rev 01)

05:00.0 0604: 8086:3510 (rev 01)

05:01.0 0604: 8086:3514 (rev 01)

06:00.0 0604: 1166:0103 (rev c3)

07:00.0 0200: 14e4:1c (rev 12)

08:00.0 0c04: 10df:f100 (rev 03)

08:00.1 0c04: 10df:f100 (rev 03)

0a:00.0 0200: 14e4:1f

0a:00.1 0200: 14e4:1f

0e:0d.0 0300: 1002:515e (rev 02)

通过查找10df:f100,可以知道该卡是emulex的8Gb FC HBA LPe12000:

http://www.vm-help.com/esx/esx3i/Hardware_support.php

另外,还可以通过-vvv参数获得更详细的信息:

08:00.1 Fibre Channel: Emulex Corporation Saturn-X: LightPulse Fibre Channel

Host Adapter (rev 03)

Subsystem: Emulex Corporation Saturn-X: LightPulse Fibre Channel Host

Adapter

Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop-

ParErr+ Stepping- SERR+ FastB2B- DisINTx-

Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-

SERR- Latency: 0, Cache Line Size: bytes

Interrupt: pin B routed to IRQ 18

Region 0: Memory at d5efe000 (-bit, non-prefetchable) [size=4K]

Region 2: Memory at d5ef4000 (-bit, non-prefetchable) [size=16K]

Region 4: I/O ports at d800 [size=256]

Capabilities: [58] Power Management version 3

Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2

-,D3hot-,D3cold-)

Status: D0 PME-Enable- DSel=0 DScale=0 PME-

Capabilities: [60] Message Signalled Interrupts: Mask+ bit+

Count=1/16 Enable-

Address: 0000000000000000 Data: 0000

Masking: 00000000 Pending: 00000000

Capabilities: [78] MSI-X: Enable- Mask- TabSize=32

Vector table: BAR=2 offset=00002000

PBA: BAR=2 offset=00003000

Capabilities: [84] Vital Product Data

Capabilities: [94] Express (v2) Endpoint, MSI 00

DevCap: MaxPayload 2048 bytes, PhantFunc 0, Latency L0s <1us, L1

unlimited

ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset-

DevCtl: Unsupported-

Report errors: Correctable- Non-Fatal- Fatal+

RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop+

MaxPayload 128 bytes, MaxReadReq 512 bytes

DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr-

TransPend-

LnkCap: Port #0, Speed 5GT/s, Width x8, ASPM L0s, Latency L0

<1us, L1 ClockPM- Suprise- LLActRep- BwNot-

LnkCtl: ASPM Disabled; RCB bytes Disabled- Retrain- CommClk-

ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-

LnkSta: Speed 2.5GT/s, Width x4, TrErr- Train- SlotClk+ DLActive-

BWMgmt- ABWMgmt-

DevCap2: Completion Timeout: Range ABCD, TimeoutDis+

DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-

LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-,

Selectable De-emphasis: -6dB

Transmit Margin: Normal Operating Range,

EnterModifiedCompliance- ComplianceSOS-

Compliance De-emphasis: -6dB

LnkSta2: Current De-emphasis Level: -6dB

Capabilities: [100] Advanced Error Reporting

UESta: DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt-

RxOF- MalfTLP- ECRC- UnsupReq+ ACSVoil-

UEMsk: DLP- SDES- TLP- FCP- CmpltTO+ CmpltAbrt+ UnxCmplt+

RxOF- MalfTLP- ECRC- UnsupReq+ ACSVoil-

UESvrt: DLP+ SDES- TLP+ FCP+ CmpltTO- CmpltAbrt- UnxCmplt-

RxOF+ MalfTLP+ ECRC+ UnsupReq- ACSVoil-

CESta: NonFatalErr+

RxErr- BadTLP- BadDLLP- Rollover- Timeout-

CESta: RxErr+ BadTLP+ BadDLLP+ Rollover+ Timeout+

NonFatalErr-

AERCap: First Error Pointer: 00, GenCap+ CGenEn- ChkCap+

ChkEn-

Capabilities: [12c] Power Budgeting

Kernel driver in use: lpfc

Kernel modules: lpfc

二 如果FC HBA加载了正确的驱动,则在/sys/class/fc_host/hostx下有大量的HBA的

信息,比如

wwpn等:

localhost:~ # cd /sys/class/fc_host/host1/

localhost:/sys/class/fc_host/host1 # ls

active_fc4s fabric_name maxframe_size port_id statistics

supported_classes supported_speeds tgtid_bind_type

device issue_lip node_name port_name subsystem

supported_fc4s symbolic_name uevent

localhost:/sys/class/fc_host/host1 # cat node_name

0x20000000c988bece

port_state port_type speed power

localhost:/sys/class/fc_host/host1 # cat port_name

0x10000000c988bece

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- stra.cn 版权所有 赣ICP备2024042791号-4

违法及侵权请联系:TEL:199 1889 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务