Messages in this thread | | | From | Keith Owens <> | Subject | Re: annoying bug? in NFS | Date | Tue, 25 Mar 1997 11:44:27 +1100 |
| |
On Mon, 24 Mar 1997 14:41:54 EST, thoth@purplefrog.com wrote: > > So, I edit a script file which lives on an NFS mounted partition. If I >then try to run the script on the machine which is the NFS server for that >file I get > >/bin/sh: bin/cron/cat-proc-stat: Text file busy > > Is this really necessary? It's not like I still have the file open or >anything. The only solution I know if is to do this on the NFS server: > > mv $1 $tmp > cp $tmp $1 > > Can this be fixed, or would it break something else?
Standard NFS problem, it cannot be fixed without breaking NFS. The problem is that NFS is stateless, it does not know for certain that you have closed the file you were editting. Instead it assumes the file is open for n minutes after the last write, n varies across NFS servers but is typically hours.
The only solution is the one you found, update executable files directly from the NFS server, not over the NFS link. This applies to binaries as well as scripts. Much better to copy the files to your machine, work on them there, tar them up, copy the tar file to the NFS server then logon to the NFS server and untar the files. Or logon to the NFS server and edit from there.
| |