vSphere Storage Appliance

 View Only
Expand all | Collapse all

Unable to remove datastore

  • 1.  Unable to remove datastore

    Posted Nov 23, 2010 03:54 PM

    Hi,

    When I try to remove a datastore from vsphere I get the following error:

    Call "HostDatastoreSystem.RemoveDatastore" for object "datastoreSystem-15" on vCenter Server "xxxxxx" failed.

    The datastore is emtpy and we want to unpresent it to the hosts. Is there a way to remove a datastore via the CLI? If I unpresented it to the hosts via the SAN would this cause any issues?



  • 2.  RE: Unable to remove datastore

    Posted Nov 23, 2010 04:21 PM

    Try to remove the datastore by connecting to one of the ESX hosts directly using vSphere client first.

    If that fails we can then try to delete the datastore from the command line.

    If you found this or other information useful, please consider awarding points for "Correct" or "Helpful".

    Regards,

    Arun

    VCP3, VCP4, HPCP, HP UX CSA



  • 3.  RE: Unable to remove datastore

    Posted Nov 23, 2010 05:09 PM

    Removing from the host directly gives:

    Call "HostDatastoreSystem.RemoveDatastore" for object "ha-datastoresystem" on ESX "10.0.0.47" failed



  • 4.  RE: Unable to remove datastore

    Posted Dec 07, 2010 02:47 PM

    I had the exact same error. Renamed the datastore, then deleted it without probs :smileywink:



  • 5.  RE: Unable to remove datastore

    Posted Dec 16, 2010 07:08 PM

    Everything is removed from the datastore I tried renaming the datastore I am getting the same error.  Call "HostDatastoreSystem.RemoveDatastore

    Then in the Tasks list is says my datastore is in use I have no idea how. 



  • 6.  RE: Unable to remove datastore

    Posted Dec 16, 2010 07:39 PM

    Are you sure that you don't have any VM which may think it has something on that datastore?  Maybe a connected ISO image or a VMDK that may have been there at some time?



  • 7.  RE: Unable to remove datastore

    Posted Dec 16, 2010 08:30 PM

    I just called VMware support but no, I dont have any ISO's attached to it.

    One odd thing is that this was the datastore for our test View setup.  After about an hour this folder automatically appears even thoguh I delete it .naa6006048C04083591b50ac1488dcbd2ac with one file in the directory called "Slotsfile" that is .63KB



  • 8.  RE: Unable to remove datastore

    Posted Dec 16, 2010 09:45 PM

    I figured it out, I had to remove storage I/O Control through Vcenter before I could delete the datastore.  Hopefully this helps someone else who had this issue.  An interesting point as well is that when I tried to remove the datastore through Vcenter I got that generic message everyone else got.  However, when I loaded just the vi client for the ESX host and attempted a delete it gave me the message saying that Storage I/O is on.  So when in doubt dont use Vcenter go right to the ESX host. 



  • 9.  RE: Unable to remove datastore

    Posted Aug 16, 2013 02:48 AM

    I have faced same issue, it was resolve after deleting datastore using command line.

    partedUtil delete "/vmfs/devices/disks/DeviceName" PartitionNumber

    I have followed VMware KB :

    http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1036609



  • 10.  RE: Unable to remove datastore

    Posted Jul 22, 2016 08:19 PM

    Used the following command to find all the VMs with attached CD ISOs:

    Get-VM | FT Name, @{Label="ISO file"; Expression = { ($_ | Get-CDDrive).ISOPath }}



  • 11.  RE: Unable to remove datastore

    Posted Nov 08, 2013 06:09 PM

    Hi Everybody,

    I was with the same problem

    It was solved by shutting down the running virtual machines , connect directly into host and then delete successfully the LUN

    Regards,

    Reinaldo



  • 12.  RE: Unable to remove datastore

    Posted Nov 10, 2013 11:39 PM

    You cannot remove an inactive NFS datastore with Storage I/O Control enabled. However, when the back end volume is ungracefully removed, Storage I/O Control cannot be disabled.


    Check this KB for more information about this


    VMware KB: Unable to remove an inaccessible NFS datastore with Storage I/O control enabled


    Best regards

    Yours, Oscar



  • 13.  RE: Unable to remove datastore

    Posted Nov 23, 2013 10:44 AM

    Hi,

    If the datastore which you want to remove stores ISO files, one of ISO files might be attached to a VM.

    Just right click on the VM, click "Edit Settings..." and when you click "CD/DVD drive 1", you should probably see "Datastore ISO file" selected on the right side. So change this to "Client Device" and then press OK...

    Now you can remove datastore successfully.

    King regards.



  • 14.  RE: Unable to remove datastore

    Posted Jun 21, 2014 11:06 AM

    Thanks that was exactly my case - so easy but such an impact :smileywink:



  • 15.  RE: Unable to remove datastore

    Posted Nov 19, 2014 04:12 PM

    i had the same issue. the "inactive" datastore was attached to only one host. it disappeared right after restarting the management agent of that host through troubleshooting options "as attached".



  • 16.  RE: Unable to remove datastore

    Posted Sep 04, 2015 04:44 PM

    in my case its a FC channel i moved.. so go to storage adapter -> choose right vmhba in the fc list... in details right click the dead fc channel and unmount... THEN go back to storage and rescan. et voila !



  • 17.  RE: Unable to remove datastore

    Posted May 24, 2016 06:18 AM


  • 18.  RE: Unable to remove datastore

    Posted May 02, 2017 10:27 AM

    Try below steps to fix this issue.

    Connect to each ESXi  host to which the LUN is presented by using SSH.

    Run this command to stop the SIOC service:

    /etc/init.d/storageRM stop

    In the vSphere Client, select the host and then click the Configuration tab.

    Click Rescan All.

    After the rescan completes, run this command to restart the SIOC service:

    /etc/init.d/storageRM start

    Note: If the issue persists, put the affected ESXi host into maintenance mode and then reboot the host.



  • 19.  RE: Unable to remove datastore

    Posted May 19, 2020 07:45 AM

    In my case it was a syslog defined on several ESXi hosts directing to the undetectable DS.

    check Syslog.global.logDir