Chief_Java
Contributor
Contributor

Unable to remove file which does not exist

Jump to solution

Weird one - I'm trying to remove a folder but the system believes a file is preventing it from proceeding.

[root@ESXi:/vmfs/volumes/5f63db10-27ef5ce4-343a-4ccc6aacf6e7/corrupt-folder] ll

ls: ./vmx-9800-CL-6bbf840bbe070d9eec91181669a3e05c53e050e3-1.vswp: No such file or directory

total 1152

drwxr-xr-x    1 root     root         77824 Oct  9 06:17 .

drwxr-xr-t    1 root     root         77824 Oct 10 14:17 ..

When I try and remove it manually, I get the same roadblock:

[root@ESXi:/vmfs/volumes/5f63db10-27ef5ce4-343a-4ccc6aacf6e7/corrupt-folder] rm vmx-9800-CL-6bbf840bbe070d9eec91

181669a3e05c53e050e3-1.vswp

rm: can't remove 'vmx-9800-CL-6bbf840bbe070d9eec91181669a3e05c53e050e3-1.vswp': No such file or directory

Any ideas?

0 Kudos
1 Solution

Accepted Solutions
Chief_Java
Contributor
Contributor

Unfortunately, that did not help. The file is not in use, and does not even show up in the datastore browser as the system believes that there is no file there, but it appears that the file system/partition disagrees.

The only way I was able to fix it was to completely wipe the partition - looks like it’s either a failing disk or some corruption occurred.

View solution in original post

0 Kudos
2 Replies

Is that a local volume or a shared datastore?

If its local, It might be locked for some reason. If you can, put in maintenance, reboot and then try again. You should be able to remove then.

-------------------------------------------------------------------
Triple VCIX (CMA-NV-DCV) | vExpert | MCSE | CCNA
0 Kudos
Chief_Java
Contributor
Contributor

Unfortunately, that did not help. The file is not in use, and does not even show up in the datastore browser as the system believes that there is no file there, but it appears that the file system/partition disagrees.

The only way I was able to fix it was to completely wipe the partition - looks like it’s either a failing disk or some corruption occurred.

0 Kudos