Cant delete .vmdk file that is no longer in use!

JB Blanco
JB Blanco used Ask the Experts™
on
I am trying to delete a .vmdk file that is no longer in use and vcenter will not let me delete it.  I have verified there is no VM with ties to this .vmdk file.

This is the message i get   "Deletion of file or directory [san-flmir-prod6] nsmsqldr01/nsmsqldr01-ctk.vmdk from san-flmir-prod6 was initiated from 'h5-client/6.5.0@127.0.0.1' and completed with status 'Failure'"

This is what i get every time i try to delete this folder.  I've also tried to delete the .vmdk file with the same message in event viewer.

I need to delete this file so i can unmount and remove the datastore and re add it as vmfs 6.    

Please help,  Know anyway i can force its removal?

problem
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
AlexSenior Infrastructure Analyst

Commented:
the VMDK file is locked by your CTK file

https://blah.cloud/infrastructure/safely-checkremove-orphaned-vmdk-files-from-esxi/

Follow that and flatten it out.
JB BlancoSr Systems Engineer

Author

Commented:
the VMDK file is locked by your CTK file

https://blah.cloud/infrastructure/safely-checkremove-orphaned-vmdk-files-from-esxi/

Follow that and flatten it out.


Thanks, i will give that a try now
JB BlancoSr Systems Engineer

Author

Commented:
Tried that, but still no go.

Here is what i get when i try to run vmkfstools -D on that -ctk.vmdk file

[SGWS\jblancoadm@flmir-esxp01:~] vmkfstools -D nsmsqldr01-ctk.vmdk
Could not get the dump information for 'nsmsqldr01-ctk.vmdk' (rv -1)
Could not dump metadata for 'nsmsqldr01-ctk.vmdk': Function not implemented
Error: vmkfstools failed: vmkernel is not loaded or call not implemented.
Should you be charging more for IT Services?

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

JB BlancoSr Systems Engineer

Author

Commented:
Its also not locked by any ESXi host.  So it just wont let me delete the vmdk or the -ctk file
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017
Commented:
Locked by CTK file eh!!!??? foo!

It's locked by a host process.

You will need to kill the host process before deleting and check it's not in use for real!

which can be a task chasing the dragon lock process.... if you can restart the host (it's easier!)
JB BlancoSr Systems Engineer

Author

Commented:
i do not know which host is locking the file and i tried the above commands which usuallly gives me some information, but it wont work.

any other commands i can run to figure this out?
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
reboot host server

check the processes on each host
Sr Systems Engineer
Commented:
I rebooted each host during the wee morning hours.  only 4 hosts so i did not mind.  

Problem resolved.
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
that’s what I suggested!!!!
JB BlancoSr Systems Engineer

Author

Commented:
i did this all before you suggested to reboot.  And i was trying to avoid having to do that.   That was the reason for the thread.  

But thanks for your help!
Andrew Hancock (VMware vExpert / EE Fellow)VMware and Virtualization Consultant
Fellow 2018
Expert of the Year 2017

Commented:
I mentioned it twice because you were being led down the garden path with foo!

You will need to kill the host process before deleting and check it's not in use for real!

which can be a task chasing the dragon lock process.... if you can restart the host (it's easier!)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial