Ken Moffat wrote: > On Fri, Mar 16, 2012 at 07:23:41PM +0100, [email protected] wrote: > >> Hello all, >> >> im trying to get NFS-Server to work for several days now. >> >> Google doesn't know anything helpfull about the problem, so i hope >> you do. >> >> A simple mount localhost:/sources /mnt always results in a >> mount.nfs: access denied by server while mounting localhost:/sources >> on client side and rpc.mountd[1641]: authenticated mount request from >> 127.0.0.1:981 for /data/sources (/data/sources) >> rpc.mountd[1641]: getfh failed: Function not implemented in the >> server log. Does anybody know what this "getfh failed: Function not >> implemented" message means and how to get the thing working? >> >> > To answer the 'getfh failed' question first: in practice, it only > seems to mean that something went wrong! > > I had a *lot* of grief getting nfs running after I rebuilt my > server for LFS-6.8 (see the lfs-support or blfs-support archives for > maybe September or October last year - other more serious issues at > first, which is why I first posted on lfs-support). After that was > sorted, my server seemed to work fine (with the nfsd part of the old > bootscripts commented out) > > Then, I tested LFS-7.0 on another machine. Postings in blfs-dev > for e.g. November. I was left with the impression that I usually > had to bounce the server after booting it (i.e. stop the server > bootscript and then restart it). > > More recently, I've had to reboot my (6.8) server a couple of times > recently - first change was to use a stable 3.0 kernel instead of the > stable 2.6.32 I'd been using on that machine. Each time, nfs mounts > failed until I stopped and then restarted the server. > > So, if you haven't already done so, try stopping the nfs server > bootscript and then restarting it. > > If that fails, are you using LFS-7.0 or newer, with the BLFS svn > book, and with /etc/hosts.allow ? I found rpcbind was a little > tricky - on the server, using 'rpcbind: 192.168.X. 127.' and on the > clients using 'rpcbind: 127.' in hosts.allow worked for me. > Obviously, 192.168.X. is my local network, change as necessary. > > ĸen > For the last few days, I have had the "getfh failed: Function not implemented" problem. I finally found it to be a nfs-server problem. /proc/fs/nfsd may be mounted before rpc.nfsd is started. If it has not been mounted, it will be mounted when rpc.nfsd is started. In either case, it will not be unmounted when nfs-server is stopped unless with an explicit umount. When rpc.mountd is started without /proc/fs/nfsd being mounted, that is when the filesystems are not successfully exported.
If the umount is not executed when nfs-server is stopped, rpc.mountd will work when it is restarted. It shouldn't have taken me days to figure this out. Several LFS versions ago, I had to rearrange the starting sequence. I thought it was to get the mount before rpc.nfsd, but I tested it on LFS 6.7 that I still have; it's rpc.mountd. Maybe that's why nobody believed me. -- http://linuxfromscratch.org/mailman/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
