Bug 14146

Summary: NFS mount bug which prevents mounting of similarly named filesystems
Product: Base System Reporter: jk <jk>
Component: i386Assignee: Matt Dillon <dillon>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description jk 1999-10-05 23:20:01 UTC
If you export two directories via NFS with similar names, IE: both the
same except for one has some extra characters at the end:

Example:  /usr/nfs
	  /usr/nfsshare

Clients will not be permitted to mount /usr/nfsshare.  If you place them
both on the same line, or comment out the first, the second will be
allowed.  My guess is that this has something to do with the 
subdirectory-checking code.

Fix: 

Workaround: If you need to mount them both to one set of clients, put
them on the same line, otherwise, no solution.
How-To-Repeat: Create two directories anywhere, say: /usr/nfs and /usr/nfsshare
and export them both.  Then try to mount /usr/nfsshare on another client.
It will fail.  Comment out the /usr/nfs line and try again (after 
restarting mountd) and you will be able to mount it.
Comment 1 Sheldon Hearn freebsd_committer freebsd_triage 1999-10-06 09:55:44 UTC
Responsible Changed
From-To: freebsd-bugs->dillon

I'm trusting that the NFS maintainer will jump on my head 
if I'm assigning the wrong sorts of PR's to him. :-) 

Comment 2 blapp 1999-10-06 11:34:39 UTC
Very strange. I've tried once and encountered the problems
as you. After killing mountd it suddenly worked. The order
of the shares seems not to be important.

# directories           options                 hosts
# ------------------------------------------------------

/usr/nfsshare /usr/nfs -maproot=root    127.0.0.1 fuchur
/var                                    127.0.0.1
/cdrom                                  atreju 127.0.0.1

showmount -e

root@kassiopeja:/root# showmount -e
Exports list on localhost:
/var                               127.0.0.1
/usr/nfsshare                      127.0.0.1 fuchur
/usr/nfs                           127.0.0.1 fuchur
/cdrom                             atreju 127.0.0.1

Can you send me your exports file ?

Martin
Comment 3 Brian Feldman freebsd_committer freebsd_triage 1999-10-30 22:24:42 UTC
State Changed
From-To: open->closed

This is user error.