LUN size mismatch between Storage Array and ESXi host
search cancel

LUN size mismatch between Storage Array and ESXi host

book

Article ID: 390381

calendar_today

Updated On: 03-11-2025

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms:

  • LUN size was changed at storage array end, but on ESXi host the change is not seen.

  • Even after cluster level storage rescan the size does not change.

Issue Validation:

  • The LUN was detached from ESXi host.

  • The LUN size was changed after this.

  • The LUN has not been attached back and lists in the detached list when running this command in SSH of ESXi host with state as "off": esxcli storage core device detached list

  • Or the LUN was deleted at the storage end post un-presenting to ESXi host, and then a new LUN was presented to the ESXi host. But this new LUN has the same id as the LUN which was detached and still present in the detached device list.

Environment

VMware vSphere ESXi (All Versions)

Cause

The information about the LUN will not update if it is in the detached state.

It will show the old information from when the LUN was in the attached state.

Resolution

.There are two ways to resolve this issue:

  1. If the LUN was decommissioned by detaching it. Then the device must be permanently decommissioned from the ESXi host. This can be done by manually removing the device entries from the host configuration:

    1. List the detached devices on the ESXi host by running the command: esxcli storage core device detached list

      Output similar to:
    2. Permanently remove the device configuration information from the ESXi by running the command: esxcli storage core device detached remove -d NAA_ID

      Example: esxcli storage core device detached remove -d naa.##########################
    3. Post this if a new LUN is presented and even if it has the same LUN id, it will reflect the proper size information.

  2. If the LUN was detached and needs to be used without deleting it, then just attach the LUN back to the host:

    • From vSphere Client this can be done by:

      1. Select the ESXi host > Configure > Storage Devices.

      2. Select the LUN which needs to be attached back.

      3. At the top from the available options, click on "Attach".

      4. Perform a storage rescan and the LUN should reflect the right size.

      5. If the LUN is presented to multiple ESXi hosts ensure they are attached back on all the hosts.

    • From SSH of ESXi host, this can be done by:

      1. Run this command to attach the device back to the host: esxcli storage core device setconfig --detached=false

      2. Perform a storage rescan and the LUN should reflect the right size.

      3. If the LUN is presented to multiple ESXi hosts ensure they are attached back on all the hosts.

Additional Information

To properly decommission a LUN refer - How to detach a LUN device from ESXi hosts