PDA

View Full Version : Issue with NFS setup



srinidhi
29th September 2010, 07:25 AM
Hi I am Srinidhi, I have been trying to set up a nfs server on my host x86 machine(IP 192.168.5.100). I want to mount root file system on my target via NFS whose ip is 192.168.5.123.

I followed the steps provided here http://fedoraforum.org/forum/showpost.php?p=492827&postcount=1
and
http://fedoraproject.org/wiki/Docs/Drafts/AGBeta/NFS

But I am unsuccessful in setting up nfs server. I have attached some snapshots of the errors returned. Can anyone help me figure out why I am unable to set up nfs

Thanks
Srinidhi

diamond_ramsey
29th September 2010, 08:06 AM
...But I am unsuccessful in setting up nfs server. I have attached some snapshots of the errors returned. Can anyone help me figure out why I am unable to set up nfs...

Hmmh, could you try the following four commands:

* chkconfig rpcbind --list
* chkconfig nfs --list
* service rpcbind status
and
* service nfs status

Post the output as text values, if possible. Graphical is okay, too. :)
=======================================
[root@localhost ~]# chkconfig rpcbind --list
rpcbind 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@localhost ~]# chkconfig nfs --list
nfs 0:off 1:off 2:off 3:off 4:off 5:off 6:off
[root@localhost ~]# service rpcbind status
rpcbind (pid 993) is running...
[root@localhost ~]# service nfs status
rpc.mountd is stopped
nfsd is stopped
rpc.rquotad is stopped
=======================================
Think happy thoughts. :)

srinidhi
29th September 2010, 11:53 AM
Thanks for the reply. I have pasted the output of the commands


[root@localhost Srinidhi]# chkconfig rpcbind --list
rpcbind 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@localhost Srinidhi]# service rpcbind status
rpcbind (pid 7777) is running...
[root@localhost Srinidhi]# service nfs status
rpc.mountd is stopped
nfsd is stopped
rpc.rquotad (pid 9248) is running...
[root@localhost Srinidhi]#

rpdumps
5th October 2010, 05:09 PM
Start NFS and portmap services on server by

service nfs start
service portmap start

Verify the shares being exported by NFS server and status of NFS services

exportfs -v
rpcinfo -p


Then fom NFS client machine

showmount -e <NFS server name or IP address>


HTH

jpollard
5th October 2010, 05:34 PM
I thing that would be "service rpcbind start" instead of portmap.

Another test6 from the client (and server for that matter) would be

rpcinfo -p <server name or IP>

When done from the client this will verify that the firewall on
the server allows connections. On the server it will verify that
the NFS applications are appropriately started and registered.

srinidhi
7th October 2010, 08:58 AM
Thanks rpdumps, ipollard for the reply. As you said I tried the commands and below is the ouptut of that.


[Srinidhi@localhost ~]$ sudo exportfs -v
[sudo] password for Srinidhi:
/nfsroot 192.168.5.123(rw,wdelay,no_root_squash,no_subtree_ check)

[Srinidhi@localhost ~]$ rpcinfo -p
program vers proto port service
100000 4 tcp 111 portmapper
100000 3 tcp 111 portmapper
100000 2 tcp 111 portmapper
100000 4 udp 111 portmapper
100000 3 udp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 41386 status
100024 1 tcp 51621 status
100011 1 udp 875 rquotad
100011 2 udp 875 rquotad
100011 1 tcp 875 rquotad
100011 2 tcp 875 rquotad
100021 1 udp 49718 nlockmgr
100021 3 udp 49718 nlockmgr
100021 4 udp 49718 nlockmgr
100021 1 tcp 47227 nlockmgr
100021 3 tcp 47227 nlockmgr
100021 4 tcp 47227 nlockmgr
100003 2 tcp 2049 nfs
100003 3 tcp 2049 nfs
100003 4 tcp 2049 nfs
100227 2 tcp 2049 nfs_acl
100227 3 tcp 2049 nfs_acl
100003 2 udp 2049 nfs
100003 3 udp 2049 nfs
100003 4 udp 2049 nfs
100227 2 udp 2049 nfs_acl
100227 3 udp 2049 nfs_acl
100005 1 udp 42722 mountd
100005 1 tcp 44384 mountd
100005 2 udp 42722 mountd
100005 2 tcp 44384 mountd
100005 3 udp 42722 mountd
100005 3 tcp 44384 mountd

[Srinidhi@localhost ~]$ rpcinfo -p 192.168.5.100
rpcinfo: can't contact portmapper: RPC: Remote system error - Connection timed out

jpollard
7th October 2010, 12:36 PM
The firewall on the server is blocking port 111. You may have to put a custom rule
in there to enable it. It used to be included in the list of known ports. I think it may
be in the process of being merged (the menu entry) into the NFS service menu, but
it hasn't gotten there yet.

If you are missing the rpcbind menu entry, add port 111/tcp and 111/udp to the
custom rules.

Once you get the rules active, try again.

Xavior
9th October 2010, 09:33 AM
Start NFS and portmap services on server by
service nfs start
service portmap start

Verify the shares being exported by NFS server and status of NFS services
exportfs -v
rpcinfo -p

Then fom NFS client machine
showmount -e <NFS server name or IP address>

HTH

This is what I'm getting: same problem kinda:
-------------------------------------------------------------------
# service nfs start
Starting NFS services: [ OK ]
Starting NFS daemon: rpc.nfsd: Setting version failed: errno 16 (Device or resource busy)
rpc.nfsd: writing fd to kernel failed: errno 13 (Permission denied)
rpc.nfsd: unable to set any sockets for nfsd
[FAILED]
-------------------------------------------------------------------

Any ideas on how to get nfs shares to connect would be appreciated,
Thanx

---------- Post added 2010-10-09 at 01:33 AM GMT ---------- Previous post was 2010-10-08 at 09:37 PM GMT ----------

This is what I get when I try to connect:
# mount /mywebs
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mount.nfs: an incorrect mount option was specified

/mywebs is a nfs share on server,
this was working before I undated my client to Fedora 12,

Thanx : )

jpollard
9th October 2010, 12:57 PM
You didn't start rpcbind - this is a renamed portmap program and it mapps RPC
requests to the appropriate port the service has registered. rpcbind must be
started before NFS.


service rpcbind start

Also, the firewall needs to have port 111 open for udp and tcp.

and you have to be root for this to work.

keithmann
27th November 2010, 05:13 PM
I am having a similar problem with a machine running fc14. Situation is 3 machines - I only need simple(??) file sharing. The custom (running Ubuntu 10.04lts) can see the SonyVaio (running fc13) as can the hpcompaq. Sometimes the hpcompaq can see the SonyVaio but not always. The custom has never connected to the hpcompaq and vice versa. Looking at this thread it may be that has been seen before. Oh I have re-installed all the nfs stuff. Checked the router, cabling and switches. Output of suggestions from thread as below:
[keith@hpcompaq1 Documents]$ su
Password:
[root@hpcompaq1 Documents]# chkconfig rpcbind
[root@hpcompaq1 Documents]# chkconfig rpcbind --list
rpcbind 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@hpcompaq1 Documents]# chkconfig nfs --list
nfs 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@hpcompaq1 Documents]# service rpcbind status
rpcbind (pid 919) is running...
[root@hpcompaq1 Documents]# service nfs status
rpc.svcgssd is stopped
rpc.mountd is stopped
nfsd is stopped
[root@hpcompaq1 Documents]# service nfs start
Starting NFS services: [ OK ]
Starting NFS daemon: [FAILED]
[root@hpcompaq1 Documents]# service portmap start
portmap: unrecognised service
[root@hpcompaq1 Documents]# service rpcbind start
[root@hpcompaq1 Documents]# service nfs start
Starting NFS services: [ OK ]
Starting NFS daemon: [FAILED]
[root@hpcompaq1 Documents]#
Any help would be most appreciated.
tia
Keith Mann

jpollard
27th November 2010, 05:26 PM
You do realize that once root is exported that you have effectively disabled
all security controls on the server.

There are very few reasons to do this - even doing this for backups is
not a good idea as you never know when certain locks may be active
pending/modified... or files being updated/modified.

---------- Post added at 11:26 AM GMT ---------- Previous post was at 11:24 AM GMT ----------


I am having a similar problem with a machine running fc14. Situation is 3 machines - I only need simple(??) file sharing. The custom (running Ubuntu 10.04lts) can see the SonyVaio (running fc13) as can the hpcompaq. Sometimes the hpcompaq can see the SonyVaio but not always. The custom has never connected to the hpcompaq and vice versa. Looking at this thread it may be that has been seen before. Oh I have re-installed all the nfs stuff. Checked the router, cabling and switches. Output of suggestions from thread as below:
[keith@hpcompaq1 Documents]$ su
Password:
[root@hpcompaq1 Documents]# chkconfig rpcbind
[root@hpcompaq1 Documents]# chkconfig rpcbind --list
rpcbind 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@hpcompaq1 Documents]# chkconfig nfs --list
nfs 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@hpcompaq1 Documents]# service rpcbind status
rpcbind (pid 919) is running...
[root@hpcompaq1 Documents]# service nfs status
rpc.svcgssd is stopped
rpc.mountd is stopped
nfsd is stopped
[root@hpcompaq1 Documents]# service nfs start
Starting NFS services: [ OK ]
Starting NFS daemon: [FAILED]
[root@hpcompaq1 Documents]# service portmap start
portmap: unrecognised service
[root@hpcompaq1 Documents]# service rpcbind start
[root@hpcompaq1 Documents]# service nfs start
Starting NFS services: [ OK ]
Starting NFS daemon: [FAILED]
[root@hpcompaq1 Documents]#
Any help would be most appreciated.
tia
Keith Mann
hmm. odd that it would fail here.

Do you have any errors in /var/log/messages?
What do you get from a "rpcinfo" on the server?

It is possible (since you tried starting NFS twice here)
that one of them worked, and the failure message is
from the earlier start.

keithmann
27th November 2010, 08:37 PM
Thanks for that - maybe problem with file permissions. Will try again and let you know.
Regards
Keith Mann

keithmann
29th November 2010, 04:18 PM
Thanks for your help. This is not a sophisticated setup just a small home network where file sharing would be very convenient. Anyway using ssh the Custom (Ubuntu 10.04lts) and the SonyVaio (Fedora 13) can see and transfer files using Dolphin. The hpcompaq can see and transfer files with the Custom and SonyVaio. However the hpcompaq (Fedora 14) refuses connections on port 22. The hosts files have been configured to allow connections. SELinux has been disabled and even when the Firewall is disabled connections are refused. ?Something deep in the configuration. I suspect the iptables stuff needs a good sorting - see error messages below:
Boot Message
Starting NFS daemon: rpc.nfsd: writing fd to kernel failed: errno 13 (Permission denied)

rpc.nfsd: writing fd to kernel failed: errno 13 (Permission denied)

rpc.nfsd: unable to set any sockets for nfsd

[keith@hpcompaq1 Documents]$ system-config-firewall

ERROR:dbus.proxies:Introspect error on :1.33:/org/freedesktop/NetworkManager: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownObject: No such object path '/org/freedesktop/NetworkManager'

[keith@hpcompaq1 Documents]$

From /etc/networkmanager
[VPN Connection]
name=openconnect
service=org.freedesktop.NetworkManager.openconnect
program=/usr/libexec/nm-openconnect-service

[GNOME]
auth-dialog=nm-openconnect-auth-dialog
properties=libnm-openconnect-properties
[VPN Connection]
name=openvpn
service=org.freedesktop.NetworkManager.openvpn
program=/usr/libexec/nm-openvpn-service

[GNOME]
auth-dialog=nm-openvpn-auth-dialog
properties=libnm-openvpn-properties
[VPN Connection]
name=pptp
service=org.freedesktop.NetworkManager.pptp
program=/usr/libexec/nm-pptp-service

[GNOME]
auth-dialog=nm-pptp-auth-dialog
properties=libnm-pptp-properties
[VPN Connection]
name=vpnc
service=org.freedesktop.NetworkManager.vpnc
program=/usr/libexec/nm-vpnc-service

[GNOME]
auth-dialog=nm-vpnc-auth-dialog
properties=libnm-vpnc-properties

in /etc/modprobe.d/dist.conf is line
“remove nfsd { /bin/umount /proc/fs/nfsd > /dev/null 2>&1 || :; } ; /sbin/modprobe -r --first-time --ignore-remove nfsd”
I am new to this stuff in LInux but I do seem to remember it was easier to do this in Win2k. I am not going back though - Fedora is more stable and flexible. Next May is Open Uni course in LInux.
Any help on this issue would be much apreciated.
Thanks
Keith Mann

Xavior
29th November 2010, 08:33 PM
For some reason I had to not use host files (hosts.deny) because while I had "ALL : ALL : DENY" in that file it did not matter that I put "ALL : 'IP' : ALLOW" in hosts.allow file, it still wouldn't work,
so I stopped using those files for now and all works well,
so it must have something to do with iptables blocking services, but I must get security back to 100% so if anyone has any ideas whats wrong here please chime in : )

TC