Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 08 Nov 1996 23:26:34 GMT
From:      David Malone <dwmalone@maths.tcd.ie>
To:        freebsd-stable@freebsd.org
Subject:   Background mounts occuring in the wrong order.
Message-ID:   <9611082326.aa29259@salmon.maths.tcd.ie>

next in thread | raw e-mail | index | archive | help
We've been having some problems where when machines reboot
they background their nfs mounts. After that the background
mounts occur out of the order they are in fstab. So for
our news stuff ( for instance ) we mount :

	/news
	/news/spool
	/news/var

If the mount for either /news/var or /news spool is "sucessful"
before /news they then fail because they don't have a directory
to mount on. Somehow our SunOS 4.1.3 machines seem to handel this
OK.

I had a look at the source code for mount_nfs in 2.1.5-STABLE.
I can think of two possible fixes :

1) Once the rpc call to the server goes OK retry for retrycnt
	times to do the mount call.

2) Do some sort of "build a tree of dependancies" and use this
	to determine the order in which mount calls are done.

The first solution is easy to code, but a bit of a hack. The
second would be clever -- probably too. Has anyone any suggestions ?
I've tagged on some crude diffs for the first solution, they're
a patch for mount_nfs.c

( I've had a look at one of the 2.2 snapshots and its no better )

	David.


182d181
< 	int mount_retrycnt;
370,387c369,370
< 	if( opflags & ISBGRND )
< 	{
< 		mount_retrycnt = retrycnt ;
< 		while( mount_retrycnt > 0 )
< 		{
< 			if (mount(vfc ? vfc->vfc_index : MOUNT_NFS, name, mntflags, nfsargsp))
< 				err(1, "%s", name);
< 			else
< 				mount_retrycnt = 0;
< 			if( mount_retrycnt-- > 0 )
< 				sleep(120);
< 		}
< 	}
< 	else
< 	{
< 		if (mount(vfc ? vfc->vfc_index : MOUNT_NFS, name, mntflags, nfsargsp))
< 			err(1, "%s", name);
< 	}
- - ---
> 	if (mount(vfc ? vfc->vfc_index : MOUNT_NFS, name, mntflags, nfsargsp))
> 		err(1, "%s", name);
463d445
< 	int rpc_retrycnt = retrycnt;
539c521
< 	while (rpc_retrycnt > 0) {
- - ---
> 	while (retrycnt > 0) {
571c553
< 					rpc_retrycnt = 0;
- - ---
> 					retrycnt = 0;
575c557
< 		if (--rpc_retrycnt > 0) {
- - ---
> 		if (--retrycnt > 0) {




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi? <9611082326.aa29259>