本文共 6859 字,大约阅读时间需要 22 分钟。
SOLUTION UNVERIFIED - 已更新 2018年二月6日05:35 -
For more information about setting up SAN storage refer to the appropriate storage guide:
The wwpn (world wide port name) and companion wwnn (world wide node name) of an hba within the current configuration are available within the sysfs tree, can be found using a find
command and viewed either via systool
command from sysfsutils package (#yum install sysfsutils), or via simple grep
command:
$ find /sys/class/fc_host/*/ -name 'port_name' << retrieve path to wwpn entry$ find /sys/class/fc_host/*/ -name 'node_name' << retrieve path to wwnn entry$ grep -v "zZzZ" -H /sys/class/fc_host/host*/*_name/sys/class/fc_host/host6/fabric_name:0x100000051e900105 << switch port name, wwpn/sys/class/fc_host/host6/node_name:0x200000e08b87de9a << HBA node name, wwnn/sys/class/fc_host/host6/port_name:0x210000e08b87de9a << HBA port name, wwpn/sys/class/fc_host/host6/symbolic_name:QLE2462 FW:v7.03.00 DVR:v8.07.00.18.07.2-k:.In the case where it is insufficient to know just the WWNN/WWPN that exists for a scsi host and it is desired to know the actual pci address assigned to a particular scsi host -- then the following can be used:$ find ./sys/devices -type d -name 'host*' | egrep -v "host_busy|fc_host|scsi_host" | sort./sys/devices/pci0000:00/0000:00:01.0/0000:04:00.0/host4./sys/devices/pci0000:00/0000:00:04.0/0000:08:00.0/host10./sys/devices/pci0000:00/0000:00:05.0/0000:0b:00.0/host5./sys/devices/pci0000:00/0000:00:07.0/0000:0e:00.0/host8./sys/devices/pci0000:00/0000:00:07.0/0000:0e:00.1/host9./sys/devices/pci0000:00/0000:00:0a.0/0000:14:00.0/host6 << card pci address for host6/scsi6./sys/devices/pci0000:00/0000:00:0a.0/0000:14:00.1/host7:.$ systool -c fc_host -vClass = "fc_host" Class Device = "host6" Class Device path = "/sys/devices/pci0000:00/0000:00:0a.0/0000:14:00.0/host6/fc_host/host6" dev_loss_tmo = "45" fabric_name = "0x100000051e900105" << switch port name, wwpn issue_lip = max_npiv_vports = "127" node_name = "0x200000e08b87de9a" << HBA node name, wwnn npiv_vports_inuse = "0" port_id = "0x010300" port_name = "0x210000e08b87de9a" << HBA port name, wwpn port_state = "Online" port_type = "NPort (fabric via point-to-point)" speed = "4 Gbit" supported_classes = "Class 3" supported_speeds = "1 Gbit, 2 Gbit, 4 Gbit" symbolic_name = "QLE2462 FW:v7.03.00 DVR:v8.07.00.18.07.2-k" system_hostname = "" tgtid_bind_type = "wwpn (World Wide Port Name)" uevent = :.
mapdevs
that can be run on RHEL 5, 6, and 7 to display, among other things, an hba-to-storage wwn map.# ./mapdevs -Hp#scsi_addr name version f/w device#----------- ---------------------- ---------------------- ------------------------- ----------------------------------------------: 6:*:*:* qla2xxx 8.07.00.38.07.4-k1 8.06.00 (9496) /sys/devices/pci0000:00/0000:00:0a.0/0000:14:00.0/host6 7:*:*:* qla2xxx 8.07.00.38.07.4-k1 8.06.00 (9496) /sys/devices/pci0000:00/0000:00:0a.0/0000:14:00.1/host7# --------- PCI -------------# subsystem model model#scsi_addr vendor device vendor device name description#----------- ------ ------ ------ ------ ------------ --------------------------------------------------: 6:*:*:* 0x1077 0x2432 0x1077 0x0138 QLE2462 PCI-Express Dual Channel 4Gb Fibre Channel HBA 7:*:*:* 0x1077 0x2432 0x1077 0x0138 QLE2462 PCI-Express Dual Channel 4Gb Fibre Channel HBA#scsi_addr name speed state symbolic_name port_type#----------- ------------------ -------- -------- ---------------------------------------------- -----------------------------------------------: 6:*:*:* qla2xxx 4 Gbit Online QLE2462 FW:v8.06.00 DVR:v8.07.00.38.07.4-k1 NPort (fabric via point-to-point) 7:*:*:* qla2xxx 4 Gbit Online QLE2462 FW:v8.06.00 DVR:v8.07.00.38.07.4-k1 NPort (fabric via point-to-point):#SCSI HBA Fabric Storage Port#Addr Luns wwnn wwpn portid wwn wwnn wwpn portid info#------------- ---- ------------------/------------------/-------- ------------------ ------------------/------------------/--------/--------- 6:0:0:- 65 0x200000e08b87de9a 0x210000e08b87de9a 0x010300 0x100000051e900105 0x5001438005663d33 0x5001438005663d32 0x0a0400 FCP Target6:0:1:- 67 0x200000e08b87de9a 0x210000e08b87de9a 0x010300 0x100000051e900105 0x5001438005663d31 0x5001438005663d30 0x0a0500 FCP Target6:0:2:- - 0x200000e08b87de9a 0x210000e08b87de9a 0x010300 0x100000051e900105 0x20000024ff0d7d65 0x21000024ff0d7d65 0x010800 FCP Target6:0:x:- - 0x200000e08b87de9a 0x210000e08b87de9a 0x010300 0x100000051e900105 0x2000001018d6aa11 0x2001001018d6aa11 0x0a0e01 FCP Initiator6:0:x:- - 0x200000e08b87de9a 0x210000e08b87de9a 0x010300 0x100000051e900105 0x200100e08ba7de9a 0x210100e08ba7de9a 0x010600 FCP Initiator6:0:x:- - 0x200000e08b87de9a 0x210000e08b87de9a 0x010300 0x100000051e900105 0x20000090fa1927e8 0x10000090fa1927e8 0x0a0100 FCP Initiator6:0:x:- - 0x200000e08b87de9a 0x210000e08b87de9a 0x010300 0x100000051e900105 0x20000090fa1927e9 0x10000090fa1927e9 0x0a0000 FCP Initiator6:0:x:- - 0x200000e08b87de9a 0x210000e08b87de9a 0x010300 0x100000051e900105 0x20000090fa16f41e 0x10000090fa16f41e 0x010200 FCP Initiator6:0:x:- - 0x200000e08b87de9a 0x210000e08b87de9a 0x010300 0x100000051e900105 0x20000090fa16f41f 0x10000090fa16f41f 0x010700 FCP Initiator:.
转载地址:http://qwhmj.baihongyu.com/