HBA Port and Linux: What’s The Best Solutions to Disable?

Sometimes you need to do troubleshooting about storage connectivity but you don’t have access to datacenter or SAN switches and you need to shutdown one of HBA ports to check server side problem. If the port was a network adapter port, disabling was to easy but what about HBA port on operating system?

Possible Solutions About Disabling HBA Port on Server

You can disable a HBA port via:

  • Disable PCI Device in BIOS utility or PCI Device setup utility (Server reboot is required).
  • Disable connected switch port
  • Disconnect the port by remove cable connection
  • Disable port via FC driver

Disable Port via FC Driver

Disabling devices is too easy on Windows but Linux has own ways for administration. The below commands will works if you have QLogic adapter on RHEL/CentOS/Oracle Linux. Other vendors may have same ways on their FC driver.

Unbind Port

First, you should have each port’s PCI bus number. So you can find that by the below commands:

ls -l /sys/class/fc_host

The output would be something like the below:

FC
Linux
HBA

Run the below command to unbind and disabling port, put PCI bus ID of each port in a single command:

echo “0000:3c:00.0” > /sys/bus/pci/drivers/qla2xxx/unbind

Bind Port

To active port again:

echo “0000:3c:00.0” > /sys/bus/pci/drivers/qla2xxx/bind

Further Reading

WWN Address in EMC Unity: Best Way to Find

[Script]: Find ESXi HBA WWN via PowerCLI

VMware ESXi Queue Depth – Overview, Configuration And Calculation

External Links

Host adapter – Wikipedia

Davoud Teimouri

Professional blogger, vExpert 2015/2016/2017/2018/2019/2020/2021/2022/2023, vExpert NSX, vExpert PRO, vExpert Security, vExpert EUC, VCA, MCITP. This blog is started with simple posts and now, it has large following readers.

Leave a Reply

Your email address will not be published. Required fields are marked *