From owner-freebsd-fs@FreeBSD.ORG Mon Apr 18 04:09:43 2011 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2CE94106564A for ; Mon, 18 Apr 2011 04:09:43 +0000 (UTC) (envelope-from jdc@koitsu.dyndns.org) Received: from qmta10.westchester.pa.mail.comcast.net (qmta10.westchester.pa.mail.comcast.net [76.96.62.17]) by mx1.freebsd.org (Postfix) with ESMTP id CA4FA8FC12 for ; Mon, 18 Apr 2011 04:09:42 +0000 (UTC) Received: from omta10.westchester.pa.mail.comcast.net ([76.96.62.28]) by qmta10.westchester.pa.mail.comcast.net with comcast id Ys7s1g0050cZkys5As9jVp; Mon, 18 Apr 2011 04:09:43 +0000 Received: from koitsu.dyndns.org ([67.180.84.87]) by omta10.westchester.pa.mail.comcast.net with comcast id Ys9h1g00o1t3BNj3Ws9iNs; Mon, 18 Apr 2011 04:09:43 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id ACE8C9B42B; Sun, 17 Apr 2011 21:09:40 -0700 (PDT) Date: Sun, 17 Apr 2011 21:09:40 -0700 From: Jeremy Chadwick To: Rick Macklem Message-ID: <20110418040940.GA64222@icarus.home.lan> References: <20110415140435.GA4278@icarus.home.lan> <1924310048.124584.1302915420741.JavaMail.root@erie.cs.uoguelph.ca> <20110418034507.GA63656@icarus.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110418034507.GA63656@icarus.home.lan> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-fs@freebsd.org Subject: Re: RFC: make the experimental NFS subsystem the default one X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Apr 2011 04:09:43 -0000 On Sun, Apr 17, 2011 at 08:45:07PM -0700, Jeremy Chadwick wrote: > It sounds like NFSv2 and NFSv3 are basically untouched (no direct > changes to them, but probably some indirect changes), I'm willing to > switch over to using -e on our production cluster, while keeping the > clients using mount_nfs *without* -o nfsv4. Well that didn't go well. Server is RELENG_8 dated Thu Feb 24 22:06:45 PST 2011. rc.conf had the following: nfs_server_enable="yes" nfs_server_flags="-e -u -t -n 4" mountd_enable="yes" Note that I *did not* set nfsv4_server_enable="yes" because that appears to do mountd and nfsd were full stopped then started (in correct order). nfsd did not start, and this error was thrown on console: Apr 17 20:47:36 ra nfsd[23423]: Can't open /var/db/nfs-stablerestart Quickly digging through source introduced me to stablerestart(5), which states this: BUGS If the file is empty, the NFS V4 server has no choice but to return NFSERR_NOGRACE for all Reclaim requests. Although correct, this is a highly undesirable occurrence, so the file should not be lost if at all possible. Nfsd will not create the file if it does not exist and will simply log a failure to start, in the hopes that the file can be recov- ered from a backup. To move the file, you must edit the nfsd sources and recompile it. This was done to discourage accidental relocation of the file. The first line of this BUGS section implies touch'ing the file is insufficient. I was forced to review the source code to see what this file contains/how it's maintained; it appears to store two raw unsigned 32-bit ints to the file, otherwise it throws error "Can't read stable storage file" and exits. So how does one go about properly creating/initialising this file? And what should the proper file perm/ownership be? My opinion is that the rc.d scripts need to somehow do this, but only once. The nuances/complexities of this situation seem very high, as blindly creating the (presumably 8-byte) file on startup (if it doesn't exist) doesn't sound like it's the correct solution. Also, the nfsd(8) man page needs to list stablerestart(5) in its SEE ALSO section. -- | Jeremy Chadwick jdc@parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP 4BD6C0CB |