summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
authoriedowse <iedowse@FreeBSD.org>2001-07-21 15:38:37 +0000
committeriedowse <iedowse@FreeBSD.org>2001-07-21 15:38:37 +0000
commit965e8c3720e7bf3f734d9c28ce5e94e1cb808543 (patch)
tree1086c8702fe7d486220d0ae1e2fdd6ee1dea98d9 /sbin
parentba4e5273cd80e746f5ba4b4438e7a307f458d16d (diff)
downloadFreeBSD-src-965e8c3720e7bf3f734d9c28ce5e94e1cb808543.zip
FreeBSD-src-965e8c3720e7bf3f734d9c28ce5e94e1cb808543.tar.gz
Change the foreground mount behaviour so that we keep retrying
forever by default. This matches what mount_nfs did before revision 1.40, and it is the generally expected behaviour for NFS mounts. Document the current defaults near the start of the man page and mention the options that can be used to change them. Discussed on: -hackers
Diffstat (limited to 'sbin')
-rw-r--r--sbin/mount_nfs/mount_nfs.830
-rw-r--r--sbin/mount_nfs/mount_nfs.c3
2 files changed, 26 insertions, 7 deletions
diff --git a/sbin/mount_nfs/mount_nfs.8 b/sbin/mount_nfs/mount_nfs.8
index f12b8c7..043ee57 100644
--- a/sbin/mount_nfs/mount_nfs.8
+++ b/sbin/mount_nfs/mount_nfs.8
@@ -71,6 +71,28 @@ It implements the mount protocol as described in RFC 1094, Appendix A and
.%T "NFS: Network File System Version 3 Protocol Specification" ,
Appendix I.
.Pp
+By default,
+.Nm
+keeps retrying until the mount 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 b
+and
+.Fl R
+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 @@ but untrustworthy users and the network cables are in secure areas this does
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.
diff --git a/sbin/mount_nfs/mount_nfs.c b/sbin/mount_nfs/mount_nfs.c
index 997cc92..4b88a51 100644
--- a/sbin/mount_nfs/mount_nfs.c
+++ b/sbin/mount_nfs/mount_nfs.c
@@ -486,7 +486,8 @@ main(argc, argv)
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);
OpenPOWER on IntegriCloud