VMware Cloud Community
quartz201110141
Contributor
Contributor

unable to delete a datastore

Hi !

a datastore was nearly full, so i decide to increase it. The datastore was used by a partition 's VM

Here how i proceed :

1 - I put the datastore offline

2 - I umount the datastore from vcenter

3 - i try to delete it, but impossible; the message was it is still used. It was used by the VM

4 - so i try to migrate all the VM to an other datastore, but impossible the process failled and the VM stop.

5 - i decide to delete the partition from the VM and boot

6 - the VM is up and ok

When il look the VM tab from the datastore , i could still see the VM while the datastore is ofline and the partition deleted

i don't now how to break the link so the VM will not point to the datastore.

i notice that there is a snapshot on this VM. it mean that i delete the partition while a snapshot was present; could be the source of the problem ?

Now i hesitate to consolide the VM, i m afraid that the consolidation fail.

Thanks for helps !

0 Kudos
7 Replies
HassanAlKak88
Expert
Expert

Hello,

First of all, to increase a data store you are not obligated to follow your process.

Please advise on the type of this data store (ISCSI, SAN, .....)

And can you share some screenshots which present the current situation for this data store.


If my reply was helpful, I kindly ask you to like it and mark it as a solution

Regards,
Hassan Alkak
0 Kudos
quartz201110141
Contributor
Contributor

Hi Hassan,

I thank you for your response !

The datastore is a volume created in a san equallogic. From the VM i have had created a new disk and pointed it  to the datastore

here is the state of the datastore :

Summary tab :

summary of the datastore.png

datastore config.png

files Tab :

files-in-the-datastore.png

VM Tab

VM-Tab.png

yesterday, i reset Vcenter,  i put the datastore online and mount it from the host witch manage the VM in question. In this VM ( webetud321 in the screenshot) the partition witch was pointing to the datastore  is deleted, but not the files, they  remained in the datastore.

currently, the VM  has a sbnapshot

Thanks in advance !

sincerely

0 Kudos
ThompsG
Virtuoso
Virtuoso

Hi quartz201110141,

Removing or deleting the partition within the VM will not free space on the datastore or array... well not unless you have Thin provisioned LUNs and the like.

I'm understanding that you are wanting to remove the VMDK files from the datastore called Eql_G2.COURSE-MOOD (as per your screenshot)? If so then you will have to remove the snapshot (do not select 'revert' or you will lose all your changes) before you can remove the VMDK from the machine and free the space from the datastore. Another option is to use either Storage vMotion or migrate the VM when it is powered off if you don't have this feature available. If you select the advanced options you can just move the individual VMDK rather than the whole machine.

Make sure you have a good and tested backup if you are concerned with consolidating your snapshots. It's considered not a very good idea to run snapshots for an extended period of time so unless you have a very specific reason for keeping the VM running under a snapshot, you should be considering removing them anyway.

Kind regards.

0 Kudos
HassanAlKak88
Expert
Expert

Great,

As I understand, your request is to increase the datastore size and then increase the partition size inside the guest OS VM.

For that, you can edit the LUN in your SAN environment with the size needed, then go to host, datastore, and right click the datastore and select Increase as below:

pastedImage_0.png

After that you can edit the VM settings, from virtual disk and edit the size needed. then from OS level increase the partition size.


If my reply was helpful, I kindly ask you to like it and mark it as a solution

Regards,
Hassan Alkak
0 Kudos
quartz201110141
Contributor
Contributor

Hi ThompsG, Hi hassan

First i tried to increase the data, but because of some problem i decide to delete it. Unfortunately it persist because the VM seem to still use it although the partition is delete.

ThompsG points that the snapshot is involved. So as ThompsG suggest, il m going to stop the VM, to migrate it ( via à copy) in another host and process a consolidation.

to be continued ...

thanks for all

0 Kudos
quartz201110141
Contributor
Contributor

Hi !

Once the VM stopped, i clone it ( i have to clone it in an other host but also at the same time in another datastore).  everything went well and the VM start normally.

moreover i also do a snapshot  ( VM was stopped), i was warned that some snapshot could be deleted ( i supposed the snapshot of the partition deleted previously). everything went also well and the link to the datstore was breaked, and i could delete it.

Thanks to everybody !

0 Kudos
ThompsG
Virtuoso
Virtuoso

Excellent and well done!

0 Kudos