From owner-svn-src-head@FreeBSD.ORG Sun Apr 10 13:45:47 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 35EC7106566B; Sun, 10 Apr 2011 13:45:47 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 242F28FC13; Sun, 10 Apr 2011 13:45:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p3ADjluD049947; Sun, 10 Apr 2011 13:45:47 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p3ADjl1n049944; Sun, 10 Apr 2011 13:45:47 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201104101345.p3ADjl1n049944@svn.freebsd.org> From: Rick Macklem Date: Sun, 10 Apr 2011 13:45:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r220518 - head/usr.sbin/nfsd X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Apr 2011 13:45:47 -0000 Author: rmacklem Date: Sun Apr 10 13:45:46 2011 New Revision: 220518 URL: http://svn.freebsd.org/changeset/base/220518 Log: Modify the man pages to reflect the addition of a backup stable restart file, as done by r220510. This is a content change. MFC after: 2 weeks Modified: head/usr.sbin/nfsd/nfsv4.4 head/usr.sbin/nfsd/stablerestart.5 Modified: head/usr.sbin/nfsd/nfsv4.4 ============================================================================== --- head/usr.sbin/nfsd/nfsv4.4 Sun Apr 10 12:43:13 2011 (r220517) +++ head/usr.sbin/nfsd/nfsv4.4 Sun Apr 10 13:45:46 2011 (r220518) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 3, 2009 +.Dd April 10, 2011 .Dt NFSV4 4 .Os .Sh NAME @@ -54,12 +54,13 @@ open/lock state changing operations. To provide for correct recovery semantics, a small file described by .Xr stablerestart 5 is used by the server during the recovery phase. -If this file is missing, -the server will not start. -If this file is lost, it should be recovered from backups, since creating -an empty -.Xr stablerestart 5 -file will result in the server starting without providing a grace period +If this file is missing or empty, there is a backup copy maintained by +.Xr nfsd 8 +that will be used. If either file is missing, they will be +created by the +.Xr nfsd 8 . +If both the file and the backup copy are empty, +it will result in the server starting without providing a grace period for recovery. Note that recovery only occurs when the server machine is rebooted, not when the @@ -185,25 +186,9 @@ are set in .Pp You will also need to add at least one ``V4:'' line to the .Xr exports 5 -file and, before starting the server for the first time, create an empty -.sp -.Bd -literal -offset indent -compact -/var/db/nfs-stablerestart -.Ed -.sp -file. -The command -.sp -.Bd -literal -offset indent -compact -install -o root -g wheel -m 600 /dev/null /var/db/nfs-stablerestart -.Ed -.sp -executed as ``su'' should suffice. -This can only be done when the server is not running and there are no +file for .Nm -file system mounts against the server. -If this file is lost during a crash, recovery from backups is -recommended. +to work. .Pp If the file systems you are exporting are only being accessed via .Nm @@ -311,9 +296,11 @@ daemons at boot time via the ``nfsuserd_ .Xr rc.conf 5 variables. .Sh FILES -.Bl -tag -width /var/db/nfs-stablerestart -compact +.Bl -tag -width /var/db/nfs-stablerestart.bak -compact .It Pa /var/db/nfs-stablerestart NFS V4 stable restart file +.It Pa /var/db/nfs-stablerestart.bak +backup copy of the file .El .Sh SEE ALSO .Xr stablerestart 5 , Modified: head/usr.sbin/nfsd/stablerestart.5 ============================================================================== --- head/usr.sbin/nfsd/stablerestart.5 Sun Apr 10 12:43:13 2011 (r220517) +++ head/usr.sbin/nfsd/stablerestart.5 Sun Apr 10 13:45:46 2011 (r220518) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 3, 2009 +.Dd April 10, 2011 .Dt STABLERESTART 5 .Os .Sh NAME @@ -75,9 +75,11 @@ is written to stable storage by the time has returned. This might require hardware level caching to be disabled for a local disk drive that holds the file, or similar. .Sh FILES -.Bl -tag -width /var/db/nfs-stablerestart -compact +.Bl -tag -width /var/db/nfs-stablerestart.bak -compact .It Pa /var/db/nfs-stablerestart NFSv4 stable restart file +.It Pa /var/db/nfs-stablerestart.bak +backup copy of the file .El .Sh SEE ALSO .Xr nfsv4 4 , @@ -86,8 +88,10 @@ NFSv4 stable restart file If the file is empty, the NFSv4 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 recovered from a backup. To move the file, you must edit +at all possible. The backup copy of the file is maintained +and used by the +.Xr nfsd 8 +to minimize the risk of this occurring. +To move the file, you must edit the nfsd sources and recompile it. This was done to discourage accidental relocation of the file.