From owner-freebsd-current@FreeBSD.ORG Sun Jan 9 15:37:15 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 702DF106566C for ; Sun, 9 Jan 2011 15:37:15 +0000 (UTC) (envelope-from salwerom@iem.pw.edu.pl) Received: from volt.iem.pw.edu.pl (volt.iem.pw.edu.pl [194.29.146.3]) by mx1.freebsd.org (Postfix) with SMTP id 07EE28FC0C for ; Sun, 9 Jan 2011 15:37:14 +0000 (UTC) Received: from [127.0.0.1] (cwx170.internetdsl.tpnet.pl [83.19.131.170]) (Authenticated sender: salwerom) by volt.iem.pw.edu.pl (Postfix) with ESMTPSA id 5EE78A66A57; Sun, 9 Jan 2011 16:37:07 +0100 (CET) Message-ID: <4D29D61E.8040905@iem.pw.edu.pl> Date: Sun, 09 Jan 2011 16:37:02 +0100 From: Marek Salwerowicz User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; pl; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 MIME-Version: 1.0 To: Rick Macklem References: <1591195360.13254.1294581047595.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <1591195360.13254.1294581047595.JavaMail.root@erie.cs.uoguelph.ca> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.96.5 at volt.iem.pw.edu.pl X-Virus-Status: Clean X-Mailman-Approved-At: Sun, 09 Jan 2011 16:45:51 +0000 Cc: freebsd-current@freebsd.org, Andrzej Tobola Subject: Re: NFSv4 and pam_mount - mounting user home directories. X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jan 2011 15:37:15 -0000 > 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 ^C nfs4-client# mount_nfs 192.168.183.131:/usr/home /tmp/nfs3/ ^C (hangs for a long time) nfs4-client# -- Marek Salwerowicz