Date: Tue, 10 Mar 2009 09:46:35 -0300 (ADT) From: Andrew Wright <ahamiltonwright@mta.ca> To: Konrad Heuer <kheuer2@gwdg.de> Cc: freebsd-questions@freebsd.org Subject: Re: Is NFS Locking Reliable? Message-ID: <alpine.BSF.2.00.0903100930380.64990@qemg.org> In-Reply-To: <20090310091318.W34669@gwdu60.gwdg.de> References: <20090310091318.W34669@gwdu60.gwdg.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 10 Mar 2009, Konrad Heuer wrote: > > I'd like to ask for your experiences with NFS locking in larger environments. > > Our experiences are not so satisfying. Our NFS servers for user home This matches my historical experience, especially if you add in periodically "wedged" and "ignored" lock state. First, it is useful to realize that locking over NFS has, until version 4, been done "outside of" NFS itself. That is, there are a pair of daemon (usually called statd and lockd) processes that negotiate the lock outside of the stateless mechanism that is the NFS data access method up to v3. My past v3 experience has been that only in the case where you have exactly the same version of statd and lockd on both sides (on the client and on the server) is it possible that you _may_ experience truly reliable locking. Note that this is only possible with the same OS at the same revision/patch on both client and server. NFS v4 is no longer stateless, and manages locks internally, which I would guess would make things much better, though my experience on mixed environments under v4 is much more limited. What version of the NFS protocol are you using? You can find this out via /usr/sbin/nfsstat If you are stuck with a v3 client, my recommendation would be to turn locking off altogether for that client, as I have found that this works in general better, as the applications desiring the lock are then at least aware that the lock won't work, rather than being "led up the garden path" by a successful return from a call to lockd that later is not honoured. If upgrading all to v4 is possible, it is probably worth a try, and good luck! Andrew.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.0903100930380.64990>