3 ms·
Unlike typical local Unix file systems, NFS does not support "delete on last close" semantics. Ordinarily, even if you unlink a file, the operating system keep
by rectang 12y ago
Unlike typical local Unix file systems, NFS does not support "delete on last close" semantics.
Ordinarily, even if you unlink a file, the operating system keeps the inode around until the last filehandle referencing it goes away. But an NFS mount cannot know when all filehandles on all networked systems have closed. When you attempt to read from an NFS file handle whose underlying file has been deleted out from under you, BOOM -- `ESTALE`.
The solution is typically to guard against file deletion using read locks... which are extremely annoying to implement on NFS because of portability issues and cache coherency problems.
I'm not sure I'd describe that as a "scaling problem" per se, because it gets bad quickly and stays bad. It's more of a severe limitation on how applications and libraries can design their interaction with the file system.
- georgerobinson 12y agoDoesn't NFS rename deleted files to some temp name so other clients can still read and write to it using their existing file handle?
- dekhn 12y agosome implementations of NFS use "silly rename" to get delete on last close semantics. http://nfs.sourceforge.net/#faq_d2 http://nfs.sourceforge.net/#faq_d2 I think that's limited to v2/v3 and not fully general or reliable.