VMware Cloud Community
Niedhart003
Contributor
Contributor
Jump to solution

Can't unmount datastore in ESXi

I recently installed ESXi 6.5 on a server.

I am using the ESXi HTML client.

I set up a datastore which now needs to be deleted.

No virtual machines have been installed on the host.

When I try to unmount the datastore, I get the error:

"Failed - the resource "Datastore Name: ..." is in use.

"Cannot unmount volume "Datastore Name: ..." because the file system in busy."

I deleted all the folders, except one, in the datastore. Exception: .sdd.sf ; I can't delete this folder.

In "Advanced settings" under the "System" tab under "Manage" under "Host",

I changed the path for the Key "ScratchConfig.CurrentScratchLocation" to a new folder that

I created in the datastore I am trying to delete - this is an error.  Now I can't delete THAT folder (see next paragraph).

I then tried to change the path again for the same Key "ScratchConfig.CurrentScratchLocation" to a folder I created in /tmp, and get the error "Failed - A specified parameter was not correct."  I then right click on the Key and select "Reset to default" and get the error "Failed - A specified parameter was not correct."

I have googled this problem, and every solution, each of which has several steps, includes a step that doesn't work.

One of the solutions includes over a hundred lines of PowerShell code (I haven't tried it). I've tried several others include EsxCli commands that fail on the critical step.

Given the simplicity of the task, it may be evident that this situation, which has now been ongoing for nearly two days, is devolving into a clown show.

It seems I'm eventually blocked no matter what path I take.

Is there a solution to this problem? I guess I could reinstall ESXi, but this isn't MS. Thanks for any help.

0 Kudos
1 Solution

Accepted Solutions
Niedhart003
Contributor
Contributor
Jump to solution

Thanks Andre and Continuum. You identified my error correctly. Summarizing:

As Andre advised, in "Advanced settings" under the "System" tab under "Manage" under "Host",

I changed the path for the Key "ScratchConfig.ConfiguredScratchLocation" to /tmp  .

I had previously changed the path for the Key "ScratchConfig.CurrentScratchLocation" to a folder that I created in /tmp, an error.

I believe the advice I saw in another forum to modify the path for this Key was correct, but I made an error, and modified the wrong Key.

Following this, I entered Maintenance Mode, and rebooted the host (I had done this before too).

After the reboot, the path for both Keys

"ScratchConfig.ConfiguredScratchLocation"

and

"ScratchConfig.CurrentScratchLocation"

was set to /tmp.

I exited Maintenance Mode.

I was then able to delete all the folders in the datastore except .sdd.sf, which couldn't be deleted.

I was then able to unmount the datastore.

I was then able to delete the datastore.

Thanks again guys.

View solution in original post

0 Kudos
3 Replies
a_p_
Leadership
Leadership
Jump to solution

Just to ensure, it's the "ScratchConfig.ConfiguredScratchLocation" that you want to modify, not the "ScratchConfig.CurrentScratchLocation". The latter should show the reconfigured location after a host reboot.

André

0 Kudos
continuum
Immortal
Immortal
Jump to solution

After setting the option that Andre mentioned you must enter maintenance mode before you reboot.

Otherwise the new settings will not stick.


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

0 Kudos
Niedhart003
Contributor
Contributor
Jump to solution

Thanks Andre and Continuum. You identified my error correctly. Summarizing:

As Andre advised, in "Advanced settings" under the "System" tab under "Manage" under "Host",

I changed the path for the Key "ScratchConfig.ConfiguredScratchLocation" to /tmp  .

I had previously changed the path for the Key "ScratchConfig.CurrentScratchLocation" to a folder that I created in /tmp, an error.

I believe the advice I saw in another forum to modify the path for this Key was correct, but I made an error, and modified the wrong Key.

Following this, I entered Maintenance Mode, and rebooted the host (I had done this before too).

After the reboot, the path for both Keys

"ScratchConfig.ConfiguredScratchLocation"

and

"ScratchConfig.CurrentScratchLocation"

was set to /tmp.

I exited Maintenance Mode.

I was then able to delete all the folders in the datastore except .sdd.sf, which couldn't be deleted.

I was then able to unmount the datastore.

I was then able to delete the datastore.

Thanks again guys.

0 Kudos