LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 07-27-2003, 01:46 PM   #1
James007Bond
LQ Newbie
 
Registered: Jul 2003
Location: Antwerp, Belgium
Posts: 11

Rep: Reputation: 0
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
#

nfsd: 192.168.2.100
portmap: 192.168.2.100
lockd: 192.168.2.100
rquotad: 192.168.2.100
mountd: 192.168.02.100
statd: 192.168.02.100
 
Old 07-27-2003, 02:16 PM   #2
James007Bond
LQ Newbie
 
Registered: Jul 2003
Location: Antwerp, Belgium
Posts: 11

Original Poster
Rep: Reputation: 0
192.168.2.1 come from a bad /etc/hosts

...but even after fixing it, I still get the same error code:

>>marvin.192.168.2.1:/home/roger: Function not implemented

roger@marvin:~$ cat /etc/hosts
127.0.0.1 localhost
192.168.2.102 marvin

# The following lines are desirable for IPv6 capable hosts
# (added automatically by netbase upgrade)

::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Last edited by James007Bond; 07-27-2003 at 03:20 PM.
 
Old 07-27-2003, 03:35 PM   #3
TigerOC
Senior Member
 
Registered: Jan 2003
Location: Devon, UK
Distribution: Debian Etc/kernel 2.6.18-4K7
Posts: 2,380

Rep: Reputation: 49
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.
 
Old 07-27-2003, 03:50 PM   #4
James007Bond
LQ Newbie
 
Registered: Jul 2003
Location: Antwerp, Belgium
Posts: 11

Original Poster
Rep: Reputation: 0
I think we are closing in on the problem

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.


roger@marvin:~$ ls -l /etc/exports
-rwxr-xr-x 1 root root 190 Jul 27 22:41 /etc/exports

roger@marvin:~$ ps aux | grep nfs
root 184 0.0 1.9 1424 584 ? S 22:45 0:00 /usr/sbin/rpc.mountd --no-nfs-version 3
roger 238 0.0 1.4 1336 428 pts/0 S 22:50 0:00 grep nfs
 
Old 07-27-2003, 07:49 PM   #5
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 30
Just a guess concerning the error

Function not implemented

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

CONFIG_NFSD

CONFIG_NFSD_V3
 
Old 07-31-2003, 03:47 PM   #6
James007Bond
LQ Newbie
 
Registered: Jul 2003
Location: Antwerp, Belgium
Posts: 11

Original Poster
Rep: Reputation: 0
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


Surely someone knows how to solve this one?
 
Old 07-31-2003, 06:00 PM   #7
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 30
Here's the explanation.

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.

In your /etc/exports file

/path_to_directory <TAB> macintosh.mydomain.ORG(all_squash,insecure,ro,sync)

Last edited by Corin; 07-31-2003 at 06:03 PM.
 
Old 08-03-2003, 01:37 PM   #8
James007Bond
LQ Newbie
 
Registered: Jul 2003
Location: Antwerp, Belgium
Posts: 11

Original Poster
Rep: Reputation: 0
Wink Works perfectly in the end!

Took a bit of fiddling, but there is a good explanation at: http://www.ceci.at/mac/index.html

...and I recommend downloading his exportfs utility.

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.

Corin - thanks for your tip. In fact you can work around that by using the -P option in sudo mount_nfs, so nothing is "insecure", I think.
 
Old 08-04-2003, 12:04 PM   #9
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 30
Re: Works perfectly in the end!

Quote:
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?

Last edited by Corin; 08-04-2003 at 12:06 PM.
 
Old 08-04-2003, 02:36 PM   #10
James007Bond
LQ Newbie
 
Registered: Jul 2003
Location: Antwerp, Belgium
Posts: 11

Original Poster
Rep: Reputation: 0
Re: Re: Works perfectly in the end!

Quote:
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!
 
Old 08-07-2003, 07:05 AM   #11
guthrie
LQ Newbie
 
Registered: Jul 2003
Location: Iowa
Distribution: Debian
Posts: 24

Rep: Reputation: 15
Question final solution .. if not Mac client?

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?

Thanks for any help.

Gregory
 
Old 08-07-2003, 05:22 PM   #12
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 30
I alway compile my own kernel and always include NFS V3 client and server support.

I think the problem that people are having is due to lack to NFS V3 support. Why else the error message "feature not supported" ?

How about compiling the kernel yourself on both machines and including V3 support and seeing if you still get the same problem?

As far as I know, in terms of performance, it is much much better to use the kernel NFS server than the user space NFS server.
 
Old 08-08-2003, 11:00 AM   #13
guthrie
LQ Newbie
 
Registered: Jul 2003
Location: Iowa
Distribution: Debian
Posts: 24

Rep: Reputation: 15
NFS problems..

Thanks, Yes, I suspect something similar. Is there an easy way to query my NFS server/clients to see their versions?

I've never built my own kernel before, .. Hmm..!??!

I wish out of the box stuff would work! :-)

Thanks, Greg
 
Old 08-08-2003, 02:24 PM   #14
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 30
I do not know if this answers the question or not, but can you do

$ cat /proc/net/nfs
$ cat /proc/net/nfsd

I suspect bu do not know for certain if the proc lines in the output reveal the available versions.

As to working out of the box, you always have to set up things to get them working as you want :+)
 
Old 08-08-2003, 08:36 PM   #15
guthrie
LQ Newbie
 
Registered: Jul 2003
Location: Iowa
Distribution: Debian
Posts: 24

Rep: Reputation: 15
Hmm, doesn't say anythign useful to me!

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.

Then I'm accountable for all problems! :-)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Minimal install AlberTUX Slackware 1 11-23-2005 01:55 AM
mounting NFS shares help pls mlu Linux - Networking 1 11-23-2004 09:32 PM
help with a minimal install mceachrw Amigo 6 09-22-2004 07:18 PM
pls pls pls help me ! i'm tired with httpd config on fedora apache 2.0.48 AngelOfTheDamn Fedora 0 01-24-2004 05:12 PM
troubleshooting nfs/can't ping local while firewall enabled toastermaker Linux - Newbie 18 11-28-2003 10:34 PM


All times are GMT -5. The time now is 04:39 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration