Troubleshooting Unmapped LUNs Detected on ESXi Hosts
search cancel

Troubleshooting Unmapped LUNs Detected on ESXi Hosts

book

Article ID: 384962

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms: 

Even after unmounting datastores, detaching LUNs (RDM's and VMFS Datastores) from ESXi hosts, and having the storage team reclaim the LUNs, the LUNs are still visible within the ESXi host's storage view. This inconsistency can lead to confusion and potential issues. This can occur due to various reasons, such as:

  • LUNs not being properly removed from the host’s configuration: ESXi might still retain the LUNs in its list even though they have been detached.
  • Residual device information: Sometimes the ESXi host may continue to reference the LUN even after it has been removed or the storage is no longer available.
  • Multipathing configuration: If multiple paths to the LUN exist, the ESXi host might still show the LUN as available via another path.

 Following Command display the detached lun's with 0 MB in size.

esxcli storage core device list 

 esxcli storage core device list -d naa.xxxx
naa.xxxx
   Display Name:
   Has Settable Display Name: false
   Size: 0
   Device Type: No device type
   Multipath Plugin:
   Devfs Path:
   Vendor:
   Model:
   Revision:
   SCSI Level: 0
   Is Pseudo: false
   Status: off
   Is RDM Capable: false
   Is Local: false
   Is Removable: false
   Is SSD: false
   Is VVOL PE: false
   Is Offline: true
   Is Perennially Reserved: false
   Queue Full Sample Size: 0
   Queue Full Threshold: 0
   Thin Provisioning Status: no
   Attached Filters:
   VAAI Status: unknown
   Other UIDs:
   Is Shared Clusterwide: true
   Is SAS: false
   Is USB: false
   Is Boot Device: false
   Device Max Queue Depth: 0
   No of outstanding IOs with competing worlds: 0
   Drive Type: unknown
   RAID Level: unknown
   Number of Physical Drives: unknown
   Protection Enabled: false
   PI Activated: false
   PI Type: 0
   PI Protection Mask: NO PROTECTION
   Supported Guard Types: NO GUARD SUPPORT
   DIX Enabled: false
   DIX Guard Type: NO GUARD SUPPORT

Environment

VMware vSphere ESXi 7.x
VMware vSphere ESXi 8.x

Cause

ESXi host still retain the LUNs in ESXI host configuration list even though they have been detached and unmapped from Array end.

 

Resolution

Residual device mapping: LUN is detached from an ESXi host, the device could still be visible in the host's storage configuration.


Need to execute the following commands in the ESXi, these commands must be run against device(s) in question. 

1. esxcli storage core device detached remove --device naa.xxxx
2. localcli storage core device setconfig -d naa.xxxxxxx --detached=false

Post executing the above commands please validate in vCenter UI under devices or  run the following command

esxcli storage core device list

Additional Information

The below information is extracted from the ESXi host configuration file. 


  naa.xx --> detached = "True" perennially reserved = "False" not shared = "False"
  naa.xx--> detached = "True" perennially reserved = "False" not shared = "False"

/> cat /storage/scsifw/persistDeviceAttrs/uids/naa.xx
   Device Persistent Attributes {
   detached:1
   perennially reserved:0
   not shared:0
}
/> cat /storage/scsifw/persistDeviceAttrs/uids/naa.xx
   Device Persistent Attributes {
   detached:1
   perennially reserved:0
   not shared:0
}