How to find HBA cards/ports and WWN in Linux Redhat/Centos

Windows Articles

How to install RainLoop (web-based email client) on Ubuntu 20.04?

Email plays an important role in companies and on a personal level. Sometimes it is convenient to have a personal email server,...

Fedora 33 available

Fedora is a Linux-based operating system, which also offers a development platform. In other words, it is free to use, modify, and...

Install GoAccess on Ubuntu 20.04?

Hello, friends. In this post, you will learn how to install GoAccess on Ubuntu 20.04. This way you will be able to...

The best lightweight web browsers

Hi! We currently spend a lot of time in front of the computer connected to the Internet. In fact, it is a...

Install Snowflake (SSH Client) on Ubuntu 20.04

Linux system administrators on servers have a big job behind them. Thanks to them, many of the services or tasks that an...
Mel Khamlichi
Mel Khamlichihttp://www.osradar.com
Founder of Osradar, from Amsterdam Netherlands

Maybe you are new in a professional environment where you have to become familiar with new  terms like HBA cards and storage via Fiber or others

A host bus adapter (HBA) is a circuit board and/or integrated circuit adapter that provides input/output (I/O) processing and physical connectivity between a host system, or server, and a storage and/or network device

How to find HBA cards/ports and WWN in Linux Redhat/Centos ?

Method 1

To find the HBA cards installed on your system use :

[root@su444p043 ~]# lspci -nn | grep -i qlog
08:00.0 Fibre Channel [0c04]: QLogic Corp. ISP8324-based 16Gb Fibre Channel to PCI Express Adapter [1077:2031] (rev 02)
08:00.1 Fibre Channel [0c04]: QLogic Corp. ISP8324-based 16Gb Fibre Channel to PCI Express Adapter [1077:2031] (rev 02)
[root@su444p043 ~]#

 

To check the available HBA ports :

# ls -l   /sys/class/fc_host/
total 0
lrwxrwxrwx 1 root root 0 Apr 20 11:21 host7 -> ../../devices/pci0000:00/0000:00:03.0/0000:08:00.0/host7/fc_host/host7
lrwxrwxrwx 1 root root 0 Apr 20 11:21 host8 -> ../../devices/pci0000:00/0000:00:03.0/0000:08:00.1/host8/fc_host/host8

To find the state of HBA ports (online/offline) :

]# more /sys/class/fc_host/host?/port_state
::::::::::::::
/sys/class/fc_host/host7/port_state
::::::::::::::
Online
::::::::::::::
/sys/class/fc_host/host8/port_state
::::::::::::::
Online

 

To find the WWN numbers of the above ports :

# more /sys/class/fc_host/host?/port_state

::::::::::::::
/sys/class/fc_host/host7/port_name
::::::::::::::
0x51402ec000f497a0
::::::::::::::
/sys/class/fc_host/host8/port_name
::::::::::::::
0x51402ec000f497a2

 

Method 2 : Using systool

Another useful command to find the information about HBAs is systool. If not already installed please do it  with the following command.

# yum install sysfsutils  -y

To check the available HBA ports :

[root@------ ~]# systool -c fc_host
Class = "fc_host"

Class Device = "host7"
 Device = "host7"

Class Device = "host8"
 Device = "host8"

 

To find the WWNs for the HBA ports :

# systool -c fc_host -v | grep port_name
 port_name = "0x51402ec000f497a0"
 port_name = "0x51402ec000f497a2"

To check the state of the HBA ports (online/offline) :

# # systool -c fc_host -v | grep port_state
 port_state = "Online"
 port_state = "Online"

Please Enjoy and share !!

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How to install RainLoop (web-based email client) on Ubuntu 20.04?

Email plays an important role in companies and on a personal level. Sometimes it is convenient to have a personal email server,...

Fedora 33 available

Fedora is a Linux-based operating system, which also offers a development platform. In other words, it is free to use, modify, and...

Install GoAccess on Ubuntu 20.04?

Hello, friends. In this post, you will learn how to install GoAccess on Ubuntu 20.04. This way you will be able to...

The best lightweight web browsers

Hi! We currently spend a lot of time in front of the computer connected to the Internet. In fact, it is a...

Install Snowflake (SSH Client) on Ubuntu 20.04

Linux system administrators on servers have a big job behind them. Thanks to them, many of the services or tasks that an...
x