Re: NFS question?

Salvatore Valente (svalente@mit.edu)
Sun, 9 Jun 1996 01:39:13 -0400


Hi. About a month ago (I'm a little behind), you wrote:

The problem is that if I edit or copy a file onto router's disk, then
telnet into router, and try to execute the file, I *ALWAYS* get "text
file busy". It won't let me execute it even though the modes are
correct, etc. The only way to get the kernel to allow me to run it is
to mv the file to another name, then cp it to the proper name. Even
then, it won't let me execute the mv'd file.

Could it be that AMD is the culprit? Or maybe an old NFSd/mountd
stuff?

The problem is not with the kernel or AMD. The problem is the Linux
NFS server, but getting a newer version won't help. This bug will
probably never be fixed in the current Linux NFS server. (It will be
fixed when somebody writes an NFS server for Linux which is not a
complete crock, which some people are working on.)

NFS clients never tell the server to open or close a file. Most NFS
servers run in the kernel, so they can read and write blocks directly
without opening files. The user space Linux NFS server simulates this
behavior by opening a file the first time it's asked to write to it,
and cachine the file descriptor for future write requests. When
you're done copying a file on to the server, the server doesn't know
you're done, so it keeps the file open until it needs to reuse the
cache entry. You can't run an executable while any program has it
open for writing.

The best solution is the one you're using, to copy and remove the
file.

-Sal.