Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!pasteur!ucbvax!agate!bionet!csd4.milw.wisc.edu!mailrus!ncar!tank!uwvax!heurikon!sadler From: sadler@heurikon.UUCP (Jon Sadler) Newsgroups: comp.protocols.nfs Subject: Re: WHat is "Stale NFS handle"? Message-ID: <292@heurikon.UUCP> Date: 20 Jan 89 16:19:51 GMT References: <1747@valhalla.ee.rochester.edu> Reply-To: sadler@heurikon.UUCP (Jon Sadler) Organization: Heurikon Corp., Madison WI Lines: 34 In article <495@larry.UUCP> jwp@larry.uucp asks about "Stale NFS handle" To answer this requires some murking around in how NFS really works. For example, I create a file called /export/foo, give full world permi- sions to it. Whenever I open this file on a NFS client machine, a "file- handle" (a local structure containing info on the file ranging from the current position in the file, to the machine it lives on, etc.) is created in-core (in the kernal). All access to the file reference this structure, and then are sent to the remote machine via Sun's RPC. Now, imagine the following scenerio: Say I run /bin/more on the file /export/foo. Since NFS is stateless, the server does not know that the file is being accessed, only that there are requests coming in for data inside the file. Now say I pause for a half-minute, while more is prompting me, and someone on the server deletes /export/foo. When bin/more does to ask for more data (because I hit a key, and it needs more data), the file will not exist anymore. Further, the head-inode for /export/foo may have been re-used in another file. At this point, /bin/more will return an error, and the client will say "Stale-File Handle". Why? Because the file-handle created for referencing /export/foo is no longer "up-to-date". (In other words, it is stale.) I hope this answers your questions. Jonathan Sadler Heurikon Corp. -- BANG PATH: ...rutgers!uwvax!heurikon!sadler SNAIL: Jonathan Sadler ...rutgers!nucsrl!laidbak!sadler Heurikon Corp. UUCP DOMAIN: sadler@heurikon.UUCP 3201 Latham Drive sadler@laidbak.UUCP Madison, WI 53713 ARPA: sadler@csd4.milw.wisc.edu PHONE: (608) 271-8700