NFS and UFS Mounting on a non-empty directory

Jonathan I. Kamens jik at athena.mit.edu
Mon Jul 24 06:17:09 AEST 1989


In article <1989Jul23.194057.4247 at ctr.columbia.edu> seth at ctr.columbia.edu
(Seth Robertson) writes:
%The concept may be well defined, but the implementation bytes the big one.
%
%In SunOS 4.0.3
%
%seth elara> cd /mnt
%seth elara> ls
%testfile
%seth elara> cat testfile
%This is a test.
%seth elara> mount leda:/image /mnt
%seth elara> ls
%lost+found not found
%vdo not found
%seth elara> cd vdo
%vdo bad directory
%seth elara> cat testfile
%This is a test.
%seth elara> cd /
%seth elara> cd /mnt
%seth elara> ls
%lost_found	vdo
%seth elara> cd vdo
%seth elara> pwd
%/mnt/vdo
%
%(Note:  This is a hand copy of what actually happened, so I may have
%screwed up a little on the error messages, but this is, for all intents
%and purposes, what happened)

I suspect that the problem is that you were in the directory onto
which you tried to mount something when you issued the mount command.
You are not supposed to be able to mount something on top of a busy
directory, and if a process has a directory open as its cwd, that
makes the directory busy.

Try cd'ing out of the /mnt directory before doing the mount.  That
should solve the problem.

If I tried to do the same thing here (BSD 4.3), I would get a device
busy error and the mount would fail.  I do not know why you did not.
In fact, here it is:

achates# cd /mnt
achates# cat testfile
This is a test.
achates# mount priam:/slush /mnt
mount: priam:/slush on /mnt: Device busy
mount: giving up on:
   /mnt

Jonathan Kamens			              USnail:
MIT Project Athena				432 S. Rose Blvd.
jik at Athena.MIT.EDU				Akron, OH  44320
Office: 617-253-4261			      Home: 216-869-6432



More information about the Comp.unix.wizards mailing list