VMware Cloud Community
highlandclinic1
Contributor
Contributor
Jump to solution

Manually remove deleted datastore from vCenter appliance

Hi all,

I was doing some storage cleanup today and accidentally deleted a datastore LUN that had not yet been removed from Vcenter (or any of the hosts).  Of course deleting it, etc fails now.  I found this article for manually removing datastores, but it seems to be expecting Vcenter to be running from a Windows server/MSSQL database.  I am running the latest version of the Suse based appliance.  Can someone help translate these instructions into a set I can use on the appliance?

Thanks!

0 Kudos
1 Solution

Accepted Solutions
highlandclinic1
Contributor
Contributor
Jump to solution

Thanks to both of you...

Actually, I don't know why I didn't think to do this anyway, but here's all I did:

Switch to Datastore view

Click on the dead DS, and then on the hosts tab. The hosts that think the DS is still alive will be listed.

Click on each host and tell it to rescan the HBAs, etc. When they've finished scanning, they'll drop off the list. Eventually, the DS will disappear.

No need to reboot the host, but that suggestion gave me this idea. Also, good info on the DB tools for the appliance. I may have to reference those again...

View solution in original post

0 Kudos
5 Replies
julienvarela
Commander
Commander
Jump to solution

Hi,

Your datastore is greyed out ? did you try to simply reboot all your hosts ? its should be enough.

Regards,

Julien.

Regards, J.Varela http://vthink.fr
raog
Expert
Expert
Jump to solution

If Julien's answer didn't work out for you.. you can try connecting to the "VCDB" database using dbsolo or pgadmin and then following the queries listed in the KB. You will need to do the changes to

/storage/db/vpostgres/pg_hba.conf and /storage/db/vpostgres/postgresql.conf to allow connections from another machine.

Regards

Girish

To Virtualization and beyond! PS::If you felt the answer as helpful, please mark it as helpful/answered so that it helps other users as well! Blog:: www.virtualtipsntricks.com
highlandclinic1
Contributor
Contributor
Jump to solution

Thanks to both of you...

Actually, I don't know why I didn't think to do this anyway, but here's all I did:

Switch to Datastore view

Click on the dead DS, and then on the hosts tab. The hosts that think the DS is still alive will be listed.

Click on each host and tell it to rescan the HBAs, etc. When they've finished scanning, they'll drop off the list. Eventually, the DS will disappear.

No need to reboot the host, but that suggestion gave me this idea. Also, good info on the DB tools for the appliance. I may have to reference those again...

0 Kudos
Brellian
Contributor
Contributor
Jump to solution

In our case, the rescan technique caused one of our "ghost" datastores to be removed from the vCenter interface, but several others remained.  But then we noticed that the defunct datastore was referenced as the source of CD/DVD Media drives on several VM's.  Even though the virtual CD/DVD drives were not "mounted" on the VMs this seems to have been causing the VM to count the detached datastore as a dependency.  Reconfiguring the CD/DVD Media fields of these VMs to reference a disk image on a live datastore caused vCenter to remove the errant reference/dependency.

0 Kudos
Brellian
Contributor
Contributor
Jump to solution

P.S.: once we purged our VMs' references to the old storage by changing CD/DVD references, we were finally able to fully remove the old storage from the Datastore view after running through the rescan technique documented here a final time.

0 Kudos