Cannot umount busy file system – who’s to blame?

Tuesday, February 4th, 2014 | Insights, Linux, Tech-savvy

Use fuser and ps to identify what process/es is/are occupying the file system.

ps -lf -p $(fuser -c /mount/point 2>/dev/null)

This is an example that is in no way related to anything that has ever happened in the real world:

[user@host somefolder]$ sudo umount /media/somefolder
umount: /media/somefolder: target is busy
        (In some cases useful info about processes that
         use the device is found by lsof(8) or fuser(1).)
[user@host somefolder]$ ps -lf -p $(fuser -c /media/somefolder/ 2>/dev/null)
F S UID        PID  PPID  C PRI  NI ADDR SZ WCHAN  STIME TTY        TIME CMD
0 S user      5058  5054  0  80   0 - 29109 wait   09:22 pts/0      0:00 bash
[user@host somefolder]$ cd ..

lol 🙂 pebcak!

Tags: , , , , , ,

No comments yet.

Leave a comment

Search

Categories