petitp@divsun.unige.ch (Dominique Petitpierre) (06/01/90)
In my message <comp.sys.sun/Sun-Spots Volume 9 Issue 163 message 5> I was describing a situation where I couldn't unmount a NFS file system, although there was only four processes left ( swapper, init, pagedaemon, sh), and only two other file system mounted (/ and /usr, both local, 4.2). I forgot to mention that I was logged as root (on the console), and that my current directory was /. (This was on a SparcStation 1 under SunOS 4.03). Most replies mentionned the fact that "umount" says a filesystem is "busy" if some process has its current directory on it. This was not the case. So the mystery remains. One possible guess would be that I had to kill some processes with "kill -9", which might have not done the necessary cleanup for "umount" to find out that the filesystem was not needed any more. But then, where is that information stored (since the killed process entries in the process table were cleared)? Here are the situations I know that prevent "umount" to unmount a filesystem: 1) A process has an open file on the filesystem. 2) A process has its current working directory (cwd) on the filesystem. 3) A process has its "text" on the filesystem (was true for SunOS 3.4, seems to be false for 4.03) 4) another filesystem is mounted in a subdirectory of the filesystem. 5) a client has NFS mounted a directory on the filesytem (only for local filesystems) In addition, "umount" hangs if the server of the filesystem (NFS) is down (forever under 3.4, until some timeout in 4.03). Are they any other cases? About the program "ofiles", I was told that it works also for NFS filesystem: it does. I was mislead by a comment in the programs's sources that says /* Doesn't handlle remote NFS files */, and never tried! The command "ofiles mountpath", where "mountpath" is a mount point, gives the list of processes using an inode on the mounted filesystem. Thanks to all that replied: <dan%candide.Berkeley.EDU@jade.berkeley.edu>, <del@mlb.semi.harris.com>, <kpearson@cattell.psych.upenn.edu>, <webber@psych.toronto.edu>, <rrb@math.wayne.edu>, <jsalmi@Solbourne.com>, Regards, Dominique -- Mr. Dominique Petitpierre |e-mail, preferred: petitp@divsun.unige.ch ISSCO, University of Geneva |UUCP: mcvax!cui!divsun.unige.ch!petitp 54 route des Acacias | CH-1227 GENEVA (Switzerland)| Tel: 0041/22/705 71 17