Re: NFS problems with Linux-2.4

jlnance@unity.ncsu.edu
Tue, 27 May 2003 13:29:38 -0400


Hello All,
I wanted to follow up this thread now that I have a working solution.

My initial problem was that machine A would create a file and machine B
would attempt to stat() or open() it over NFS and it would not be there.
I was using the 2.4.7 kernel that came with Red Hat 7.2.

Trond suggested I try a more recent kernel since 2.4.7 had known close
to open cache consistency problems. I tried the 2.4.20 kernel and it
did make the problem better, but it was still there.

Someone suggested doing an opendir() to flush the NFS cache. This did
make the problem go away with the 2.4.20 kernels. With the 2.4.7
kenrels, I started getting ESTALE errors after I did this. I found
that I could work around these errors by doing something like:

f = fopen(filename, mode);

if(!f) {
if(errno==ESTALE) {
sleep(1);
f = fopen(filename, mode);
}
}

which is ugly, but it allow me to run on unpatched Red Hat 7.2 systems
which is highly desirable.

Thanks,

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