Article View: comp.std.unix
Article #233Re: File Locking across NFS mounts
From: Henry Spencer
Date: Thu, 10 Sep 1992 23:40
Date: Thu, 10 Sep 1992 23:40
24 lines
1673 bytes
1673 bytes
Submitted-by: henry@zoo.toronto.edu (Henry Spencer) >Submitted-by: johnl@iecc.cambridge.ma.us (John R. Levine) >The time-honored technique of using a directory as a semaphore and using >mkdir() and rmdir() as lock and unlock works fairly well, although it's >rather slow... It isn't reliable, however. The crucial point is that NFS does not provide a sufficiently good imitation of Unix filesystem semantics. I'm told -- I have not seen details and don't have a reference -- that if you look hard enough at the problem, and consider things like finite cache sizes, you can prove that there is *no way* to do reliable locking through the NFS protocol. You have to use some sort of non-filesystem method, like locking daemons (and I agree with John that writing your own is the best method; the existing ones are garbage). This is one reason (of many) why proposals to canonize NFS as a standard weren't greeted with cries of delight from all directions... -- There is nothing wrong with making | Henry Spencer @ U of Toronto Zoology mistakes, but... make *new* ones. -D.Sim| henry@zoo.toronto.edu utzoo!henry Volume-Number: Volume 29, Number 30
Technical Details
Message-ID:
<18omcgINN8tm@ftp.UU.NET>Path:
arc1-ca.pugleaf.net!sparky!uunet!uunet!not-for-mailReferences:
<18j4hdINNdst@ftp.UU.NET> <18lpndINN8ti@ftp.UU.NET>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!uunet!not-for-mail From: henry@zoo.toronto.edu (Henry Spencer) Newsgroups: comp.std.unix Subject: Re: File Locking across NFS mounts Date: 10 Sep 1992 16:40:00 -0700 Organization: U of Toronto Zoology Lines: 24 Sender: sef@ftp.UU.NET Approved: sef@ftp.uucp (Moderator, Sean Eric Fagan) Message-ID: <18omcgINN8tm@ftp.UU.NET> References: <18j4hdINNdst@ftp.UU.NET> <18lpndINN8ti@ftp.UU.NET> NNTP-Posting-Host: ftp.uu.net X-Submissions: std-unix@uunet.uu.net