Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!mailrus!uwm.edu!cs.utexas.edu!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.unix.i386 Subject: Re: Cannot umount /usr filesystem (ALWAYS "busy") Message-ID: <1990Jun30.141625.23421@virtech.uucp> Date: 30 Jun 90 14:16:25 GMT References: <267@jorel.UUCP> <248@harper.UUCP> <681@sci34hub.UUCP> Reply-To: cpcahil@virtech.UUCP (Conor P. Cahill) Distribution: usa Organization: Virtual Technologies Inc., Sterling VA Lines: 38 In article <681@sci34hub.UUCP> gary@sci34hub.sci.com (Gary Heston) writes: >In article <248@harper.UUCP> brad@harper.UUCP (Brad Cleghorn) writes: >>I have found that if my home dir is in /usr, and I'm logged in, (no >>matter *what* my pwd is) /usr won't umount -- Even if I'm su. I had >>to log in on the console port as root. > >Yes, any logged-in users' home directory is considered "open", and the >filesystem is therefore busy. No. This is not true. Only directories that are active (i.e. current directories of processes) are considered open. Once you cd to another file system, you are no longer tying up the original file system. For example: login in as user a on /a_filesys/a cd / su umount /a_filesys should work unless there is another process that has /a_filesys open. If you are using a shell that has a file based history mechanism (like ksh) then the shell can be the culprit if the history file is in the login directory. If you change the su line to "exec su" then that problem would be solved. >Create a file structure /u, add a userid into it, and log in under it. >Then try to umount it, even as root--it won't. You can umount /usr as >root because roots' home directory is "/", so /usr doesn't have any >"open" files or directories. The "home directory" has nothing to do with it. Current directories, open files, and/or running executables are what matters. -- Conor P. Cahill (703)430-9247 Virtual Technologies, Inc., uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160 Sterling, VA 22170