Reset vmhba storage Fibre Channel adapter on ESXi host

I’ve encountered an issue which randomly affects some of our hosts vmhba’s losing one storage device target which halves the paths to the storage and reduces resiliency. Host, storage and network configuration doesn’t highlight anything incorrect and resetting the vmhba brings back the Target to our desired state.

This post shows how I reset the Fibre Channel Adapter to bring back the targets for resiliency while we investigate the root cause.

You can check if the host has the correct paths by opening the vSphere Client > select the host Configure Storage Adapters.

Our storage adapters should be configured with 2 targets for each vmhba. The amount of Devices can change but there should be double the amount of Paths.

Here are two hosts with the issue. You’ll see only one Target for the affected vmhba’s and reduced paths:-

This can be fixed without downtime as long as there is one Target still active.

First we enable SSH on the host. Select the host > Configure > Services > select SSH > Click Start 

Open a SSH session to the selected host using Putty and log in using the root credentials.

Run this command: esxcli storage san fc reset -A vmhbaXX represents which vmhba you want to reset. In the example below, I’m resetting vmhba1.

You’ll receive a True output if successful.

Go back to the Storage adapters again by opening the vSphere Client > select the host Configure > Storage Adapters.

There should now be the correct TargetsDevices and Paths.

Now the storage paths are back to normal, remember to Stop the SSH service on the host you’ve been working with by selecting the host > Configure > Services > Select SSH > Select Stop

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s