If our Linux box is connected to one or more SAN switches via Fibre HBA cards. So it becomes very important to the Storage Team that they assign the storage to the correct Servers via WWN numbers of Fibre HBA Cards. So To find the WWN number of HBA cards in Linux use the below command:

# systool -c fc_host -v | grep "port_name"

Sample Output:

port_name   = "0x5001438001347fdc"
port_name   = "0x5001438001347fde"
port_name   = "0x50014380013471f0"
port_name   = "0x50014380013471f2"

systool command is provided by the rpm package “sysfsutils“.

Alternate Method

You can also use the below command, if you do not have the package sysfsutils installed on your system:

# cat /sys/class/scsi_host/hostN/device/fc_host/hostN/port_name

Where “N” is the number of devices for your fiber HBAs.