From owner-freebsd-stable@FreeBSD.ORG Wed Dec 1 23:33:07 2010 Return-Path: Delivered-To: stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D935F106567A for ; Wed, 1 Dec 2010 23:33:07 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 94B518FC26 for ; Wed, 1 Dec 2010 23:33:07 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApwEAI1p9kyDaFvO/2dsb2JhbACDUKBCsl+QTYEhgzNzBIRehgiLHA X-IronPort-AV: E=Sophos;i="4.59,285,1288584000"; d="scan'208";a="100983735" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 01 Dec 2010 18:33:06 -0500 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id A165FB3F3A; Wed, 1 Dec 2010 18:33:06 -0500 (EST) Date: Wed, 1 Dec 2010 18:33:06 -0500 (EST) From: Rick Macklem To: Adam McDougall Message-ID: <1918825226.1032577.1291246386604.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <4CF5DEC4.3070901@egr.msu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [74.172.195.248] X-Mailer: Zimbra 6.0.7_GA_2476.RHEL4 (ZimbraWebClient - IE8 (Win)/6.0.7_GA_2473.RHEL4_64) Cc: stable@freebsd.org Subject: Re: Stale NFS file handles on 8.x amd64 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Dec 2010 23:33:07 -0000 > > I'll give negnametimeo=0 a try on one server starting tonight, I'll be > busy tomorrow and don't want to risk making anything potentially worse > than it is yet. I can't figure out how to disable the attr cache in > FreeBSD. Neither suggestions seem to be valid, and years ago when I > looked into it I got the impression that you can't, but I'd love to be > proven wrong. I just looked and, yea, you are correct, in that the cached attributes are still used while NMODIFIED is set if the mtime isn't within the current second. (I'm not going to veture a guess as to why this is done at this time:-) But, "acregmon=0,acregmax=0,acdirmin=0,acdirmax=0" looks like it comes close, from a quick inspection of the code. I haven't tested this. You do have to set both min and max == 0, or max just gets set to min instead of 0. The *dir* ones apply to directories and the *reg* ones otherwise. > I'll try dotlock when I can. Would disabling statd and > lockd be the same as using nolock on all mounts? Nope. If you kill off lockd and statd without using the "nolock" option, I think all file lock operations will fail with ENOTSUPPORTED whereas when you mount with "nolock", the lock ops will be done locally in the client (ie seen by other processes in the same client, but not by other clients). > The vacation binary > is > the only thing I can think of that might use it, not sure how well it > would like missing it which is how I discovered I needed it in the > first > place. Also, if disabling lockd shows an improvement, could it lead to > further investigation or is it just a workaround? Well, it's a work around in the sense that you are avoiding the NLM and NSM protocols. These are fundamentally flawed protocol designs imho, but some folks find that they work ok for them. Imho, the two big flaws are: 1 - Allowing a blocking lock in the server. Then what happens if the client is network partitioned when the server finally acquires the lock for the client? (NFSv4 only allows the server to block for a very short time before it replies. The client must "poll" until the lock is available, if the client app. allows blocking. In other works, the client does the blocking.) 2 - It depends upon the NSM to decide if a node is up/down. I'm not sure what the NSM actually does, but it's along the lines of an IP broadcast to see if the other host(s) are responding and then sets up/down based on how recently it saw a message from a given host. (NFSv4 requires that the server recognize a lock request where the client had state that predates this boot and reply with an error that tells the client to recover its lock state using special variants of the lock ops. Imho, this does a much better job of making sure the server and clients maintain a consistent set of lock state. The server may throw away lock state for an NFSv4 client if it hasn't renewed the state within a lease time and then the client will be given an "expired" error to tell it that it has lost locks. This should only happen when a network partitioning exceeds the lease duration and, in the case of the FreeBSD NFSv4 server, it has also received a conflicting lock request from another client whose lease has not expired.) Probably a lot more glop than you expected, but I couldn't resist a chance to put in a plug for NFSv4 file locking. Btw, you could try NFSv4 mounts, since Netapp and the experimental FreeBSD8 client both support them. Good lock (oh, I meant luck:-) with it, rick