PrettyPrint

Affichage des articles dont le libellé est fc. Afficher tous les articles
Affichage des articles dont le libellé est fc. Afficher tous les articles

mercredi 16 septembre 2015

Get HBA WWN on CentOS Linux

New server with FC-HBAs, witch have to be connect to a SAN-Fabric ?


Get WWPN (Word Wide Port Name)
2 HBA, with 2 ports represent by a host number.

# lspci | grep HBA
05:00.0 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)
05:00.1 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)
08:00.0 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)
08:00.1 Fibre Channel: QLogic Corp. ISP2532-based 8Gb Fibre Channel to PCI Express HBA (rev 02)

#cat /sys/class/fc_host/host*/port_name
0x500143802421ff25
0x500143802421ff27
0x500143802422010d
0x500143802422010f

$grep '0x' /sys/class/fc_host/host*/port_name 
/sys/class/fc_host/host3/port_name:0x500143802421ff25
/sys/class/fc_host/host4/port_name:0x500143802421ff27
/sys/class/fc_host/host5/port_name:0x500143802422010d
/sys/class/fc_host/host6/port_name:0x500143802422010f

Get  Fabric WWNN (Node Name)

# grep '0x' /sys/class/fc_host/host*/fabric_name 
/sys/class/fc_host/host3/fabric_name:0x100000051ec624f6
/sys/class/fc_host/host4/fabric_name:0x100000051ecc4c2a
/sys/class/fc_host/host5/fabric_name:0x100000051ecc4c2a
/sys/class/fc_host/host6/fabric_name:0x100000051ec624f6

After the zoning, we can get the remote node/port name of equipment with who we can communicate:
#cat /sys/class/fc_remote_ports/rport-*/node_name