multiple NFS mounts with bg,retrycount=0

Rick Macklem rmacklem at uoguelph.ca
Mon May 6 23:09:27 UTC 2013


Zaphrod Beeblebrox wrote:
> [about double background NFS mounts]
> 
> I'm not sure on the fix to this, but I'm pretty sure it's because we
> retry
> the mount -a stuff twice at startup. If you watch your console, you'll
> see
> two places where it will "mount NFS filesystems" during boot.
> 
> ... well... a fix to this would be to _not_ do that twice ... but hey
> :).
There was just a commit to head (r250253) which adds a "-L" option to
mount, so that only "late" file systems are mounted, to avoid this.

Without this, what I think happens is:
A - "mount -a" --> initial mount attempt fails and goes background
B - "mount -a -l" --> succeeds in doing the mount, since it isn't
                    mounted yet
  - background mount_nfs from (A) wakes up and does the mount again

Yes, doing the mount twice will work and the second mount covers up
the first one. This is relatively harmless, although it will take
2 umounts to get rid of the mount (the first umount just uncovers
the first mount).

You could try marking the /etc/fstab line(s) for the mounts "late".
(since you use "bg", I'm assuming they aren't needed to be done
 for the startup scripts) That way they would only be mounted for
the "mount -a -l" case, I think.

rick


> _______________________________________________
> freebsd-stable at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to
> "freebsd-stable-unsubscribe at freebsd.org"


More information about the freebsd-stable mailing list