Re: NFS mountd version 3 over TCP

From: Rick Macklem <rmacklem_at_uoguelph.ca>
Date: Sat, 27 Aug 2011 20:55:43 -0400 (EDT)
Steve Wills wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 08/26/11 22:16, Steve Wills wrote:
> > On 08/26/11 21:41, Steve Wills wrote:
> >> Hi,
> >
> >> I'm trying to use 9.0-CURRENT as an NFS server for a VMWare ESXi
> >> 4.1.0.
> >> When I attempt the mount, it logs this message:
> >
> >> The NFS server does not support MOUNT version 3 over TCP
> >
> >> Have I configured something wrong and if so what? Or is this
> >> something
> >> related to the new NFS code?
> >
> > I guess a little more info would be helpful...
> >
> > rc.conf has:
> >
> > nfs_server_enable="YES"
> > rpcbind_enable="YES"
> > mountd_enable="YES"
> > rpc_statd_enable="YES"
> > rpc_lockd_enable="YES"
> >
> > /etc/exports contains, amongst others:
> >
> > /boxy/vmware -alldirs -maproot=0:0 -network 10.0.1 -mask
> > 255.255.255.0
> >
> > rpcinfo shows:
> >
> >    program version netid address service owner
> >     100000 4 tcp 0.0.0.0.0.111 rpcbind superuser
> >     100000 3 tcp 0.0.0.0.0.111 rpcbind superuser
> >     100000 2 tcp 0.0.0.0.0.111 rpcbind superuser
> >     100000 4 udp 0.0.0.0.0.111 rpcbind superuser
> >     100000 3 udp 0.0.0.0.0.111 rpcbind superuser
> >     100000 2 udp 0.0.0.0.0.111 rpcbind superuser
> >     100000 4 tcp6 ::.0.111 rpcbind superuser
> >     100000 3 tcp6 ::.0.111 rpcbind superuser
> >     100000 4 udp6 ::.0.111 rpcbind superuser
> >     100000 3 udp6 ::.0.111 rpcbind superuser
> >     100000 4 local /var/run/rpcbind.sock rpcbind superuser
> >     100000 3 local /var/run/rpcbind.sock rpcbind superuser
> >     100000 2 local /var/run/rpcbind.sock rpcbind superuser
> >     100005 1 udp6 ::.2.224 mountd superuser
> >     100005 3 udp6 ::.2.224 mountd superuser
> >     100005 1 tcp6 ::.2.224 mountd superuser
> >     100005 3 tcp6 ::.2.224 mountd superuser
> >     100005 1 udp 0.0.0.0.2.224 mountd superuser
> >     100005 3 udp 0.0.0.0.2.224 mountd superuser
> >     100005 1 tcp 0.0.0.0.2.224 mountd superuser
> >     100005 3 tcp 0.0.0.0.2.224 mountd superuser
> 
> As you might guess, this rpcinfo output indicates nfsd wasn't running.
> I
> am seeing this:
> 
> can't bind udp addr *: Address already in use
> 
> in syslog. Setting this:
> 
> nfs_server_flags="-t -n 4"
> 
I don't know why the nfsd wouldn't be able to bind(2) to port #2049 a
second time for UDP, but someone on the net side might know? (Just in
case it is a problem that has already been fixed, I'd try a newer kernel.)

> allowed it to startup, but it then timed out an fsinfo call. Adding -o
> to the nfs_server_flags to use the old nfs server allowed vmware to
> mount. FWIW, I can't find any reason for the udp message above,
> nothing
> seems to be using it that I can find. Ideas? tcpdumps are available if
> anyone want them.
> 
The new server was broken by r224778 on Aug. 11 and fixed by r224911 on
Aug. 16. (I recall you mentioning Aug. 11?)

Here's the r224911 patch:
--- head/sys/fs/nfsserver/nfs_nfsdport.c	2011/08/11 12:30:23	224778
+++ head/sys/fs/nfsserver/nfs_nfsdport.c	2011/08/16 14:23:16	224911
_at__at_ -3036,7 +3036,6 _at__at_
 		 */
 		if ((error = fget(td, sockarg.sock, CAP_SOCK_ALL, &fp)) != 0)
 			goto out;
-			return (error);
 		if (fp->f_type != DTYPE_SOCKET) {
 			fdrop(fp, td);
 			error = EPERM;

I suspect this is what caused the fsinfo RPC to not reply.
> Steve
> 
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.17 (FreeBSD)
> 
> iQEcBAEBAgAGBQJOWF6PAAoJEPXPYrMgexuhHPYIAJ6SVxtORDbesvU35ktAS/id
> 5iWyTWO3CTHXT42uP4IZBT1o2AWFu6e9wUX84YEZyujMln0E++8hZccaa8zQBJhr
> febHkZxqPdQOo/mpg1ci5J70Hs1UBV9cxU3uOA83vxunOM6xwA0B+4krfflj/k7P
> cPtpztmuepQQ8/S5hB5ajnfM/gFOh1f2uPwWTj2/5NSWMoVfN3f0539bh05XKfRa
> 4X7XKxN/J4HBRGaNjnL8IWu86AW60H9Q3gdisdtT0k9sK4X3DswmiRMlMt4M4rS8
> oX0vrgruTiKZf+bsraYvhuo4JyselXMicTnW7rUOVx8jiNVVk1nymSVF1XDUOrw=
> =MeJv
> -----END PGP SIGNATURE-----
> _______________________________________________
> freebsd-current_at_freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to
> "freebsd-current-unsubscribe_at_freebsd.org"
Received on Sat Aug 27 2011 - 22:55:44 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:17 UTC