VMware Cloud Community
insearchof
Expert
Expert
Jump to solution

vCenter 6.5 Datastore unable to delete some files

vCenter 6.5

Today I received an alert that one of my datastores was running low on disk space.

The datastore contains VM's and replicas from Veeam B&R

I found several folders named the same with a _# so I reviewed them and found they are no longer needed  I failed replication job here and there

So I went to delete the folder and most deleted but I have 3 or 4 that just will not delete

I tried powercli but only got as far as listing the datastore get-datastore   then get-datastore DataStore-3T  with some info

How can I delete those unused files?

Thank you

Tom

Reply
0 Kudos
1 Solution

Accepted Solutions
continuum
Immortal
Immortal
Jump to solution

If the files are still in use the "lsof" command may show you which process is using them.

Sometimes it helps to rename the files that cant be deleted at once.
Then wait some hours and try to delete them again.


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

View solution in original post

Reply
0 Kudos
4 Replies
continuum
Immortal
Immortal
Jump to solution

If the files are still in use the "lsof" command may show you which process is using them.

Sometimes it helps to rename the files that cant be deleted at once.
Then wait some hours and try to delete them again.


________________________________________________
Do you need support with a VMFS recovery problem ? - send a message via skype "sanbarrow"
I do not support Workstation 16 at this time ...

Reply
0 Kudos
insearchof
Expert
Expert
Jump to solution

I renamed the files and still unable to delete them

How do I use isof ?   example please

any way to do this via powercli?

Update

I enabled SSH then ran a few commands

The folder in question has a .LCK file

the files are in Mode 1

[root@TGCSESXI-3:/vmfs/volumes/598f5e98-10f79a1b-09bc-f04da207add3/To Be deleted TGCS-VC65_replica] rm TGCS-VC65.vmx.lck

rm: can't remove 'TGCS-VC65.vmx.lck': Device or resource busy

This folder is from Veeam B&R the replication job created this folder.

Another folder is a VM that is not powered on that was and old computer

How can I force delete this

Reply
0 Kudos
insearchof
Expert
Expert
Jump to solution

I figured out the problem

I mistakenly tried to delete the wrong folders.

my naming convention was machine name these folders had machine name_1

Forgot I had problems with these two VMS back in the day.

So when I shutdown the one VM all the files were deleted except for the one vmdk which I manually deleted.

It was OK I was planning to rebuild that server any whey.

The problem is the over VM in my VSA

I tried to Backup using the backup feature on VSA but that does not work either.

Can I build another VSA then just move everything over?

Thanks

Reply
0 Kudos
insearchof
Expert
Expert
Jump to solution

Close this as resolved.

Built new VSCA all hosts moved over.

Reply
0 Kudos