Solved

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

Posted on 2014-10-27
9
1,351 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
  • 4
  • 3
  • 2
9 Comments
 
LVL 118
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
 

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
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 118
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 118
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Last article we focus in how to VMware: How to create and use VMs TAGs – Part 1 so before follow this article and perform the next tasks, you should read the first article how to create the TAG before using them in Veeam Backup Jobs.
HOW TO: Upload an ISO image to a VMware datastore for use with VMware vSphere Hypervisor 6.5 (ESXi 6.5) using the vSphere Host Client, and checking its MD5 checksum signature is correct.  It's a good idea to compare checksums, because many installat…
Teach the user how to use configure the vCenter Server storage filters Open vSphere Web Client:  Navigate to vCenter Server Advanced Settings: Add the four vCenter Server storage filters: Review the advanced settings: Modify the values of the four v…
Teach the user how to use vSphere Update Manager to update the VMware Tools and virtual machine hardware version Open vSphere Client: Review manual processes for updating VMware Tools and virtual hardware versions: Create a new baseline group in vSp…

947 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now