Search the VMware Knowledge Base (KB)
View by Article ID

Deleting a datastore from the Datastore Inventory results in the error: device or resource busy (1015791)

  • 39 Ratings

Symptoms

  • When you browse a datastore, it does not have any files or folders.
  • Under /vmfs/volumes/ DATASTORE_NAME there are no files or directories.
  • While deleting a datastore, you see the error:

    Device or Resource Busy

  • Deleting the partition table of this datastore does not resolve the issue.

Resolution

This issue occurs if the datastore is hosting an ISO that is mapped to a virtual machine on an ESX host on which this datastore is mounted. Even if you delete the ISO file from the datastore, the ISO link to the virtual machine is not broken. If you try to delete this datastore, you see the error Device or Resource Busy.
 
To determine if this is the cause:
  1. Browse to the VirtualCenter datastore Inventory.
  2. Select the datastore from the left pane, then click the Virtual Machines tab in the right pane.

    If you have a virtual machine to which the ISO from this datastore is linked, the virtual machine name is listed.
To unmap the ISO:
  1. Right-click the virtual machine and choose Edit Settings.
  2. On the Hardware tab, click the CD/DVD Drive.
  3. In the right pane, de-select Datastore ISO file.

    Note: Client Device is the default option.

  4. Click OK.

Additional Information

Before removing a datastore, ensure that you:
  • Unregister all the virtual machine or templates on that datastore
  • Unmap any ISOs or floppy disks that are stored on the datastore.
  • Remove the datastore from the highest point on the Inventory (the vCenter ServerDatastores view)
  • Verify that the hosts do not display the datastore. If they do display the datastore, click Refresh in the host's Storage section.
  • To identify open files on the datastore that are supposed to be deleted, but appear as open, run this command:

    In ESX – #lsof

    In ESXi – vmkvsitools lsof

See Also

Update History

04/26/2012 - Added commands to find open files that are marked for deletion

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 39 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.

What can we do to improve this information? (4000 or fewer characters)




Please enter the Captcha code before clicking Submit.
  • 39 Ratings
Actions
KB: