平时在Linux下映射存储,都是映射哪台就给哪台插线,然后在存储端扫描WWPN,简单粗暴,没技术含量。当然,光交下也可以看。

1,查看当前卡的品牌,常用的卡有两种,Emulex和Qlogic。

lspci |grep -i fibre

2,查看HBA卡的驱动版本

emulex : modinfo lpfc | grep version

qlogic: modinfo qla2xxx | grep version

xxx是qlogic hba卡的型号

3,查看HBA卡的WWPN

more /sys/class/fc_host/host*/port_name

转载: https://www.mr-mao.cn/archives/linux-find-hba-driver-version-wwpn.html

 

查看当前port的状态

[root@localhost ~]#cat  /sys/class/fc_host/host2/port_state
Online

查看PORT的端口ID

 
[root@localhost ~]#cat  /sys/class/fc_host/host2/port_id
0x000001

查看port支持的速率

 
[root@localhost ~]#cat  /sys/class/fc_host/host2/supported_speeds
1 Gbit, 2 Gbit, 4 Gbit 
[root@localhost ~]#cat  /sys/class/fc_host/host2/supported_classes
Class 3

在FC HBA没有插上光纤时

 
[root@localhost ~]#cat  /sys/class/fc_host/host2/speed
unknow
[root@localhost ~]#cat  /sys/class/fc_host/host2/port_type
unknow

给FC HBA卡插上光纤线,和其他HBA卡相连时。

 
[root@localhost ~]#cat  /sys/class/fc_host/host2/speed
4 Gbit 
[root@localhost ~]#cat  /sys/class/fc_host/host2/port_type
LPort (private loop) 

和光纤交换机相连时

 
[root@localhost ~]#cat  /sys/class/fc_host/host2/port_type
NPort (fabric via point-to-point)

转载: http://way4ever.com/?p=326

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐