Unable to delete old VMDK files

VeeamOne has identified a bunch of garbage files in one of my datastores.  They were from an old VM that is no longer in use and was deleted a couple years ago.  they have not been touched at all in at least 2 years.  I have tried everything to delete these files., they are all old vmdk and flat files.  They can't be deleted from SSH or in vsphere as they are somehow locked.

The owner of said lock is all zeroes and there are not any open files on any ESX host(vmkvsitools lsof | grep nameofoldvm), (lsof | grep partialnameofoldvm).

All the hosts have recently been rebooted as we just did a UCS firmware update.  They were all properly placed in maintenance mode and then rebooted.....While waiting for VMware to call me back on this, I figured I would toss it out here in the hopes that someone may have come across this and may be able to help.
LVL 2
Jonathan BriteSystem AdminAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Sarat chsystem adminCommented:
Any specific error you are receiving.

Please go through this KB article if not already tried and if applies to your case.

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1039362
Jonathan BriteSystem AdminAuthor Commented:
The error we are getting is “Error:  Cannot delete file” in vsphere and the error we get from cli is “cannot remove 'XX-XXXX-X-001.vmdk': Invalid argument”.  

The files are not attached to any VM  and are not actively open on any host.(verified by running “vmkvsitools lsof | grep XX-XXXX-X-001” and “lsof | grep XX-XXXX-X-001” on all 8 of our hosts.

We have also recently rebooted every host.  These files have not been touched in a couple years.

"find /vmfs/volumes/* -name *.vmx -exec grep -Hi XX-XXXX-X-001.vmdk {} \;" does not return anything either and has been run on every host(we have 8 blades).
Jonathan BriteSystem AdminAuthor Commented:
ok.  So I figured it out on my won...(Still waiting on a call from Vmware sadly).

The solution was quite simple...

As I already verified these files were not attached to any VM, and were not actively in use on any host, i created a new folder in the directory where they resided.
Once I made the new folder, I moved all the files from the original folder into the new folder.  Then i was able to delete them from the new folder and remove the directories...Not sure why this was so difficult.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jonathan BriteSystem AdminAuthor Commented:
by moving the files into another directory, I was able to delete them.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VMware

From novice to tech pro — start learning today.