VMFS datastore fails to unmount with 'filesystem is busy' due to stale VM world reference
search cancel

VMFS datastore fails to unmount with 'filesystem is busy' due to stale VM world reference

book

Article ID: 423273

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

  • A VMFS datastore to unmount from a single host with warning:

    The resource 'Datastore Name: <datastoreName> uuid: <VMFS_UUID>' is in use. Cannot unmount volume 'Datastore Name: <datastoreName> VMFS uuid: <VMFS_UUID>' because 'file system is busy'. Correct the problem and retry the operation.

  • There are no VMs or VM Templates registered on the datastore. This is confirmed from the vSphere Client.


Environment

VMware vSphere ESXi (all versions)

Cause

In a rare instance, where a VM storage is migrated from the datastore to be unmounted, and the VM continues to run on the same host, the VM world remains associated with the datastore's backing LUN:

Verification:
On the LUN backing the datastore, where the VM currently runs:

esxcli storage core device world list -d naa.#############################
Device                                                        World ID    Open Count   World Name
---------                                                        -----------     ----------------   -----------------
... 
naa.#############################  521994                       1   vmm0:<VmName>
...

On the LUN backing the datastore to be unmounted, the same VM world ID remains referenced:

esxcli storage core device world list -d naa.#############################
Device                                                        World ID    Open Count   World Name
---------                                                        -----------     ----------------   -----------------
... 
naa.#############################  521994                       1   vmm0:<VmName>
...

(The world ID is an example and will differ for any given VM.)

The VM is confirmed to be running from the new datastore:
esxcli vm process list 
...
<VmName>
World ID: 521994
Process ID: 0
VMX Cartel ID: 521977
UUID: ## ## ## ## ## ## ## ##-## ## ## ## ## ## ## ##
Display Name:<VmName>
Config File: /vmfs/volumes/<VMFS UUID>/<VmName>/<VmName>.vmx

Resolution

  • Migrate the VM to another ESXi host.
    • This causes the VM world to be terminated on the host, removing the reference to the world on the LUN with datastore to be unmounted.

  • Unmount the datastore.

  • The VM may be migrated back to the original host if required.

Additional Information

There are several possible reasons why a datastore may report "in use/fileystem is busy" when unmount is attempted. For a list of possible causes see:

Detach a LUN device from ESXi hosts