2 Replies Latest reply on Jul 15, 2019 10:43 PM by Raj1988

    how to delete the inactive LUNS

    VirtualRay Hot Shot

      i lost storage array and we rebuilt the datastores from scratch and restored my vms but as a result i have all the inactive datastores which are not connected to any ESXi and there is no file/VM inside those datastores.

      How I can delete them from vcenter when delete option is grayed-out.

      esxi rebooted but no affect.

      any suggestion.

        • 1. Re: how to delete the inactive LUNS
          RajeevVCP4 Hot Shot
          vExpert

          There could be 2 reason

          Still some of vm have orphaned entry of previous data store , just check 2-3 vm ( edit setting --disk)

           

          Or May be SIOC was enabled on previous DS

          • 2. Re: how to delete the inactive LUNS
            Raj1988 Enthusiast
            • Ensure that the datastore is not referenced by any virtual machine or template or any ISO mounted to any VM from that old datastore .

             

            • If that is not the case then you can delete the Datastore related entries from vCenter Database .

            Run the below query to identify the datastore ID in the vCenter Server database:

             

            select ID from VPX_ENTITY where name ='datastore_name';

            Where datastore_name is the datastore to be removed. The query returns the ID of the datastore.

             

            To remove the datastore from the vCenter Server database:

            Run the below queries to delete the datastore. Where ID is the output from the first step above.

             

            delete from VPX_DS_ASSIGNMENT where DS_ID=ID;

            delete from VPX_VM_DS_SPACE where DS_ID=ID;

            delete from VPX_DATASTORE where ID=ID;

            delete from VPX_ENTITY where ID=ID;