VMware Cloud Community
ucsd_jason
Contributor
Contributor
Jump to solution

Cant unmount/delete NFS datastore because its in use, but its not

I am trying to remove an old NFS datastore, but I keep getting an error saying that it is in use. I have located the VM that it believes is using it, stepped thru all of the VM settings and there is nothing pointing to that NFS datastore. I also tried to remove the datastore from the command line using "esxcfg-nas -d <NFS_Datastore_Name>". That returned an error saying "Unknown filesystem, cannot remove". Yet 30 mins prior I was accessing and moving data off of that datastore from an different ESX host. I dont know what else to try. Can anyone please help out?

Tags (3)
1 Solution

Accepted Solutions
a_p_
Leadership
Leadership
Jump to solution

It also still shows up on the VM as a inactive used storage...

Does the VM have an active snapshot which was created while the VM was located on the NFS datastore?

André

View solution in original post

6 Replies
a_p_
Leadership
Leadership
Jump to solution

Often s.th. like this occurs if a VM had e.g. an ISO file from that datastore attached as the CD-ROM drive (even if it is not connected at the moment). Please check the VM's to and set the virtual CD-ROM drive to "Client Device" in such a case.

André

Realitysoft
Enthusiast
Enthusiast
Jump to solution

Hi,

I have the same issue with smaller migration storage devices (qnap). If you can offline/unmount the NSF store via the storage device then you are able to remove/delete okay.

Realitysoft

Thanks, Jim
Reply
0 Kudos
ucsd_jason
Contributor
Contributor
Jump to solution

Realitysoft - So part of my problem has been resolved. After doing what you suggested I was able to delete the share from ESX host using "esxcfg-nas -d <NFS_Datastore_Name>".  But it still shows up in the vCenter Datastore Inventory, but this time inactive. It also still shows up on the VM as a inactive used storage, even though its ESX host does not have it listed anymore under Configuration - Storage. Weird huh??!!

André - I have verified that it is not connecting to the datastore in the settings. All of the hard drives are pointing to a different datastore and the CD Drive is set to Client Device.

Thanks to both of you for your help thus far.

Reply
0 Kudos
a_p_
Leadership
Leadership
Jump to solution

It also still shows up on the VM as a inactive used storage...

Does the VM have an active snapshot which was created while the VM was located on the NFS datastore?

André

ucsd_jason
Contributor
Contributor
Jump to solution

It does have a snapshot. I didnt even think to check that! Ill let you know if that resolved my issue or not when it finishes removing the snapshot. Thanks!

Reply
0 Kudos
ucsd_jason
Contributor
Contributor
Jump to solution

That resolved the issue! Thanks again for your help

Reply
0 Kudos