Unable to delete Fiber channel LUN or Datastore from host
search cancel

Unable to delete Fiber channel LUN or Datastore from host

book

Article ID: 411399

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

A Datastore is inaccessible on the host and is unable to be deleted or unmounted
The datastore is showing as mounted but inaccessible
The datastore is showing on the host UI and though host CLI

Environment

ESXi using fiber channel storage 

Cause

The LUN was removed or disconnected from the array side before being unmounted from the host(s) 

Resolution

  • Confirm no VMs or templated or attached to the inaccessible datastore by going to the datastore and checking the VM and template tabs. 
    • If there are any VMs or templates attached to the datastore they will need to be unregister from the host and vCenter

  • Check if the LUN/datastore is used as the persistent scratch location for the host. For more information on persistent scratch, see Creating a persistent scratch location for ESXi 8.x/7.x/6.x 
  •  Identify active VMs on the datastore:

    1. Use the `esxcli` command to list VMs using the datastore:

        #esxcli vm process list
       
        This will show any running VMs that may have their virtual disks on the datastore. 
        If you find any VMs using the datastore, power them off or migrate them to a different ESXi or different datastore.

    2. Check for active files or open files.
        You can use the following command to check if there are open files on the datastore UUID:

        #lsof | grep /vmfs/volumes/########-########-####-############
        This will list processes that have files open on the datastore that will need to be addressed based off the process that has the file open. 

  • Once confirmed the datastore is not in use attempt to unmount via host CLI command "esxcli storage filesystem unmount [-u UUID | -l label | -p path ]"
    esxcli storage filesystem unmount -u ########-########-####-############

    Once unmounted the datastore should be able to be deleted.
  • If the unmount command is still stating the datastore is busy but it is inaccessible and the Fiber channel connection is offline, a reboot of the host will be required. 

Additional Information