Solved

vCenter - can't delete a datastore, fails as "in use"

Posted on 2014-10-27
9
1,668 Views
Last Modified: 2014-11-18
I've tried every suggestion out there, and still can't remove one datastore in my vCenter.
 
(I've not been able to reboot the hosts, or even put them in maintnenace - that's not an option at the moment).
 
2 hosts in a vCenter datacenter, not clustered.

I've been able to remove other datastores in this configuration, but cannot remove this particular datastore.  I have 3 active datastores serving VM's other than this one (which has no VM's or files of any kind that I can see).

I've done the following:
- migrated all VM's.
- checked all vmx files for references to the datastore
   - found 2 VM's not in inventory or powered on, which referenced the datastore - changed those
- deleted the .dvsData folder from the datastore
- browse datastore from vSphere client - no vm files
- SSH to hosts and "ls -l" the datastore - no files of any kind show (hidden files? don't know, I kid of assume there is, since it won't let me delete the datastore)
- Not used for HA (the 2 hosts are not in a cluster)
- made sure I/O Control is disabled on all hosts
    - even followed this: VMware Front Experience: How to disable Storage I/O Control for an unavailable datastore
- no snapshots exist on any of the vm's that *were* on this datastore
   - also checked for orphaned *-00000x.vmdk on migrated vm's - none exist
- unmounted the datastore
    - this works from one host, but not the other.
    - unmounting from host1 gives the red "X" on "no virtual machines exist (all others are green)
    - unmounting from host2 unmounts the datastore on host2 but it still shows as mounted on host1
- deleting the datastore (whether mounted or not) fails with the "resource in use" error
0
Comment
Question by:snowdog_2112
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
  • 2
9 Comments
 
LVL 120
ID: 40406976
Do you have VMware vSphere 5.x, which forces checks before you try to unmount a datastore, and tells you why it will not unmount?

We have also seen this strange behaviour of not being able to unmount a datastore, if it's the same issue.

have you checked for processes on the datastore?

We spent many weeks, with VMware Escalation Engineers, dumping the VMFS datastore to find the rouge process which had locked the VMFS file system.

We found the offending process, but could not kill the process, and in the end we had to power off the host.
0
 
LVL 28

Expert Comment

by:asavener
ID: 40407233
I had this problem recently and had to reboot each ESXi host that had connected to the datastore.  Once each host had been rebooted, the offending datastore was gone.
0
 

Accepted Solution

by:
snowdog_2112 earned 0 total points
ID: 40448096
Finally found a fix on this.

I had 2 VM's with locked files.

I vMotioned them to the other host (not a storage vMotion - just a host vMotion).

Once they moved, I was able to remove the datastore.

Thanks for the input.
0
Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

 

Author Comment

by:snowdog_2112
ID: 40448144
I've requested that this question be closed as follows:

Accepted answer: 0 points for snowdog_2112's comment #a40448096

for the following reason:

Sorry Experts, I ended up "solving" this on my own.
0
 
LVL 120
ID: 40448145
Oh, I mention the word "lock" in my opening post. You never came back and responded....other than to close with Sorry Experts, I ended up "solving" this on my own.!

see

http:#a40406976

have you checked for processes on the datastore?

We spent many weeks, with VMware Escalation Engineers, dumping the VMFS datastore to find the rouge process which had locked the VMFS file system.

So, if you don't mind, I'm Objecting to the Closure.
0
 

Author Comment

by:snowdog_2112
ID: 40448224
I went through all of those steps and none of the referenced articles led to the solution.

None of the links, suggestions, or references mentioned "host vMotion".

Based on the findings, I stand by my assessment.

You may be correct that a "process is locked", but the links and advice did not lead directly to my solution.  I *DID* follow your suggestions and did a ton of investigating based on the links, and links from those links, and vmware community support.

It was, in fact, a last-effort desperation before forcing a maintenance window and host reboot that I vMotioned the 2 guests which seemed to be the source of the problem.

I am very appreciative of the suggestions, but I feel it could lead to a "false positive" for someone else searching for the issue.

If you want the points, I'll award them - as longs as people read the entire post and try a host vMotion first.
0
 
LVL 120
ID: 40448315
If my suggested lead to a solution.......
0
 
LVL 28

Expert Comment

by:asavener
ID: 40448349
The solution provided ("reboot all hosts connected to the datastore") would clearly solve the issue.

Rebooting a host causes the guests to be vMotioned off.  Not sure why you would need a maintenance window for rebooting the hosts, since you can clearly vMotion without impacting the users.
0
 

Author Comment

by:snowdog_2112
ID: 40448466
FYI - here is more detail on some of the items I went through.

https://communities.vmware.com/thread/493696
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I will show you HOW TO: Suppress Configuration Issues and Warnings Alert displayed in Summary status for ESXi 6.5 after enabling SSH or ESXi Shell.
In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
Teach the user how to use create log bundles for vCenter Server or ESXi hosts Open vSphere Web Client: Generate vCenter Server and ESXi host log bundle:  Open vCenter Server Appliance Web Management interface and generate log bundle: Open vCenter Se…
Advanced tutorial on how to run the esxtop command to capture a batch file in csv format in order to export the file and use it for performance analysis. He demonstrates how to download the file using a vSphere web client (or vSphere client) and exp…

697 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question