LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Sharing directories with NFS (https://www.linuxquestions.org/questions/linux-newbie-8/sharing-directories-with-nfs-352840/)

paddyjoy 08-13-2005 09:10 AM

Sharing directories with NFS
 
Hope someone can help me out with this problem I'm having with NFS.

I have a machine running FC4 and for some reason I can't get it to export a filesystem. In my /etc/exports file I have
Code:

/paddy 192.168.0.0/24(rw,sync,nohide,no_root_squash)
I then run
Code:

exportfs -r
but the file doesn't get exported ie it doesn't show up when I run
Code:

exportfs -v
It's really strange because there are no error messages in /var/log/messages and I have it working perfectly on another FC4 machine. Anyone have any ideas what could be causing this?

Paddy

jcliburn 08-13-2005 12:23 PM

I'll ask the obvious questions...

Do you have nfsd, portmap, rpcimapd, mountd and so on enabled? Are you sure the network address is correct (and not, say, 192.168.1.0)?

paddyjoy 08-13-2005 06:42 PM

Thanks yes I m sure I have the ip address right because I can share a directory on computer A and mount it on computer B but I can't get it to work in the other direction! I have all the correct services running but I have just noticed this error in the output of dmesg.

nfsd: unexporting all filesystems
RPC: failed to contact portmap (errno -5).
nfsd: last server has exited
nfsd: unexporting all filesystems
RPC: error 5 connecting to server localhost
RPC: failed to contact portmap (errno -5).

Any ideas? The portmap service is defo running

jcliburn 08-13-2005 09:23 PM

Is a firewall on computer A active? (/sbin/iptables -L)

Have you modified selinux to enable nfs sharing? (man nfs_selinux)

fortezza 08-13-2005 10:54 PM

Just got it working myself
 
I just barely got NFSv4 working on Fedora Core 3, two commands are really usefully when troubleshooting

1. rpcinfo -p ( see nfs services )
2. netstat -tupa ( see active connections and listening ports ).
I run these on both sides to make sure the server is listening and that the client sent its connection request when doing a mount command.

This site is a walkthrough for Gentoo, but it worked for my on Fedora ( except for the Firewall part ) - http://gentoo-wiki.com/HOWTO_Share_Directories_via_NFS

Bon Chance!

paddyjoy 08-14-2005 02:48 AM

Thanks for the help, there is no firewall on either computer but I haven't done anything with selinux. I think I might have to have a read up about that. I know on computer b I turned it off completly when I was installing fedora so that would explain why computer b works ok!
Paddy

paddyjoy 08-14-2005 03:06 AM

Got it working, wohoo! Selinux was enables on machine b.

Thanks for the help again,
Paddy


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