System admins frequently get “device is busy” error while trying to umount a partition.
Probably you are getting rid of this problem by using “umount -f” comand at the end of your patience i think.
But I advise you being more polite while working around umount command.
At this point you can find the files are being used by using lsof command.
For example:
[emreyasar@testserver ~]# umount /mnt
umount: /mnt: device is busy
Let’s look who is using /mnt folder
[emreyasar@testserver ~]# lsof /mnt
COMMANDÂ Â PIDÂ USERÂ Â FDÂ Â TYPE DEVICEÂ Â Â Â Â Â SIZEÂ NODE NAME
squid  12562 squid 142w  REG   8,6 1086241246 98209 /mnt/access.log
We see that the process with PID 12562 initiated by squid account is using /mnt/access.log file.
You can use fuser command for getting a shorter result.
[emreyasar@testserver ~]# fuser /mnt/*
/mnt/access.log:Â Â Â 12562
If you can stop the related porcess normally you do this and then you may umount the filesystem. If you can’t do by this way it’s time to be a bit rude.
You can use kill command for killing the process or you may try this:
fuser -sk /mnt
The command above will kill all the processes which are using /mnt folder.
If you could not killed the related process(es) now you must try
umount -f /mnt
command.