VMware Cloud Community
aguacero
Hot Shot
Hot Shot

Unable to Remove Datastore from one host within ESX Cluster

Hey all,

I'm cleaning up the existing environment which has multiple of datastores either dedicated to a single VM or a large one for multiple VMs. I am unable to remove one datastore in particular from one host within my esx cluster. The other hosts I was able to remove it with no problems whatsoever. The error I get is "Error during the configuration of the host: DestroyVmfsDatastore: can't delete partition 1 on lun vmhba40:26:0". I've performed the "rescan" at the Storage Adapters and the "refresh" at the Storage. It still shows upon this single host. The rest are no longer connected to this datastore. Assistance is much appreciated.

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!!
Reply
0 Kudos
9 Replies
weinstein5
Immortal
Immortal

Perhaps is there a file that is locked open out there -

If you find this or any other answer useful please consider awarding points by marking the answer correct or helpful
aguacero
Hot Shot
Hot Shot

I guess I will have to put the host into maintenance mode to clear it and reboot the box. Hmm.

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!!

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!!
Reply
0 Kudos
bggb29
Expert
Expert

Try a rescan of the hba's from the console

Reply
0 Kudos
aguacero
Hot Shot
Hot Shot

In looking at the Datastore in question, I do see a single flat.vmdk file. I've tried removing the file but get the error "device or resource busy". No VMs are using this vmdk file. I'm wondering if an old VM hanged up the system and that VM was removed.

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!!
Reply
0 Kudos
bggb29
Expert
Expert

try running vm-support -x to see if there is still a world id.

ps auxfww | grep <vmname>

either of these may return a pid that you can kill.

Reply
0 Kudos
Ajay_Nabh
Enthusiast
Enthusiast

Hi All

How I fixed this issue by login into individual servers using VI client and removing it mannualy. I get this error that "resource is in use" even though datastore is empty.

Hope this help..

Cheers

Ajay

Reply
0 Kudos
rt4808
Contributor
Contributor

Ajay Nabh solution worked for me too! Thanks Ajay.

Reply
0 Kudos
TXProblemSolver
Contributor
Contributor

Here is what worked for me:

  1. Make sure the datastore is empty
  2. Using the "maps" view see if any machines are still connected to  the datastore. If you ever had iso images or floppy images on that  datastore it is possible that the virtual machines are still pointing to  the images that no longer exist and that will prevent you from being  able to delete the datastore.
  3. After you have checked your virtual machines make sure you have no  templates that have CD drives or floppy drives connected to  non-existant images that used to be on that datastore. To fix this just  convert the template into a VM edit the CD or floppy to remove the  connection and then convert the VM back into a template so the template  is no longer connected to that datastore.

At that point you should be cleared to delete the datastore without error.

Note:  It took me a minute to realize that there were templates with drives  connected to non-existant files that used to be on the datastore I was  trying to delete.

Reply
0 Kudos
crescendas
Enthusiast
Enthusiast

We have a 1TG iSCSI Datastore  mapped into ESX 4.0. After  expanding this to 2TG and realizing that ESX 4.0 can only support up to 2TG-512kb, we are no longer able to remove this Datastore. Error  message:

Remove datastore
192.168.190.199
Error during the configuration of the host:
DestroyVmfsDatastore: can't delete partition 1 on lun
naa.6090a068c0a6e5bc8fcd14481201102c

What can we do about this? I have tried to login directly into this ESX server instead of vCenter to remove this Datastore but the same error message appear.

Reply
0 Kudos