Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a mounted partition, which I tried umounting and it's giving me an error. There is a chance that some process is accessing some files in that mounted partition.

How do I know, which process is accessing it, and which files?

Or better, another way to ask this question: How to know all the processes that are accessing a resource? Such as a file?

share|improve this question
up vote 6 down vote accepted

Run lsof /partitionname where "partitionname" is the name of the partition you're trying to unmount.

You can also use the fuser command for your more general question.

share|improve this answer

The tool you need is "lsof" (list open files) using this without any options shows you a list of all open resources including files, sockets and so on.

share|improve this answer
So you mean, going into the mounted partition and executing "lsof" works as a process explorer. Thanks. Is there any way to do the same on a single file? – kingsmasher1 Jun 25 '13 at 14:28
it is not relevant where you exec it. it shows you all ressources that are open. if you want to filter out a specific one you can use lsof | grep whatever – Pascal Schmiel Jun 25 '13 at 14:34
Seems like fuser suggested above helps. – kingsmasher1 Jun 25 '13 at 14:35
$ fuser -m /mnt/point


$ lsof | grep mount_point|grep -vi grep |grep -vi lsof
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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