We help IT Professionals succeed at work.

Removing Inaccessible NFS datastore in vSphere 6.7.0

Ben Conner
Ben Conner asked
on
Hi,

I have a NFS datastore that is no longer accessible. Didn't have anything on it but I can't unmount it.  When I do I get the message:

The resource 'BU1' is in use.
Cannot remove datastore 'BU1' because "system swap is enabled on it". Correct the problem and retry the operation.

I don't recall putting anything on it, much less enabling it for system swap.  ?

6.7.0 w/ VCSA.

--Ben
Comment
Watch Question

Mr Tortu(r)eSystem Engineer

Commented:
Hi,

in fact it seems to be actually used by something, preventing unmount or remove

Some things to check which could help :

- ESX / Configure / advanced settings > look at syslog.global.logdir and mostly scratchconfig settings
If this last one point t your nfs datastore, change it and reboot ESX, then unmount/remove datastore
- ESX / Configure / VM / Swap file location
- ESX / Configure / System / System Swap
...

What is the precise error message? is it really system swap is enabled on it ? I never seen this one, generally it is more ressource/device is busy generic message
Ben ConnerCTO, SAS developer

Author

Commented:
Hi,

Sorry for the delay; injured spouse.

The exact error message is: "The resource 'BU1' is in use.
Cannot remove datastore 'BU1' because "system swap is enabled on it". Correct the problem and retry the operation."

System Swap file has:

    Can use datastore: 970Pro
    Can use host cache
    Can use datastore specified by host for swap files

VM Swap file location is:

     Virtual machine directory

The syslog.global.logdir value is  [] /scratch/log

The ConfiguredScratchLocation and CurrentScratchLocation both point to /vmfs/volumes/5bca7765-e61b9be8-a031-ac1f6b19f7c0
which isn't the location of the missing NFS volume (ds:///vmfs/volumes/6a3eed65-7142512f/).

--Ben
CTO, SAS developer
Commented:
Had to call in a VMWare expert on a different issue, and while here I had him look at (and fix) the NFS problem.  He couldn't do it through the web UI.  Had to resort to an esxcli command to remove the bogus datastore.

Thanks so much for trying to figure this one out.

--Ben