Problems with 'automount' and 'getwd'!

Laura Pearlman pearlman at rand.org
Sat Mar 24 13:02:20 AEST 1990


In article <5959 at brazos.Rice.edu> rgm at thorin.hw.stratus.com writes:
>X-Sun-Spots-Digest: Volume 9, Issue 87, message 12
>
>We are having problems with the automount program.  We are running SunOS
>4.0.3 and the problem shows up something like this:
>
>    thorin% pwd
>    pwd: getwd: can't open ..
>
>and:
>
>    thorin% df .
>    Filesystem            kbytes    used   avail capacity  Mounted on
>    Could not find mount point for .
>
>but you can still work in the directory and list it etc.

Getwd and df will fail like that if you mount a directory on top of
itself, and you're not in the top-level mount point directory.  In other
words, if you do:

	mount foo:/bar /mnt
	cd /mnt/blech
	# edit out the "foo:/bar ... /mnt" entry in /etc/mtab
	mount foo:/bar /mnt
	pwd
	df .

then you'll see the same behavior you described above.  This is because
whenever an nfs filesystem is mounted, it's assigned a dev number that is
different from the dev numbers of any other filesystems mounted at the
time.  The problem in the example above is that the dev number for "."
(the first dev number assigned) is now different from from the dev number
for "/mnt/blech" (the second dev number assigned).

I don't have any idea why automount would behave this way, though.  My
only guess is that somehow automount has attempted to unmount a filesystem
and unlinked its symlink without realizing that the unmount failed, and
then remounted the filesystem again later because the symlink was gone.

		-- Laura
		   pearlman at rand.org



More information about the Comp.sys.sun mailing list