Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Jan 2011 13:59:43 -0500 (EST)
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        Marek Salwerowicz <salwerom@iem.pw.edu.pl>
Cc:        freebsd-current@freebsd.org, Andrzej Tobola <ato@iem.pw.edu.pl>
Subject:   Re: NFSv4 and pam_mount - mounting user home directories.
Message-ID:  <715043409.18716.1294599583344.JavaMail.root@erie.cs.uoguelph.ca>
In-Reply-To: <4D29D61E.8040905@iem.pw.edu.pl>

next in thread | previous in thread | raw e-mail | index | archive | help


----- Original Message -----
> > It just worked for me. Try setting the sysctl before starting nfsd.
> > If
> > you are starting the daemons manually for a kernel that doesn't have
> > "options NFSD" do:
> >
> > # nfsuserd
> > # mountd -e -r
> > # sysctl vfs.newnfs.server_min_nfsvers=4
> > # nfsd -e -u -t -n 8
> >
> > - mountd -e loads the module, so you can do the sysctl after that
> > and before
> >    starting the nfsd. (Or build a kernel with "options NFSD" and do
> >    the sysctl
> >    anytime before starting the nfsd.)
> >
> > rick
> > ps: I tested the FreeBSD-8 client. Other clients may not even talk
> > to the NFS
> >     server during mounting. For those, the mount would succeed, but
> >     subsequent
> >     use of the mount won't work.
> I tested it on 8.1 Release (GENERIC) i386 (two VMs):
> 
> server:
> /etc/rc.conf:
> #nfsv4_server_enable="YES"
> #nfs_server_enable="YES"
> #nfsuserd_enable="YES"
> 
> made modification in /etc/exports:
> V4: /usr -sec=sys -network 192.168.183.0 -mask 255.255.255.0
> /usr/home -sec=sys -network 192.168.183.0 -mask 255.255.255.0
> 
> nfs4-server# nfsuserd
> nfs4-server# mountd -e -r
> nfs4-server# sysctl vfs.newnfs.server_min_nfsvers=4
> vfs.newnfs.server_min_nfsvers: 2 -> 4
> nfs4-server# nfsd -e -u -t -n 8
> nfs4-server#
> 
> but now client is unable to mount both nfsv4 and nfsv3:
> 
> nfs4-client# mount_nfs -o nfsv4 192.168.183.131:/home /tmp/nfs4/
> [tcp] 192.168.183.131:/home: nfsd: RPCPROG_NFS: RPC: Remote system
> error
> - Connection refused

Again, it works for me (using a pretty current FreeBSD client). The
only difference is that I never run mount_nfs directly and would use
the following command:

# mount -t nfs -o nfsv4 192.168.183.131:/home /tmp/nfs4

Assuming the client is a FreeBSD8 box on the 192.168.183.0 subnet,
I don't know why it wouldn't work, except that I'd suggest trying
the command the way I type it, in case that runs it with somewhat
different options?

rick



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?715043409.18716.1294599583344.JavaMail.root>