VMware Cloud Community
forzajuve
Contributor
Contributor

Delete Datastore Error

Hello, recently I have migrated vm via storage vMotion. Now when I try to delete the old datastore it says "The resource is in use". I have investigated that no ISO files have been mounted to the vm from this datastore and it's empty. Can you help me?

10 Replies
Kedar_D
Enthusiast
Enthusiast

Make sure you have gone through the checklist mentioned in KB.

VMware KB: Unmounting a LUN or detaching a datastore/storage device from multiple VMware ESXi 5.x ho...

------------------------------------------------------------ If you find this or any other answer useful please mark the answer as correct or helpful. Kedar http://virtualtechknow.wordpress.com/ ------------------------------------------------------------
Reply
0 Kudos
forzajuve
Contributor
Contributor

I've checked all of these before. It didn't help Smiley Sad  Is there any command on Power CLI to find out whether datastore related some object in vsphere environment or not? By the way I'm using vsphere 4.1

Reply
0 Kudos
a_p_
Leadership
Leadership

Does any of your VM's have snapshots? Maybe an ISO was mounted at the time the snapshot was created!? In this case you will need to delete the snasphot. You may also check your VMs "Summary" tabs in the vSphere Client, to see whether the datastore you want to remove still shows up for one of them.

André

forzajuve
Contributor
Contributor

I've checked snapshots too. What a dilemma ha?! Smiley Sad

Reply
0 Kudos
krish290785
Enthusiast
Enthusiast

Can share a couple of screenshots.?

  • Browse Datastore
  • Configuration->Storage->Datastore->Right click Properties
-Bala Krishna Gali If the above info is useful, please mark answer as correct or helpful.
forzajuve
Contributor
Contributor

Here are, I've attached..

Reply
0 Kudos
sebek
Enthusiast
Enthusiast

Hi forzajuve,

Could you post ESX shell output, please? Rescan your SAN again. What is the array you are connected to?

Last resort - you can destroy or unmask the LUN on array and recreate/reconnect it later.

forzajuve
Contributor
Contributor

Hi sebek,

What did you mean about ESX shell output? The SAN storage is IBM DS4700. I have tried to delete datastore by deleting mapping from storage appliance but it haven't worked ether.

Reply
0 Kudos
sebek
Enthusiast
Enthusiast

I meant for example output of ls command issued from ESX host console. Did you try to delete the volume from different ESX? Try "esxcli system coredump file list" than check if coredump file is locking your volume

You can find detailed procedure here Cannot remove datastore * because file system is busy. | Virten.net

Have a look here http://www.vmadmin.co.uk/vmware/35-esxserver/90-vmfslockedfilerelease

Try to use vmkfstools with -B or -L switches

forzajuve
Contributor
Contributor

It's DONE! I don't know why but when I tried to get the error message again, it deleted without any error. All I did recently was installing VAAI driver to all 3 hosts. I didn't do anything else. Sebek, I think core dump files are used in version 5 and higher it would not help me anyway. But anyway THANK YOU GUYS for your RESPONDS!                 I appreciate it!!!

Reply
0 Kudos