Bug 131342 - [nfs] mounting/unmounting of disks causes NFS to fail
Summary: [nfs] mounting/unmounting of disks causes NFS to fail
Status: Closed DUPLICATE of bug 9619
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 7.1-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-fs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-03 15:30 UTC by Martin Birgmeier
Modified: 2016-05-08 20:10 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Birgmeier 2009-02-03 15:30:05 UTC
	[Please note that the email address given is not valid due to
	security reasons. Just reply to the gnats entry, and I'll follow
	it via the web interface.]

	Machine A is serving via NFS. When unmounting (probably also
	mounting) an unrelated file system on A, B will get a EPERM
	error if it is simultaneously accessing files on A via NFS.

	I have seen this behavior at least since 5.x, probably before.

Fix: 

Unknown.
How-To-Repeat: 	Do heavy NFS i/o from machine B to machine A, then unmount (mount)
	a file system on A. B will get an error.
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2009-02-03 16:12:58 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-fs

Over to maintainer(s).
Comment 2 Martin Birgmeier 2011-07-08 14:00:03 UTC
This is a friendly reminder that some kind soul with knowledge of the 
relevant kernel parts look into this... the error can easily be 
reproduced. I just had it on a 7.4 system which did heavy reading from 
an 8.2 server. When I mounted something on the server, the client got a 
"Permission denied" reply.

So, to recap the scenario:

7.4 NFS client
8.2 NFS server
client mounts a fs from the server (via IPv4, might be interesting to 
look at http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/151681, too, but 
that is unrelated)
client does heavy i/o on the mounted fs
server does a mount (on its side, in this case it was from an md device)

--> error: client gets back some NFS error (in this case "permission 
denied")
Comment 3 Rick Macklem freebsd_committer 2016-02-05 01:00:04 UTC
This is fixed in more recent versions of FreeBSD by using
the "-S" option on mountd. I am afraid FreeBSD7 will never
be fixed.
I am closing this, since it is a duplicate of 9619 and the
fix is in more recent FreeBSD systems.

*** This bug has been marked as a duplicate of bug 9619 ***
Comment 4 commit-hook freebsd_committer 2016-05-08 20:10:38 UTC
A commit references this bug:

Author: rmacklem
Date: Sun May  8 20:10:23 UTC 2016
New revision: 299242
URL: https://svnweb.freebsd.org/changeset/base/299242

Log:
  Make "-S" a default option for mountd.

  After a discussion on freebsd-fs@ there seemed to be a consensus that
  the "-S" option for mountd should become the default.
  Since the only known issue w.r.t. using "-S" was fixed by r299201,
  this commit adds "-S" to the default mountd_flags.

  Discussed on:	freebsd-fs
  PR:		9619, 131342, 206855
  MFC after:	2 weeks
  Relnotes:	yes

Changes:
  head/etc/defaults/rc.conf