troubleshooting NFS following minimal install - pls help
DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
troubleshooting NFS following minimal install - pls help
From flatscreen (an iMac on OS X) I cannot mount a directory on marvin (Debian on 386) that I am trying to share. Details below should enable someone knowledgable to help.
The error message from the iMac Flatscreen
[FlatScreen:~] roger% sudo mount 192.168.2.102:/home/roger /mnt
NFS Portmap: RPC: Program not registered
exportfs (on server, marvin) seems not to work...but why?
roger@marvin:~$ sudo exportfs -a
marvin.192.168.2.1:/home/roger: Function not implemented
192.168.2.100:/home/roger: Function not implemented
A clue that NFS startup does not work properly.
roger@marvin:~$ sudo /etc/rc2.d/S20nfs-kernel-server start
Exporting directories for NFS kernel daemon...marvin.192.168.2.1:/home/roger: Function not implemented
192.168.2.100:/home/roger: Function not implemented
done.
Starting NFS kernel daemon: nfsd mountd.
Problem seems to be that NFS is not running but why?
roger@marvin:~$ rpcinfo -p
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 1024 status
100024 1 tcp 1024 status
100005 1 udp 1025 mountd
100005 1 tcp 1025 mountd
100005 2 udp 1025 mountd
100005 2 tcp 1025 mountd
NFS kernel server seems installed OK
roger@marvin:~$ sudo apt-get install nfs-kernel-server
Reading Package Lists... Done
Building Dependency Tree... Done
Sorry, nfs-kernel-server is already the newest version.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
/etc/exports is set to export roger's home directory
roger@marvin:~$ cat /etc/exports
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
/home/roger 192.168.2.100(rw) 192.168.2.102(rw)
/etc/hosts.allow seems to be OK - I am connecting from 192.168.2.100
roger@marvin:~$ cat /etc/hosts.allow
# /etc/hosts.allow: list of hosts that are allowed to access the system.
# See the manual pages hosts_access(5), hosts_options(5)
# and /usr/doc/netbase/portmapper.txt.gz
#
# Example: ALL: LOCAL @some_netgroup
# ALL: .foobar.edu EXCEPT terminalserver.foobar.edu
#
There is a very good Howto on NFS which I followed to the letter and got my system working. 1stly make sure you get nfs listed in rpcinfo. 2nd in your /etc/exports try using 192.168.2.100/255.255.255.0(rw). I remember having trouble like this and adding the netmask solved it.
I too have found the HOWTO at ( http://www.tldp.org/HOWTO/NFS-HOWTO/index.html ) and am following it to the letter. I have got to the point where I think that the problem is that NFS is not starting but I do not know why.
7.9. nfsd won't start
Check the file /etc/exports and make sure root has read permission. Check the binaries and make sure they are executable. Make sure your kernel was compiled with NFS server support. You may need to reinstall your binaries if none of these ideas helps.
That means that something wants to use a function which is not available, correct?
Could it be that the NFS server program is for NFS version 3, and the installed kernel was only compiled for NFS version 2 (or only the module for NFS version 2 is available)?
See the kernel module configuration options in /usr/src/linux/Documentation/Configure.help
originated on insecure port, psychoanalysis suggested
OK - I gave up on the nfs-kernel-server and tried the nfs-user-server and it seems to wor a bit better.
I can mount from the Mac but I cannot access it and when I look at /var/log/syslog on the linux machine I get:
Jul 31 22:27:01 marvin mountd[217]: NFS mount of /home/roger attempted from 192.168.2.100
Jul 31 22:27:01 marvin mountd[217]: /home/roger has been mounted by 192.168.2.100
Jul 31 22:27:01 marvin nfsd[215]: NFS request from 192.168.2.100 originated on insecure port, psychoanalysis suggested
The linux machine takes its security very seriously -- every user has to login and identify himself/herself and usually be authenticated with a password.
When the linux machine exports one of its directories, it gets a bit concerned about who is able to see those files.
And as you know in the exportfs file you can specify various options including which machines are able to mount those files.
In the Unix world, the only trusted user who can issue a mount command is root. But on a Macintosh or Windoze 95/98/ME anybody can login (without even a password) and do system commands such as mount. Thus the user on the Macintosh is not authenticated and the NFS server on the linux machine therefore refuses to allow this unknown person to mount its disks as a security precaution.
So in order to allow the Macintosh be able to mount the disk, one either runs some authenticating software on the Linux machine, pcnfsd if I recall correctly, or you disable this security feature of the NFS daemon.
man 5 exports (its a bit of a hunt trying to find the man page which actually has the options because the possibilities are
exportfs, mountd etc and in both section 5 and section 8)
and there we find the alternative solution to your problem
General Options
exportfs understands the following export options:
secure This option requires that requests originate on an internet port
less than IPPORT_RESERVED (1024). This option is on by default.
To turn it off, specify insecure.
But, PLEASE PLEASE PLEASE if you use this option, ensure that you only export the directories from the linux machine with the insecure option set to only the Macintosh machine.
Originally posted by James007Bond Final problem was that you need to enable ports 111 and 2049 on the firewall on the iMac if you want anybody to be able to mount.
So this was not in fact a Debian or even a Linux question at all!
That is the first time you have mentioned that there was a firewall on the Macintosh.
Is it usual to have firewalls on machines within a LAN?
Originally posted by Corin So this was not in fact a Debian or even a Linux question at all!
Well, with all respect, I think it started out as such. I did never manage to get the kernel nfs-server working even though I know that the requests were getting through to the iMac (I did try that with the firewall off for a while). Re-reading the thread, I can see that I was not clear that I was trying to get this working in both directions!
The firewall is a standard part of the iMac distribution and since I do have an internet connection (albeit through a router which does itself act as a firewall), I am sure that it is good practice to also run the one on the iMac, considering that I value highly what is on it.
Thanks anyway for your good advice and I will try to be clearer in future!
I have the same problem, except PC<->PC, no Mac involved. It seems to me tha this did start out a Linux issue ("Function not implemented"), and that was solved by changing from teh nfs-kerner-server to the user space nfs-server, and then he got Mac authentification problems.
SO my question; why the original problem?
(I stilll have it!)
I have two Debian systems trying to cross mount directories, it works from A->B, but when B tries to mount from A, it gets the same symptoms and situation as James;
NFs starts (on both machines, but on B when I try to do the mount (or nfsd tries to do it (from init.d/nfs-kernel-server)) it gives the error:
mount: server_sys:/s/net failed, reason given by server: Permission denied
And on the server, when it runs init.d/nfs-kernel-server;
I get the "Function not implemented" message.
Other details; (I didn't include exports and hosts.allow; they are OK).
On Server: (Omega)
omega:/etc/init.d# ./nfs-common start
Starting NFS common utilities: statd lockd.
omega:/etc/init.d# ./nfs-kernel-server start
Exporting directories for NFS kernel daemon...theta.cs.mum.edu:/s/net:
Function not implemented
done.
Starting NFS kernel daemon: nfsd mountd.
On client: (Theta)
theta:/etc/init.d# ./mountnfs.sh
Starting portmapper... Mounting remote filesystems...
mount: omega:/s/net failed, reason given by server: Permission denied
On Server: /var/log/messages:
Aug 6 23:40:50 omega rpc.mountd:
authenticated mount request from theta.cs.mum.edu:609 for /s/net (/s/net)
Aug 6 23:40:50 omega rpc.mountd: getfh failed: Function not implemented
On Client:
theta:/etc/init.d# mount omega:/s/net /net/omega
mount: omega:/s/net failed, reason given by server: Permission denied
theta:/etc/init.d#
-----------------------------------------
My best guess is that somehow the versions are different - server was built from Debian 3.0, client from 2.2, but both are compeltely "apt-get update"ed, and report newest version of all components involved.
But, I note that the client has a file /etc/init.d/mountnfs.sh, and the server does this from the nfs-kernel-serfer file - so something is different.
Do I need to convert from nfs-kernel-server to unser-space version nfs-server? If so, why does Debian standard install the kernel version?
I do notice that /etcv/init.d/nfs-kernel-server starts rpc.mountd with the option "--no-nfs-version 3".
Seems to work, but then the mountd seems to fail, quietly.
I do thikn itis al configured properly, but the distribution is broken! :-)
I'll look into making my own kernel, ... but dislike having to go DIY, away from the standard distribution.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.