Datastores still attached to ESXi host after detaching with vCenter vSphere Client or CLI commands
search cancel

Datastores still attached to ESXi host after detaching with vCenter vSphere Client or CLI commands

book

Article ID: 392571

calendar_today

Updated On:

Products

VMware vSphere ESXi VMware vCenter Server 8.0 VMware vCenter Server VMware vSphere ESXi 8.0 VMware vSphere ESX 8.x VMware vSphere ESX 7.x

Issue/Introduction

Symptoms:

  • You recently unmounted and detached one or more SAN-based datastores from the host in the vSphere Client or with CLI commands.
  • You see the datastores showing in an inaccessible state in the vSphere Client: 

  • You may also see an alarm in vCenter now showing on host with following:

Alarm alarm.StorageConnectivityAlarm on Host <esxi host>
because Path redundancy to storage device <naa> degraded. Path vmhba#:C#:T##:L## is down. Affected datastores: Unknown.

Environment

  • VMware ESXi 7.x
  • VMware ESXi 8.x
  • VMware vCenter Server 7.x
  • VMware vCenter Server 8.x

Cause

  • This is expected behavior.
  • The datastores are left visible when you are temporarily or permanently detaching the LUN from the host for troubleshooting or in preparation for reclaiming the LUN on the SAN (in case they need to be reattached later).

Resolution

 

  • If this is meant to be a permanent decommissioning of the LUN(s):

    • Ensure the LUN(s) are unmapped from the hosts from the SAN side. Contact your SAN administrator or Storage Vendor, if needed. 
    • After the LUN is verified to be unmapped from the host, it is safe to remove the decommissioned devices from the ESXi host's detached list: 

      • To list the permanently detached devices on host, run this command from ssh session:

esxcli storage core device detached list

You will see output be similar to:

Device UID                                                     State
------------------------------------                            -----
naa.###############################   off
naa.###############################   off

      • To permanently remove a specific device from the detached device list, run the following command:

esxcli storage core device detached remove -d <NAA_ID>

      • If needed, you can also remove all devices from the detached devices list using this command:

esxcli storage core device detached remove -a

    • Rescan the storage

Additional Information