VMware Cloud Community
PDurandjr
Contributor
Contributor
Jump to solution

Need help making a no longer existing datastore go away

I have a datastore that no longer exists on my SAN.  It still shows up in inventory as inactive.  I cannot delete it.  When I try to I get the following:

Call "HostDatastoreSystem.RemoveDatastore" for object "datastoreSystem-121" on vCenter Server "VCENTERSERVER2.onebane.com" failed.
Operation failed, diagnostics report: Unable to query live VMFS state of volume.: No such file or directory

Additionally, one of my hosts shows that it is still connected to it which is interesting because the LUN is gone.  No VM's show up on the Virtual Machines tab.

Is there a way to force this LUN out of inventory?

Thanks so much!

Reply
0 Kudos
1 Solution

Accepted Solutions
continuum
Immortal
Immortal
Jump to solution

I have not seen instructions either - I just log in via ssh as root
Then I use winscp and navigate to /etc/vmware
There you can right-click esx.conf and edit it.

That helped me once to fix a similar issue.

You will find  a section starting with
/storage/lun

Every LUN has two lines ... I just removed the two lines for te LUN in question.

Create a backup of the file first


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

View solution in original post

Reply
0 Kudos
9 Replies
sparrowangelste
Virtuoso
Virtuoso
Jump to solution

do a refresh/rescan of your datastores and it should go away as long as its unpresented on the san side

--------------------- Sparrowangelstechnology : Vmware lover http://sparrowangelstechnology.blogspot.com
Reply
0 Kudos
PDurandjr
Contributor
Contributor
Jump to solution

I tried to rescan but it's still there.  The LUN is actually still on the SAN but I removed access to all hosts in the SAN settings so ESX should not see it.

Reply
0 Kudos
continuum
Immortal
Immortal
Jump to solution

Maybe it helps to remove it from /etc/vmware/esx.conf


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
a_p_
Leadership
Leadership
Jump to solution

Issues like this are often seen if there's still a reference to the deleted/removed datastore (e.g. an ISO file mounted to a VM) Another reason could be a VM with a snapshot which - at the time of creation - had a reference to this datatstore.

André

PDurandjr
Contributor
Contributor
Jump to solution

Can you please give me a link to instructions on how to modify /etc/vmware/esx.conf?  Sounds like you might have the right idea.  I have not had any experience yet with this procedure so need some direcetion.

Thanks!

Reply
0 Kudos
continuum
Immortal
Immortal
Jump to solution

I have not seen instructions either - I just log in via ssh as root
Then I use winscp and navigate to /etc/vmware
There you can right-click esx.conf and edit it.

That helped me once to fix a similar issue.

You will find  a section starting with
/storage/lun

Every LUN has two lines ... I just removed the two lines for te LUN in question.

Create a backup of the file first


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
PDurandjr
Contributor
Contributor
Jump to solution

Gotcha.  I'll give it a shot and report back.  Thanks!!!!

Reply
0 Kudos
PDurandjr
Contributor
Contributor
Jump to solution

That did it.  That's been annoying me for some time now.  Thanks so much!!!

Reply
0 Kudos
TSJANG
Contributor
Contributor
Jump to solution

after two line delete, Does host reboot?

it seems still datastore, and rescan then remake previous 2 line in esx.conf.

I was not able to datastore. so I did delete in storage of unisphere.

Plz HELP~

Reply
0 Kudos