查看LUN对应的HBA、查看HBA的WWN信息
在LINUX中,查看多路径设备下有哪些路径非常容易,如下:[root@elt1 block]# multipath -llmpathe (3600c0ff00026402cf4cf5d5601000000) dm-1 DotHill,DH3000size=47G features='0' hwhandler='0' wp=rw|-+- policy='round-robin 0'
首先查看多路径设备:
[root@elt1 block]# multipath -ll
mpathe (3600c0ff00026402cf4cf5d5601000000) dm-1 DotHill,DH3000
size=47G features='0' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=1 status=enabled
| `- 3:0:0:0 sdb 8:16 active ready running
`-+- policy='round-robin 0' prio=1 status=active
`- 4:0:0:0 sdi 8:128 active ready running
mpathd (3600c0ff00026402cf5cf5d5601000000) dm-0 DotHill,DH3000
size=47G features='0' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=1 status=enabled
| `- 3:0:0:1 sdc 8:32 active ready running
`-+- policy='round-robin 0' prio=1 status=active
`- 4:0:0:1 sdj 8:144 active ready running
mpathc (3600c0ff00026402cdbc95d5601000000) dm-4 DotHill,DH3000
size=1.8T features='0' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=1 status=enabled
| `- 3:0:0:2 sdd 8:48 active ready running
`-+- policy='round-robin 0' prio=1 status=active
`- 4:0:0:2 sdk 8:160 active ready running
mpathb (3600c0ff00026402cdbc95d5602000000) dm-3 DotHill,DH3000
size=1.8T features='0' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=1 status=enabled
| `- 3:0:0:3 sde 8:64 active ready running
`-+- policy='round-robin 0' prio=1 status=active
`- 4:0:0:3 sdl 8:176 active ready running
mpathh (3600c0ff00026402ce0c95d5604000000) dm-6 DotHill,DH3000
size=1.8T features='0' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=1 status=enabled
| `- 3:0:0:6 sdh 8:112 active ready running
`-+- policy='round-robin 0' prio=1 status=active
`- 4:0:0:6 sdo 8:224 active ready running
mpathg (3600c0ff00026402ce0c95d5603000000) dm-5 DotHill,DH3000
size=1.8T features='0' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=1 status=enabled
| `- 3:0:0:5 sdg 8:96 active ready running
`-+- policy='round-robin 0' prio=1 status=active
`- 4:0:0:5 sdn 8:208 active ready running
mpathf (3600c0ff00026402cdcc95d5601000000) dm-2 DotHill,DH3000
size=1.8T features='0' hwhandler='0' wp=rw
|-+- policy='round-robin 0' prio=1 status=enabled
| `- 3:0:0:4 sdf 8:80 active ready running
`-+- policy='round-robin 0' prio=1 status=active
`- 4:0:0:4 sdm 8:192 active ready running
[root@elt1 block]#
那么如何查看某个设备经过哪个HBA卡呢?例如查看mpathf下的sdf和sdm是经过哪个HBA卡访问存储的呢?
[root@elt1 block]# cd /sys/block
[root@elt1 block]# ls -l
[root@elt1 block]# ls -l|grep -E "sdh|sdo"
lrwxrwxrwx 1 root root 0 Jun 1 10:09 sdh -> ../devices/pci0000:40/0000:40:02.0/0000:41:00.0/host3/rport-3:0-0/target3:0:0/3:0:0:6/block/sdh
lrwxrwxrwx 1 root root 0 Jun 2 21:19 sdo -> ../devices/pci0000:40/0000:40:03.0/0000:51:00.0/host4/rport-4:0-0/target4:0:0/4:0:0:6/block/sdo
[root@elt1 block]#
再查看host3和host4的WWPN号:
[root@elt1 block]# cd /sys/class/fc_host/
[root@elt1 fc_host]# ls
host1 host2 host3 host4
[root@elt1 fc_host]#
进入host3并查看相关信息:
[root@elt1 fc_host]# cd host3
[root@elt1 host3]# ls
device issue_lip npiv_vports_inuse port_state speed supported_classes system_hostname vport_create
dev_loss_tmo max_npiv_vports port_id port_type statistics supported_speeds tgtid_bind_type vport_delete
fabric_name node_name port_name power subsystem symbolic_name uevent
[root@elt1 host3]# cat port_name
0x21000024ff0f597b
[root@elt1 host3]# cat node_name
0x20000024ff0f597b
[root@elt1 host3]#
更多推荐
所有评论(0)