In message <[EMAIL PROTECTED]>, Terry Lambert writes:
>> FWIW, I vote that we rever to the traditional default and require
>> -R1 or -b to avoid boot time hangs. The standard behaviour for most
>> NFS implementations that I'm aware of would do this.
>
>I agree; people at work have bitched about this. We have a
>FreeBSD NFS server that's flakey.
Ok, from the small set of responses so far, it seems that the most
acceptable option is to change mount_nfs to behave in the old way
where it will retry forever by default even in foreground mode.
Below is a proposed patch that does this. It also adds two paragraphs
near the start of the manpage which describe the default behaviour
and point readers at the relevant options. Comments welcome.
>The other thing is that it appears to break amd behaviour.
Does amd use mount_nfs(8)? I thought it did the mount syscalls
directly.
Ian
Index: mount_nfs.8
===================================================================
RCS file: /dump/FreeBSD-CVS/src/sbin/mount_nfs/mount_nfs.8,v
retrieving revision 1.27
diff -u -r1.27 mount_nfs.8
--- mount_nfs.8 2001/07/19 21:11:48 1.27
+++ mount_nfs.8 2001/07/20 22:20:35
@@ -71,6 +71,28 @@
.%T "NFS: Network File System Version 3 Protocol Specification" ,
Appendix I.
.Pp
+By default,
+.Nm
+keeps retrying until the mount eventually succeeds.
+This behaviour is intended for filesystems listed in
+.Xr fstab 5
+that are critical to the boot process.
+For non-critical filesystems, the
+.Fl R
+and
+.Fl b
+flags provide mechanisms to prevent the boot process from hanging
+if the server is unavailable.
+.Pp
+If the server becomes unresponsive while an NFS filesystem is
+mounted, any new or outstanding file operations on that filesystem
+will hang uninterruptibly until the server comes back.
+To modify this default behaviour, see the
+.Fl i
+and
+.Fl s
+flags.
+.Pp
The options are:
.Bl -tag -width indent
.It Fl 2
@@ -126,12 +148,8 @@
help, but for normal desktop clients this does not apply.)
.It Fl R
Set the mount retry count to the specified value.
-A retry count of zero means to keep retrying forever.
-By default,
-.Nm
-retries forever on background mounts (see the
-.Fl b
-option), and otherwise tries just once.
+The default is a retry count of zero, which means to keep retrying
+forever.
There is a 60 second delay between each attempt.
.It Fl T
Use TCP transport instead of UDP.
Index: mount_nfs.c
===================================================================
RCS file: /dump/FreeBSD-CVS/src/sbin/mount_nfs/mount_nfs.c,v
retrieving revision 1.45
diff -u -r1.45 mount_nfs.c
--- mount_nfs.c 2001/07/19 21:11:48 1.45
+++ mount_nfs.c 2001/07/20 21:37:19
@@ -486,7 +486,8 @@
name = *argv;
if (retrycnt == -1)
- retrycnt = (opflags & BGRND) ? 0 : 1;
+ /* The default is to keep retrying forever. */
+ retrycnt = 0;
if (!getnfsargs(spec, nfsargsp))
exit(1);
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message