重庆思庄Oracle、KingBase、PostgreSQL、Redhat认证学习论坛

标题: LINUX下查看HBA卡的WWN号 [打印本页]

作者: 郑全    时间: 2025-4-10 21:40
标题: LINUX下查看HBA卡的WWN号
有时我们想确认一下服务器的HBA卡的WWN,好和存储相对应,这时,需要找出HBA卡的WWN号
下面是目前最简单的方式

1.看有哪些host

[root@hisdg ~]# ls -ltr /sys/class/fc_host/
total 0
lrwxrwxrwx 1 root root 0 Apr 10 21:28 host6 -> ../../devices/pci0000:1a/0000:1a:02.0/0000:1c:00.0/host6/fc_host/host6
lrwxrwxrwx 1 root root 0 Apr 10 21:28 host15 -> ../../devices/pci0000:2d/0000:2d:00.0/0000:2e:00.0/host15/fc_host/host15

2.通过port_name查找到WWN

[root@hisdg ~]# cat /sys/class/fc_host/host15/port_name
0x10000000c95ef787
[root@hisdg ~]# cat /sys/class/fc_host/host6/port_name
0x10000000c95ef6e3


3.解读
[size=16.002px]  输出格式如 0x10000000c95ef787[size=16.002px],去掉 0x[size=16.002px] 即为 WWN
[size=16.002px]  10000000c95ef787






欢迎光临 重庆思庄Oracle、KingBase、PostgreSQL、Redhat认证学习论坛 (http://bbs.cqsztech.com/) Powered by Discuz! X3.2