Solved

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

Posted on 2014-10-27
9
1,858 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 121
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
Free NetCrunch network monitor licenses!

Only on Experts-Exchange: Sign-up for a free-trial and we'll send you your permanent license!

Here is what you get: 30 Nodes | Unlimited Sensors | No Time Restrictions | Absolutely FREE!

Act now. This offer ends July 14, 2017.

 

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

Automating Your MSP Business

The road to profitability.
Delivering superior services is key to ensuring customer satisfaction and the consequent long-term relationships that enable MSPs to lock in predictable, recurring revenue. What's the best way to deliver superior service? One word: automation.

Question has a verified solution.

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

The following article is comprised of the pearls we have garnered deploying virtualization solutions since Virtual Server 2005 and subsequent 2008 RTM+ Hyper-V in standalone and clustered environments.
In this article, I will show you HOW TO: Install VMware Tools for Windows on a VMware Windows virtual machine on a VMware vSphere Hypervisor 6.5 (ESXi 6.5) Host Server, using the VMware Host Client. The virtual machine has Windows Server 2016 instal…
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…
This Micro Tutorial walks you through using a remote console to access a server and install ESXi 5.1. This example is showing remote access and installation using a Dell server. The hypervisor is the very first component of your virtual infrastructu…

687 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