1834465 Members
3033 Online
110067 Solutions
New Discussion

Umount directory

 
SOLVED
Go to solution
O'lnes
Regular Advisor

Umount directory

When I run umount a directory, it pop up 'Device busy' , but I make sure no process in the directory and no user on the directory, how to run umount? Thanks.
Andy
7 REPLIES 7
Justo Exposito
Esteemed Contributor

Re: Umount directory

Hi,

You can use fuser command or look for the lsof tool in internet in order to know the process that locks the file system.

Regards,

Justo.
Help is a Beatiful word
Dietmar Konermann
Honored Contributor

Re: Umount directory

Hi!

Besides running processes (see fuser/lsof) there are some more things that may keep an file system busy, e.g.:

- active fs swap
- other fs mounted into it

If the fs is NFS exported then an NFS client lock may also be able to make trouble. You then need to restart rpc.lockd and rpc.statd... then the umount should work.

Regards...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
James R. Ferguson
Acclaimed Contributor

Re: Umount directory

Hi:

A very common reason for not being able to unmount a filesystem is that you or someone else is CD'ed into the directory.

Regards!

...JRF...
Craig Rants
Honored Contributor

Re: Umount directory

NFS was mentioned, attached is a link for troubleshooting nfs problems, but it also useful for troubleshooting device busy problems as well.

http://docs.hp.com/hpux/onlinedocs/B1031-90048/00/00/42-con.html

GL,
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Ray Brewer
Valued Contributor
Solution

Re: Umount directory

One thing Dietmar mentioned gets me all the time filesystem mounted on a filesystemsuch as this
/dir1
/dir1/dir2
The first filesystem, /dir1, can not be unmounted until /dir1/dir2 has been unmounted.

Ray
Sean OB_1
Honored Contributor

Re: Umount directory

umount won't unmount a file system if it is in use.

This could mean there are apps actively accessing the files. Or it could be as simple as a shell account being in that directory.

The first thing to do is cd to / to make sure you aren't the one keeping the device busy. :-)

Then if that doesn't work issue:

fuser -c /file/system/to/unmount
fuser -u /file/system/to/unmount

This will tell you what processes are using the file system. Check each process to make sure you know what it is and shutdown the process.

Once no processes are using the file system you will be able to unmount it.

Sean
MANOJ SRIVASTAVA
Honored Contributor

Re: Umount directory

Hi


fuser -ck /mountpoint; umount /mount point , this should do the work , incase there are processes associated they will get killed . You can also try lsof to find out what are the open files accociated with the mount point.


Manoj Srivastava