mount: device is busy is a common error message when a mount attempt
from a UNIX client fails.
The message refers to the presence of a process running below the
local mountpoint. Most often, the process is the root user's shell.
i.e. he or she is in the mountpoint directory.

Typically, the root user creates the local mountpoint directory, cd's
to the directory to confirm that it exists and is empty, and forgets
to leave the directory before issuing the mount command.

Alternately, the root user (or an ordinary user) is checking a
standard mountpoint (e.g. /mnt) to see if an external filesystem has
been mounted. They cd to /mnt, and stay in the directory even though
the external filesystem has not yet been mounted.

If the root user is not under the mountpoint and the message remains
after trying mount again, then another user or a process is active
under the mountpoint.

A key tool in finding these processes is fuser.

fuser will identify running processes in a filesystem with the process
ID number. fuser implementations vary with vendor, so checking the man
page is advised. Typically, options include -u for displaying the
login name associated with the process, and -k to kill the processes.

Example:

#mount ntserver:/c/exports /mnt
mount: device is busy

#fuser -u /mnt    or   #umount -l /mnt
/mnt: 951c(sadhiq)

So user sadhiq is running process 951 under /mnt , preventing the
mounting of the exported filesystem. The system administrator can then
advise sadhiq to cd to another directory, or more severely, kill
sadhiq´s process.


you  can  also check 

pgrep -l -u  sadhiq

-l tells pgrep to also list the process name instead of just the PID

B.Sadhiq

Reply via email to