4

There is a very large .nfs file on my system, and it's using a large amount of my disk quota. If I try to delete it, I get "rm: cannot remove '.nfs0000000001bd849100000001': Device or resource busy".

What's weird is that fuser -v .nfs0000000001bd849100000001 returns nothing and this system does not have lsof. So does anyone know how to remove this file?

joesideburns
  • 41
  • 1
  • 1
  • 2
  • @Avi - the answer in the link you provided is to use lsof which joesideburns has stated his system does not currently have. – Alan Savage Feb 18 '19 at 18:04
  • yea I don't have permissions to install it either so I'm wondering if there's another way. But maybe there isn't. – joesideburns Feb 19 '19 at 18:08

3 Answers3

0

This question is old and I'm not sure if the circumstances I endured are similar or completely different. However, I did find the solution to my issue with the same symptom.

I was trying to clean a directory from build cruft via rm -rf build/tmp/path and a file deep in the tree named .nfs000* was throwing the "Device or resource is busy" error.

My problem was multi-faceted. The first element was the use of roaming home directories at the office. The second, was docker and the use of containers. Finally, vim and editing a file. While in the container, I was abruptly disconnected from my terminal which killed the shell and the vim program I had running, but it did not kill the container. However, because vim was dead no process did have that file open (but the container did). Finally, it wasn't called the usual .something.swp as vim temp file would because an attempt to delete it had taken place. That's when NFS stepped in to "save the day." Killing the containe solved the problem.

I don't know if this is what the OP had back then. I offer this only that, when someone else stumbles onto this, perhaps this will inspire you to think indirectly about the cause. This link actually provided me the inspiration for the problem. After cating the file, I found it was a VIM tmp file.

Andrew Falanga
  • 2,274
  • 4
  • 26
  • 51
0

I had this problem too.

After looking at Andrew Falanga's answer above I did top -u myusername and found that there was a process going on which could have been doing something there. I killed that process with kill -9 pid and then I could remove the offending files.

Beth Long
  • 375
  • 3
  • 24
0

Just rename the folder with something else. See if the remove works post this action. It works for me.

Aditya
  • 1