Loading

×Sorry to interrupt
Uncaught ReferenceError: addCTracking is not defined
throws at https://kb.vmware.com/resource/KM_TealiumTrackingJS?v=0.5:100:1

Refresh

Cookie Preference Center

General Information on cookies

When you visit our website, we use cookies to ensure that we give you the best experience. This information does not usually directly identify you, but it can give you a more personalized web experience. Because we respect your right to privacy, you can choose not to allow some types of cookies by clicking on the different category headings to find out more and change your settings. However, blocking some types of cookies may impact your experience on the site and the services we are able to offer. Further information can be found in our

Cookie Policy.

Strictly Necessary

Strictly Necessary

Always Active

Strictly Necessary

Strictly necessary cookies are always enabled since they are essential for our website to function. They enable core functionality such as security, network management, and website accessibility. You can set your browser to block or alert you about these cookies, but this may affect how the website functions. For more information please visit www.aboutcookies.org or www.allaboutcookies.org.

Cookie Details‎

Performance

Performance

Performance

Performance cookies are used to analyze the user experience to improve our website by collecting and reporting information on how you use it. They allow us to know which pages are the most and least popular, see how visitors move around the site, optimize our website and make it easier to navigate.

Cookie Details‎

Please confirm your settings by refreshing the page.

Functional

Functional

Functional

Functional cookies help us keep track of your past browsing choices so we can improve usability and customize your experience. These cookies enable the website to remember your preferred settings, language preferences, location and other customizable elements such as font or text size. If you do not allow these cookies, then some or all of these services may not function properly.

Cookie Details‎

Advertising

Advertising

Advertising

Advertising cookies are used to send you relevant advertising and promotional information. They may be set through our site by third parties to build a profile of your interests and show you relevant advertisements on other sites. These cookies do not directly store personal information, but their function is based on uniquely identifying your browser and internet device.

Cookie Details‎

Advertising Cookies

Consent Leg.Interest

Select All Vendors

Select All Vendors

Select All Hosts

Select All

Clear Filters

Information storage and access

Apply

Confirm My Choices Reject All Allow All

My Subscriptions

Loading

Knowledge Base

Error message "Exceeded the number of devices that can be detached. Clean up all stale detach entries" appears when detaching a LUN from ESXi (59254)

Last Updated: 7/7/2020Categories: TroubleshootingTotal Views: 5955Language:
English

1 like this article

Subscribe to get an email
newsletter with new updates

1 people found this helpful Please provide article feedback:

Symptoms

When you attempt to detach a LUN from the vSphere Web Client or the ESXi Host Client you receive an error message: "Cannot change the host configuration"

Executing the command esxcli storage core device detached list returns no results

In the vmkernel.log you could see entries similar to:

2018-07-03T19:54:39.589Z cpu15:68121 opID=c3055eb6)WARNING: ScsiDevice: 8612: Detach failed for device :naa.00000000000000000000000000000001. Exceeded the number of devices that can be detached. Clean up all stale detach entries.

Cause

This message could appear when multiple LUNs flagged as "perennially reserved" have been detached in the past without firstly remove the perennially reserved flag. The ESXi currently manages a list in the VSI nodes to keep track of these LUNs and when the LUN is detached this list is not automatically updated to remove the device from it. The list can have up to 512 devices, when you attempt to detach a 513th device the error appears.

Impact / Risks

Make sure that the perennially reserved flag is only removed from LUNs that do not exist in the environment anymore. If you remove the flag of a LUN that is currently used as RDM, the next time the ESXi is booted it will experience long time to start as per this KB 1016106

Resolution

VMware is currently working on improving this behavior.

If you are currently experiencing the problem reported in this KB then remove the perennially reserved flag of LUNs that were removed in the past.

Run this command to find the naa.id devices listed in the VSI nodes
# vsish -e ls /storage/scsifw/persistDeviceAttrs/uids

Run this command to verify if there are 512 devices listed already:
# vsish -e ls /storage/scsifw/persistDeviceAttrs/uids | wc -l

Please note: that devices listed under uids, may have multiple attributes, including perennially reservation.
The listing of an naa ID does not automatically indicate that the LUN is perennially reserved.

/storage/scsifw/persistDeviceAttrs/uids/> get naa.624a93704a136e62ff54907c002baf51
Device Persistent Attributes {
detached:0
perennially reserved:0
not shared:1

In this example the LUN is not reserved, yet the naa ID does appear under uids, because one of the 3 attributes are TRUE.

Identify the naa.ids that where detached in the past and do not exist in the environment anymore.

Run this command to remove the perennially reserved flag on those naa.id:
# esxcli storage core device setconfig -d naa.id --perennially-reserved=false

Now you could attempt to detach the desired LUN again.

To avoid this problem from happening in the future, please follow the steps of KB Article 2004605 to detach the LUN correctly from an ESXi and as per the the Related Information of that KB the flag of "perennially reserved" needs to be removed to prevent a successful unmount/detach of the LUN.

Workaround

You could reboot the ESXi to clean some entries that are not persistent from the VSI nodes and then be able to detach the LUN. However, those entries that are persistent will have to be manually removed with the process in the Resolution section. It is highly recommended that this clean up is performed in the environment to avoid this problem from happening in the future.

Detectable by VMware SkylineTM

Actions

Copy

link to clipboard
copied!

Print

Language:
English

Attachments

Additional Resources

KB
•
vSphere 5.x への CA 署名された SSL 証明書の組み込みについて (2034833)

KB
•
End Of General Availability of the Free vSphere Hypervisor (ESXi 7.x and 8.x) (2107518)

Results 1-2 of 2

Ask The Community

Get answers quickly from VMware experts in the community

Post Subject

CONTINUE IN COMMUNITIES

Related Products:

VMware vSphere ESXi

Related Versions:

VMware vSphere ESXi 7.0.0

VMware vSphere ESXi 6.7

VMware vSphere ESXi 6.5

VMware vSphere ESXi 6.0

Take Our Survey

Support Assistant