From owner-freebsd-questions@FreeBSD.ORG Tue Mar 10 13:19:31 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 285021065670 for ; Tue, 10 Mar 2009 13:19:31 +0000 (UTC) (envelope-from ahamiltonwright@mta.ca) Received: from mailserv.mta.ca (mailserv.mta.ca [138.73.1.1]) by mx1.freebsd.org (Postfix) with ESMTP id EDBD08FC1B for ; Tue, 10 Mar 2009 13:19:30 +0000 (UTC) (envelope-from ahamiltonwright@mta.ca) Received: from [138.73.29.51] (helo=qemg.org) by mailserv.mta.ca with esmtp (Exim 4.61) (envelope-from ) id 1Lh1Jq-0002wK-CK; Tue, 10 Mar 2009 09:44:27 -0300 Date: Tue, 10 Mar 2009 09:46:35 -0300 (ADT) From: Andrew Wright Sender: andrew@qemg.org To: Konrad Heuer In-Reply-To: <20090310091318.W34669@gwdu60.gwdg.de> Message-ID: References: <20090310091318.W34669@gwdu60.gwdg.de> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII Cc: freebsd-questions@freebsd.org Subject: Re: Is NFS Locking Reliable? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Mar 2009 13:19:31 -0000 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.