I am testing out a iSCSI SAN solution in my vSphere environment and have been adding/removing LUNs on the SAN host while some were left connected on ESXi hosts. I had enabled Storage I/O Control on the datastores and now I cannot remove them. The errors received is:
Call "HostDatastoreSystem.RemoveDatastore" for object "datastoreSystem-580" on vCenter Server "VCENTER1" failed.
Cannot remove datastore 'ramdisk' because Storage I/O Control is enabled on it. Correct it and re-try the operation
I cannot disable Storage I/O Control since I cannot right click on the datastore and get to the Properties option. There is a KB article for removing inaccessible NFS datastores:
But this doesn't seem to apply to iSCSI datastores. I no longer have the LUN available to represent.
I have also tried unlclaiming the storage device and get an error that it is still busy:
~ # esxcli corestorage claiming unclaim -t device -d naa.600144f0a4a4450000004d7ae2dd0002
Errors:
Unable to perform unclaim. Error message was : Unable to unclaim all requested paths. Some paths were busy or were the last path to an in use device. See VMkernel logs for more information.
How can I remove the iSCSI datastore that is missing the LUN?
Unfortunately, I was forced to reboot this host. I will try contacting VMware about the issue. Though I would guess it is likely a bug on the ESXi 4.1 build I was running.
After a reboot the LUNs were gone and vSphere allowed me to vMotion freely.
I would try to check if other excli commands apply here http://pubs.vmware.com/vsphere-50/index.jsp?topic=/com.vmware.vcli.ref.doc_50/esxcli_storage.html
For example "storage core device detached list" seems like a good start. This guide may be helpful too:
http://pubs.vmware.com/vsphere-50/index.jsp?topic=/com.vmware.vcli.examples.doc_50/cli_manage_files.5.6.html
I found the KB on the vmware site.
Connect to each ESXi 5.0 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 5.0 host in the maintenance mode and then reboot the host.
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2011220