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:
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
VMware vSphere ESXi 7.x
VMware vSphere ESXi 8.x
ESXi host still retain the LUNs in ESXI host configuration list even though they have been detached and unmapped from Array end.
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
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/
Device Persistent Attributes {
detached:1
perennially reserved:0
not shared:0
}
/> cat /storage/scsifw/
Device Persistent Attributes {
detached:1
perennially reserved:0
not shared:0
}