57

linux下如何查看服务器wwn号

 5 years ago
source link: https://www.linuxprobe.com/linux-cat-wwn.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

PC server主机与FC存储进行连接时,一般需要加装HBA卡,两者之间衔接的一个重要参数就是wwn号。redhat或suse下查看wwn号的方法如下。

一、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;
四、suse11、redhat5、redhat6

上面都是一些老版本系统下的查看方法,在suse11、redhat5、redhat6上,一般都可以通进查看/sys/class/fc_host/host*/port_name文件获取(host*一般查看到的可能是host4和host5),执行结果如下:

# cat /sys/class/fc_host/host*/port_name
0x10000090fa2a6b98
0x10000090fa2a6b99

由于连接存储,为避免单路径下的故障情况,一般都需要配置多路径,HBA卡也相应都是成对出现的,这里查看到wwwn号也是成对出现的。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK