NFS under 2.2.12

Robert K. Nelson (rnelson@airflowsciences.com)
Wed, 01 Sep 1999 12:09:01 -0400


I have been experiencing a problem in using data files from a system
with Linux 2.2.12 kernel on HP machines
over NFS. As suggested by several folks, my problem was not with lockd
(as I originally suspected). Instead,
it is with a bad return value from getcwd:

>From HP do the following:

mount remote:/ /net/remote
mount remote:/tmp /net/remote/tmp
mount remote:/tmp /mnt/remotet

When I run the program listed below in /net/remote/tmp it fails with ptr
== NULL. When I run
it in /mnt/remotet it succeeds and prints the correct current working
directory. Since the HP automounter mounts
using the subdirectory format, any program which looks up the current
working directory fails. This fails in the
same way when run in a Linux 2.0.36 kernel against a 2.2.12 NFS server.
It works fine when run in
a system with a 2.2.12 kernel.

This was not a problem with the NFS server under the 2.0.36 kernel and
not a problem between the HP's.
Also, last time I had a Solaris system attached to the network I did not
see this problem.

The workaround is clear, but adds substantial administrative work,
especially on large systems. I hope it can be
fixed. If not, it should at least be documented.

Bob Nelson

/* Program to check if the getcwd subroutine works */

#include <unistd.h>

main()
{
char buf[4096];
char *ptr;

if( (ptr = getcwd(buf, 4095)) != buf )
printf("error: ptr = %x, buf = %x\n", ptr, buf);
else
printf("cwd = `%s`\n", buf);

return 0;
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/