[comp.os.minix] Problem with "mount"

allbery@ncoast.UUCP (Brandon Allbery) (08/24/87)

I was using "patch" earlier today, and got an error that I was out of temp file
space.  Ok, check the source:  no way to put the temp files in the current
directory.  Ok, mount my new 10MB partition on /tmp:

# /etc/mount /dev/hd3 /tmp
mount: Device busy
# _

Huh???  Of course, /etc/mount doesn't maintain an /etc/mtab, so:

# /etc/mount /dev/hd3 /user
/dev/hd3 mounted
# /etc/umount /dev/hd3
# /etc/mount /dev/hd3 /tmp
mount: Device busy
# _

???????

The only thing I can come up with is that /tmp is somehow special.  Or else
/user is somehow special.  Anyone know what's going on?  (I'm planning on
putting my 10MB partition as /usr and the 5MB as /tmp, but this would seem
to preclude that possibility.)
-- 
 Brandon S. Allbery, moderator of comp.sources.misc and comp.binaries.ibm.pc
  {{harvard,mit-eddie}!necntc,well!hoptoad,sun!mandrill!hal}!ncoast!allbery
ARPA: necntc!ncoast!allbery@harvard.harvard.edu  Fido: 157/502  MCI: BALLBERY
   <<ncoast Public Access UNIX: +1 216 781 6201 24hrs. 300/1200/2400 baud>>
** Site "cwruecmp" is changing its name to "mandrill".  Please re-address **
*** all mail to ncoast to pass through "mandrill" instead of "cwruecmp". ***

nu070156@ndsuvm1.bitnet.UUCP (08/26/87)

In article <4242@ncoast.UUCP>, allbery@ncoast.UUCP (Brandon Allbery) writes:
>I was using "patch" earlier today, and got an error that I was out of temp file
>space.
     
and tried:
># /etc/mount /dev/hd3 /tmp
>mount: Device busy
># /etc/mount /dev/hd3 /user
>/dev/hd3 mounted
># /etc/umount /dev/hd3
># /etc/mount /dev/hd3 /tmp
>mount: Device busy
>The only thing I can come up with is that /tmp is somehow special.  Or else
>/user is somehow special.  Anyone know what's going on?  (I'm planning on
>putting my 10MB partition as /usr and the 5MB as /tmp, but this would seem
>to preclude that possibility.)
     
I ran into the same problem when running patch. But I went one step further:
mv /tmp /otmp
mkdir /tmp
/etc/mount /dev/fd0 /tmp
     
and it worked. My guess is that something (FS, MM, Init, sh) has an
open file on /tmp. I haven't looked into it at all myself.
     
Glen Overby
Bitnet: nu070156@ndsuvm1
From uucp: ihnp4!psuvax1!ndsuvm1.bitnet!nu070156
uucp (slow): ihnp4!umn-cs!ndsuvax!ncoverby
     

ncperson%NDSUVAX.BITNET@wiscvm.wisc.edu (08/26/87)

From: Brett Person <ncperson%NDSUVAX.BITNET@wiscvm.wisc.edu>

   In reply to Brandon Alberry:
   I've mounted /dev/fd1 as /tmp before. Maybe /dev/hd3 is being used
 for something else ?

 -Brett

bing@galbp.LBP.HARRIS.COM (Bing Bang) (08/27/87)

In article <271NU070156@NDSUVM1> NU070156@NDSUVM1.BITNET (Glen Overby) writes:
>I ran into the same problem when running patch. But I went one step further:
>mv /tmp /otmp
>mkdir /tmp
>/etc/mount /dev/fd0 /tmp
>     
>and it worked. My guess is that something (FS, MM, Init, sh) has an
>open file on /tmp. I haven't looked into it at all myself.
>     
Am I missing something here? You do know that you can't mount anything to a
directory unless it is completely empty, don't you? Try

rm /tmp/*

then mounting the drive.

I put put into my rc file

touch /tmp/kill_me_now
rm /tmp/*

to make sure /tmp is empty when I boot off my hard disk.

-- 
Bing H. Bang                         +-------------------+
Harris/Lanier                        |MSDOS: just say no.|
Atlanta GA                           +-------------------+

randy@umn-cs.UUCP (Randy Orrison) (08/28/87)

In article <1418@galbp.LBP.HARRIS.COM> bing@galbp.UUCP (Bing Bang) writes:
>In article <271NU070156@NDSUVM1> NU070156@NDSUVM1.BITNET (Glen Overby) writes:
>Am I missing something here? You do know that you can't mount anything to a
>directory unless it is completely empty, don't you?

Is this V7?  I know this isn't true on the two Sys 5 systems I work on:
In the root file system the directory /usr contains the directory tmp,
for obvious reasons.  This doesn't affect mounting things on /usr in any
way.
	-randy
-- 
Randy Orrison, University of Minnesota School of Mathematics
UUCP:	{ihnp4, seismo!rutgers!umnd-cs, sun}!umn-cs!randy
ARPA:	randy@ux.acss.umn.edu		 (Yes, these are three
BITNET:	randy@umnacvx			 different machines)

randy@umn-cs.UUCP (Randy Orrison) (08/28/87)

Sorry about that, missed deleteing a line.  The quote was from Bing Bang,
not Glen Overby:

In article <1418@galbp.LBP.HARRIS.COM> bing@galbp.UUCP (Bing Bang) writes:
>In article <271NU070156@NDSUVM1> NU070156@NDSUVM1.BITNET (Glen Overby) writes:
 ^this line should have been deleted
-- 
Randy Orrison, University of Minnesota School of Mathematics
UUCP:	{ihnp4, seismo!rutgers!umnd-cs, sun}!umn-cs!randy
ARPA:	randy@ux.acss.umn.edu		 (Yes, these are three
BITNET:	randy@umnacvx			 different machines)

mmason@psu-cs.UUCP (Mark C. Mason) (08/29/87)

In article <1418@galbp.LBP.HARRIS.COM> bing@galbp.UUCP (Bing Bang) writes:
>Am I missing something here? You do know that you can't mount anything to a
>directory unless it is completely empty, don't you? Try

Wrong.  All mount does is set a flag in the inode of the directory being
mounted on and make a mapping of old/new devices/directories in /etc/mtab.
It makes no difference whether the directory is empty or not.

The most probable reasons for the error message are 1. some process
has an open file in /tmp, or 2. the device is mounted elsewhere.  In this
case check for open files (there was a program which did just this
posted to the net a while back called ofiles; I use it all the time
on VAX/BSD).


					Mark