Site icon Davoud Teimouri – Virtualization and Data Center

How To Disable HBA Port on Linux

Linux Distribution

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 HBA 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 HBA 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 Host PCI Info Linux

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 HBA Port

To active port again:

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

See Also

How to Find EMC Unity FC Port WWN

[Script]: Find ESXi HBA WWN via PowerCLI

VMware ESXi Queue Depth – Overview, Configuration And Calculation

Exit mobile version