From owner-freebsd-current@FreeBSD.ORG Mon May 2 04:06:46 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 67A0F106564A for ; Mon, 2 May 2011 04:06:46 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 180B28FC15 for ; Mon, 2 May 2011 04:06:45 +0000 (UTC) Received: by vws18 with SMTP id 18so5290064vws.13 for ; Sun, 01 May 2011 21:06:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=EFhL3IRMNE26o6ZxA1yrsHl/ZDW3AH9bFPhy2KgqOi4=; b=flG2Mj0UPQeo3NIZIimD9V8V/ev/Rd95rUFW3KFRD3bi+2ydNyIMlsZd1kEo7pltQf o5XbEZAY5rmlbl6Xpdv/h/z923n7k5e9TvO4N5lZpdGqtgSRT/Wad5BzN2XW+nZTVQzB uwO2hqIWhWjMpB9czXqxDu1YDUa2Bf7DZPqZk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=VKMblC+rdrcHiajuDTTFX8er3iCicYnhenWNAfDYMfhgbEGTwvgRkRX8nvsNFu41h1 CfYqkqSD1TJAkM9AEVjHhGkhfF8DkP+ixMw5tIHVwObbqvC5N7BcxlNXe+jO9lBtldcZ C57cnJABKLylGRJQYmHKGdZyG+ffEaII2i6gQ= MIME-Version: 1.0 Received: by 10.220.112.138 with SMTP id w10mr1526705vcp.46.1304309205015; Sun, 01 May 2011 21:06:45 -0700 (PDT) Received: by 10.220.199.130 with HTTP; Sun, 1 May 2011 21:06:44 -0700 (PDT) In-Reply-To: References: <1964919189.836346.1304285873572.JavaMail.root@erie.cs.uoguelph.ca> Date: Sun, 1 May 2011 21:06:44 -0700 Message-ID: From: Garrett Cooper To: Rick Macklem Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: FreeBSD Current Subject: Re: "RPC: program not registered" with new NFS server? 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: Mon, 02 May 2011 04:06:46 -0000 On Sun, May 1, 2011 at 8:50 PM, Garrett Cooper wrote: > On Sun, May 1, 2011 at 2:37 PM, Rick Macklem wrote= : >>> Hi Rick, et all, >>> I upgraded to a later kernel on two of my machines and am running >>> into issues starting up the nfs kernel. Every time I try mounting like >>> so: >>> >>> # mount -t nfs localhost:/scratch/ /mnt/ >>> >>> or like so: >>> >>> # mount -t oldnfs localhost:/scratch/ /mnt/ >>> >>> I run into this error: >>> >>> [tcp] localhost:/scratch: RPCPROG_NFS: RPC: Program not registered >>> [tcp6] localhost:/scratch: RPCPROG_NFS: RPC: Program not registered >>> >>> I kldloaded nfsd, and then could start the mountd and nfsd >>> services (this made some of my problems go away, in particular >>> showmount -e looks sane), but things aren't sane. I know that nfs >>> client capability works because I can mount remote NFS shares via amd >>> and raw nfs mounts with another machine that I haven't upgraded and >>> things are fine, but the server appears to be completely broken on my >>> machines. >>> Here is the configuration: >>> >>> $ grep NFS /root/FALLOUT >>> #options NFSCL >>> #options NFSCLIENT # Network Filesystem Client >>> #options NFSSERVER # Network Filesystem Server >>> #options NFSLOCKD # Network Lock Manager >>> #options NFS_ROOT # NFS usable as /, requires NFSCLIENT >>> $ grep nfs /etc/src.conf >>> MODULES_OVERRIDE+=3D krpc nfscommon nfscl nfsclient nfsd nfslockd >>> nfsserver >>> >>> # rc.conf snippet... >>> >>> rpcbind_enable=3D"YES" >>> mountd_enable=3D"YES" >>> rpc_lockd_enable=3D"YES" >>> rpc_statd_enable=3D"YES" >>> nfsd_enable=3D"YES" >>> >> Well, I think the rc variable has always been: >> nfs_server_enable=3D"YES" >> >> which still works for the new one as well as old one. >> >> The only other thing I can think of is if you are >> pre-r220510 you need to create an empty stablerestart >> file before the new nfs server will start. >> >> Take a >> look to see if the nfsd is running via "ps axHl" >> or similar and check /var/log/messages for nfsd/mountd >> related errors. >> >> If you need to create the stable restart file, just do >> the following on the server: >> # install -o root -g wheel -m 600 /dev/null /var/db/nfs-stablerestart >> (This shouldn't be necessary for post r220510 systems and pre-r220510 >> =A0systems shouldn't try and run the new server by default, so this >> =A0shouldn't be your problem. Just "ls -l /var/db" to see if the file >> =A0is there.) > > Ok, I finally go things going. Here's what I did: > > 1. Added the following modules to MODULES_OVERRIDE: > > # grep nfs /etc/src.conf > MODULES_OVERRIDE+=3D =A0 =A0 =A0krpc nfscl nfscommon nfs_common nfsclient= nfsd > nfslock nfslockd nfsserver nfssvc > > Note that there are a lot more nfs services listed here. > > 2. Commented out everything sans nfs_server_enable and > nfs_client_enable -- so now everything NFS is run from the kernel > instead of userland minus, nfsd. > > Now the NFS server and client are working fine via V3 and V4. It's > important to note this because the module list is less in the old NFS > server/client setup to get things fully functional. Example: > > Old: > > $ kldstat -v | egrep 'nfs|krpc' > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0162 nfssvc > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0164 krpc > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0161 nfsserver > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0158 nfs_common > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0163 nfslockd > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0160 nfs > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0159 nfslock > > New: > > # kldstat -v | egrep 'nfs|krpc' > 11 =A0 =A01 0xffffffff80e19000 1aab0 =A0 =A0nfsclient.ko (/boot/kernel/nf= sclient.ko) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0232 oldnfs > 12 =A0 =A07 0xffffffff80e34000 13c88 =A0 =A0krpc.ko (/boot/kernel/krpc.ko= ) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0229 krpc > 13 =A0 =A02 0xffffffff80e48000 d7e =A0 =A0 =A0nfs_common.ko (/boot/kernel= /nfs_common.ko) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0230 nfs_common > 14 =A0 =A05 0xffffffff80e49000 f52 =A0 =A0 =A0nfslock.ko (/boot/kernel/nf= slock.ko) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0231 nfslock > 15 =A0 =A01 0xffffffff80e4a000 1b8f4 =A0 =A0nfsserver.ko (/boot/kernel/nf= sserver.ko) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0234 nfsserver > 16 =A0 =A05 0xffffffff80e66000 422 =A0 =A0 =A0nfssvc.ko (/boot/kernel/nfs= svc.ko) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0233 nfssvc > 17 =A0 =A01 0xffffffff80e67000 30887 =A0 =A0nfsd.ko (/boot/kernel/nfsd.ko= ) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0237 nfsd > 18 =A0 =A03 0xffffffff80e98000 10a03 =A0 =A0nfscommon.ko (/boot/kernel/nf= scommon.ko) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0235 nfscommon > 19 =A0 =A01 0xffffffff80ea9000 d94a =A0 =A0 nfslockd.ko (/boot/kernel/nfs= lockd.ko) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0236 nfslockd > 20 =A0 =A01 0xffffffff80eb7000 35500 =A0 =A0nfscl.ko (/boot/kernel/nfscl.= ko) > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0239 nfs > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0238 nfscl > > =A0 =A0Now the question I have is -- why are nfs_common and nfscommon not > the same module (I know the sources are different, and the > functionality is different, so this is more a rhetorical question than > anything else)? And one last parting note for now: I had to whack all of my saved kernels because it was trying to load mismatched modules, so something was wonky there with kldload(2), etc. I have a trivial installkernel script that tacks on the svn tag to $INSTKERNNAME and I swap the /boot/kernel symlink pointer to test things out from time to time with different kernels. Not so much nowadays, but back a year ago I did this frequently because of stability issues. Thanks! -Garrett