LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-06-2010, 02:57 PM   #1
Gerard_2009
LQ Newbie
 
Registered: Jan 2005
Location: Switzerland
Distribution: debain lenny, slackware 10.0, vectorlinux 4.3, kubuntu feisty
Posts: 23

Rep: Reputation: 15
NFS exports do not show up in /proc/fs/nfs/exports


Hey there,

I installed Debian on my NAS and I installed nfs to share the files, but I cannot mount anything over nfs with the it. it seems that I dont get the exports right.

I added the IP to the hosts.allow, I added it to the exports.
to make it easier, shananigen has the IP 192.168.10.33 and is the server
debian has the IP 192.168.1.34 and is the client

is there a problem if I go across subnets?

anyway, here we go

shananigen:/etc# cat exports
#
/home/gerard 192.168.1.34(rw,sync,no_subtree_check,root_squash)
/home/gerard/Sound 192.168.1.34(rw,sync,no_subtree_check,root_squash)
/home/gerard/Progs 192.168.1.33(rw,sync,no_subtree_check,root_squash)

then I do exportfs -rav

shananigen:/etc# exportfs -rav
exporting 192.168.1.33:/home/gerard/Progs
exporting 192.168.1.34:/home/gerard/Sound
exporting 192.168.1.34:/home/gerard

shananigen:/etc# exportfs
/home/gerard 192.168.1.34
/home/gerard/Sound
192.168.1.34
/home/gerard/Progs
192.168.1.33

shananigen:/etc# showmount -e
Export list for shananigen:
/home/gerard/Progs 192.168.1.33
/home/gerard/Sound 192.168.1.34
/home/gerard 192.168.1.34

but still it doesnt show up in /proc/fs/nfs/exports

shananigen:/etc# cat /proc/fs/nfs/exports
# Version 1.1
# Path Client(Flags) # IPs

I have put a line in fstab that looks like this

192.168.10.33:/home/gerard /home/gerard/Sound nfs rw,user,noauto 0 0

and when I do want to mount it it goes like this:

gerard@debian:~$ mount Sound/
mount.nfs: 192.168.10.33:/home/gerard failed, reason given by server: Permission denied

on the server rpcinfo -p gives:

shananigen:/etc# rpcinfo -p
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 59855 status
100024 1 tcp 44706 status
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100021 1 udp 50243 nlockmgr
100021 3 udp 50243 nlockmgr
100021 4 udp 50243 nlockmgr
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100021 1 tcp 44735 nlockmgr
100021 3 tcp 44735 nlockmgr
100021 4 tcp 44735 nlockmgr
100005 1 udp 46727 mountd
100005 1 tcp 57545 mountd
100005 2 udp 46727 mountd
100005 2 tcp 57545 mountd
100005 3 udp 46727 mountd
100005 3 tcp 57545 mountd
shananigen:/etc#

and on the client:

debian:/home/gerard# rpcinfo -p
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 42452 status
100024 1 tcp 51989 status
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100021 1 udp 34847 nlockmgr
100021 3 udp 34847 nlockmgr
100021 4 udp 34847 nlockmgr
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100021 1 tcp 39760 nlockmgr
100021 3 tcp 39760 nlockmgr
100021 4 tcp 39760 nlockmgr
100005 1 udp 45107 mountd
100005 1 tcp 54604 mountd
100005 2 udp 45107 mountd
100005 2 tcp 54604 mountd
100005 3 udp 45107 mountd
100005 3 tcp 54604 mountd
debian:/home/gerard#

why doesnt the exports show up in /proc/fs/nfs/exports?

Thanks for your help
 
Old 09-07-2010, 06:07 AM   #2
sem007
Member
 
Registered: Nov 2006
Distribution: RHEL, CentOS, Debian Lenny, Ubuntu
Posts: 638

Rep: Reputation: 113Reputation: 113
Quote:
but still it doesnt show up in /proc/fs/nfs/exports

shananigen:/etc# cat /proc/fs/nfs/exports
# Version 1.1
# Path Client(Flags) # IPs
/proc/fs/nfs/exports contains information about what filesystems are exported to actual client (individual, not subnet or whatever) at the moment. Once you mount shared NFS directory on client it will show you entry on server side.
i.e
Code:
[root@localhost ~]# cat /proc/fs/nfs/exports
# Version 1.1
# Path Client(Flags) # IPs
/data   *(rw,root_squash,sync,wdelay,no_subtree_check)
Quote:
I have put a line in fstab that looks like this

192.168.10.33:/home/gerard /home/gerard/Sound nfs rw,user,noauto 0 0

and when I do want to mount it it goes like this:

gerard@debian:~$ mount Sound/
mount.nfs: 192.168.10.33:/home/gerard failed, reason given by server: Permission denied
Normal user can't mount share directory. so use sudo command or run as root user.
As your export file configuration /home/gerard directory is exported for only 192.168.1.34 IP. so cross check once again.

Hope this help

Last edited by sem007; 09-07-2010 at 06:09 AM.
 
1 members found this post helpful.
Old 09-07-2010, 04:06 PM   #3
Gerard_2009
LQ Newbie
 
Registered: Jan 2005
Location: Switzerland
Distribution: debain lenny, slackware 10.0, vectorlinux 4.3, kubuntu feisty
Posts: 23

Original Poster
Rep: Reputation: 15
Hey there again,

thanks for the reply. It helped understanding that this is not the porblem, so I looked further.

one problem was, that I am crossing two switches, so the IP from the client doesnt show as the requestee IP on the server. Looking into the syslog file of the server I found the following

Sep 7 22:00:27 shananigen mountd[3027]: refused mount request from 192.168.10.35 for /home/gerard (/home/gerard): illegal port 60781

So first the sever thinks that the client is connecting from 192.168.10.35. the second thing is that the server doesnt like the port.

Changing the IP in the server exportfs and putting 'insecure' in to allow all ports, it works like a charm.

thanks for the help.
 
  


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
exportfs does not export info to /proc/fs/nfs/exports rhelaine Linux - Networking 6 06-16-2011 04:19 AM
exportfs does not export info to /proc/fs/nfs/exports rhelaine Linux - Software 3 11-08-2006 06:43 PM
NFS exports ip masking jxrod2000 Linux - Networking 1 07-12-2006 05:55 AM
NFS and exports file DanielTan Linux - Networking 12 07-31-2005 12:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:08 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration