Subject: Re: NFS hangs on Mac port of NetBSD 1.2
To: Scott Reynolds <scottr@plexus.com>
From: Greg Earle <earle@isolar.Tujunga.CA.US>
List: current-users
Date: 10/08/1996 00:51:34
> On Mon, 7 Oct 1996, Greg Earle wrote:
> 
>> But for normal things (rlogin/telnet/ftp/etc.) it seems to work fine, 
though.
>> But NFS is another story altogether.  I use "amd" with some local AMD maps.
> 
> Can you mount things manually without trouble?  Do they continue to work?

The manual mount attempts also fail similarly.

> If not, does the -c (amd's `noconn') option apply to this situation?  

Well, that's a good question.

If I read the man page, I would say "No":

     -c      For UDP mount points, do not do a connect(2).  This must be used
             for servers that do not reply to requests from the standard NFS
             port number 2049.

I can't believe that I'd need this with a Solaris NFS server, which I know
damn well listens on port 2049.  Secondly, I have *no* problem doing NFS
mounts from the SPARCserver to the NetBSD/SPARC machine, without using
"noconn" at all.  Explain that one ...

Yet here's the interesting thing.  Here are two lines from my /etc/amd/home
map.  The first one is unchanged; meaning it pretty much has the default
options I use for the amd maps:

/defaults opts:=rw,nosuid,intr,grpid,noconn,resvport,timeo=20,retrans=8;\
remopts:=${opts},rsize=1024,wsize=1024
[...]
mdm type:=nfs;opts:=rw,nosuid,intr,grpid,resvport,timeo=20,retrans=8;\
rfs:=/export/vrhome/mdm;rhost:=server

gke type:=nfs;opts:=rw,nosuid,intr,grpid,noconn,resvport,timeo=20,retrans=8,\
wsize=8192,rsize=8192;rfs:=/export/home/gke;rhost:=server

Notice that the only difference between these two entries is the changed
default wsize/rsize (back to normal) and the addition of "noconn".

The net result:

ls of "/home/mdm" still fails, producing

  277 ??  D      0:00.14 amd -l syslog -x error,noinfo,nostats -p -a /tmp_mnt /
  276 p1  D      0:00.10 ls /home/mdm 

with, again, "netio" WCHANs.

ls of "/home/gke" *works*, however.  So either the "noconn" or the 8K w/rsize
is making it work.  I'll determine which one it is tomorrow.

However, I should note that once I've tried to look at a mount that drops into
"D" state, "amd" is no longer responsive.  Right now an attempt to look at
"/home/gke" successfully mounts, but it hangs with a "nfsrcv" WCHAN.  I also
get:

macbsd4me# ls -FC /home/gke
nfs server amd:59: not responding

To make things even whackier, I can't even manually mount the SPARCserver now:

macbsd4me# mount -v -r -t nfs -o nosuid,-P,-c coda3:/home/gke /mnt
nfs: can't access /home/gke: Permission denied

Huh?

Yet I can still manually mount/unmount my own NetBSD home directory:

macbsd4me# mount -v -r -t nfs -o nosuid,-P,-c netbsd4me:/export/home/earle /mnt
netbsd4me:/export/home/earle on /mnt type nfs (nosuid, read-only)
macbsd4me# umount -v /mnt
/export/home/earle: unmount from /mnt

> Also, if I'm not mistaken, amd uses v2 mounts exclusively.

Sounds like a bug to me, given that "mount_nfs" uses V3 mounts by default,
according to the man page ...

	- Greg