5

I tried removing a file. The most relevant answer can be found here, but I found no luck. Here is the original problem:

maxgitt@mgpc:~$ sudo rm -rf /var/lib/docker/
rm: cannot remove '/var/lib/docker/aufs': Device or resource busy

To locate the process I tried the following:

maxgitt@mgpc:~$ sudo lsof +D /var/lib/docker/
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1000/gvfs
      Output information may be incomplete.

So I tried found in a comment in the above answer but found nothing,

maxgitt@mgpc:~$ /sbin/fuser -m /var/lib/docker/
bash: /sbin/fuser: No such file or directory

Even ps couldn't find the process

maxgitt@mgpc:~$ ps aux | grep docker
maxgitt   5349  0.0  0.0  14224  1024 pts/18   S+   15:21   0:00 grep --color=auto docker
maxgitt@mgpc:~$ 

Any help on how to kill this mysterious process would be great.

4

Its still mounted. I bet you see it if you run mount. If so run the following

# umount /var/lib/docker/aufs
# rm -rf /var/lib/docker
  • so a mounted file system is completely separate from what is considered a running process? – Max Oct 5 '17 at 21:14
  • you can't delete a directory which has a mount hence the resource busy error.. be nice if it told you why it was busy – Mike Oct 5 '17 at 21:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.