?
Solved

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

Posted on 2014-10-27
9
Medium Priority
?
2,071 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 123
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 

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 123
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 123
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

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Is your company's data protection keeping pace with virtualization? Here are 7 dynamic ways to adapt to rapid breakthroughs in technology.
In this article, I will show you HOW TO: Perform a Physical to Virtual (P2V) Conversion the easy way from a computer backup (image).
Teach the user how to install and configure the vCenter Orchestrator virtual appliance Open vSphere Web Client: Deploy vCenter Orchestrator virtual appliance OVA file: Verify vCenter Orchestrator virtual appliance boots successfully: Connect to the …
This tutorial will walk an individual through the steps necessary to enable the VMware\Hyper-V licensed feature of Backup Exec 2012. In addition, how to add a VMware server and configure a backup job. The first step is to acquire the necessary licen…
Suggested Courses

770 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