You are not logged in.
Pages: 1
Good day,
I'm trying to setup NFS here at home, but it wont work. This is whats happening on the client-side:
[root@ws ~]# mount -o nfsvers=2 -t nfs 192.168.0.85:/home/ftp /mnt/ftp/
mount to NFS server '192.168.0.85' failed: server is down.
I have tried to don't use '-o nfsvers=2 -t nfs' also, but that doesnt make any difference. Server IP is 192.168.0.85 and to my workstations it's 192.168.0.80 (server is just added in all the configs to be able to test it easier).
Some configs from the server:
/etc/exports
/home/ftp 192.168.0.80(rw,sync) 192.168.0.85(ro,sync)
/etc/hosts.allow
portmap: 192.168.0.85, 192.168.0.80
lockd: 192.168.0.85 , 192.168.0.80
rquotad: 192.168.0.85 , 192.168.0.80
mountd: 192.168.0.85 , 192.168.0.80
statd: 192.168.0.85 , 192.168.0.80
/etc/hosts.deny
portmap:ALL
lockd:ALL
mountd:ALL
rquotad:ALL
statd:ALL
Output from 'rpcinfo -p'
biio@serenity ~$ rpcinfo -p
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 32768 status
100024 1 tcp 54192 status
100003 2 udp 2049 nfs
100003 2 tcp 2049 nfs
100021 1 udp 32770 nlockmgr
100021 3 udp 32770 nlockmgr
100021 1 tcp 60741 nlockmgr
100021 3 tcp 60741 nlockmgr
100005 3 udp 972 mountd
100005 3 tcp 975 mountd
It shouldnt be any firewall issues, because I don't have anyone there, and I can access other services (httpd, ftpd, sshd) from that box.
Any ideas?
Offline
Have a look in the server's /var/log/messages.log. You should see an entry something like this:
rpc.mountd: refused mount request from 192.168.0.80 for /home/ftp (/): <reason_for_refusal_here>
Offline
Have a look in the server's /var/log/messages.log. You should see an entry something like this:
rpc.mountd: refused mount request from 192.168.0.80 for /home/ftp (/): <reason_for_refusal_here>
This is the only lines that has 'rpc' in it are these:
Apr 28 05:05:39 serenity rpc.statd[2047]: Version 1.0.7 Starting
Apr 28 05:05:40 serenity rpc.statd[2047]: gethostbyname error for serenity
And I googled (just a little ) a little before making this post, and it seems like this is nothing to worry about.
Offline
You need to have portmap running on both client and server. You also need to edit /etc/hosts.allow on the client and add a portmap line to it. I don't know if you've done that.
A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.
Offline
tomk wrote:Have a look in the server's /var/log/messages.log. You should see an entry something like this:
rpc.mountd: refused mount request from 192.168.0.80 for /home/ftp (/): <reason_for_refusal_here>
This is the only lines that has 'rpc' in it are these:
Apr 28 05:05:39 serenity rpc.statd[2047]: Version 1.0.7 Starting Apr 28 05:05:40 serenity rpc.statd[2047]: gethostbyname error for serenity
And I googled (just a little ) a little before making this post, and it seems like this is nothing to worry about.
I'm not an expert, just someone with a working NFS rig, but IMO your server is not even receiving the mount request. My server generates rpc.mountd log messages for every mount request, whether it's successful or not. The "server is down" response on the client would tie in with that. If I make a purposely incorrect mount request against my running server e.g. by specifying an unexported directory, the client response is
mount: tk-gxa:/spare failed, reason given by server: Permission denied
OTOH, if I do the same command against a different non-NFS machine, the client response is almost the same as yours:
mount to NFS server 'tk-gwa' failed.
I just don't get "server is down".
I also have the same rpc.statd messages, btw, but as you suspected, the gethostbyname error is harmless.
Your rpcinfo looks good, but just for fun, can you confirm that your server is running the portmap, nfslock, and nfsd daemons, and that they are started in that order? Apart from that, I don't know what to suggest, but I hope some of this is useful anyway.
Offline
You need to have portmap running on both client and server. You also need to edit /etc/hosts.allow on the client and add a portmap line to it. I don't know if you've done that.
Now I have it running here to, and its added to hosts.allow. Still no change.
Your rpcinfo looks good, but just for fun, can you confirm that your server is running the portmap, nfslock, and nfsd daemons, and that they are started in that order? Apart from that, I don't know what to suggest, but I hope some of this is useful anyway.
Yes, I can confirm that, and that it's started in that order.
Offline
Are you running a firewall?
A bus station is where a bus stops.
A train station is where a train stops.
On my desk I have a workstation.
Offline
Are you running a firewall?
Nope, nothing.
edit:
I discovered that everytime I tried to mount something I get this in /etc/messages.log:
Apr 29 07:01:39 serenity svc: unknown version (3)
So I googled I tried using -o nfsvers=3 instead of 2 in the mount-line, and got:
[root@ws biio]# mount -o nfsvers=3 192.168.0.85:/home/ftp /mnt/ftp/
mount: Stale NFS file handle
Then I also get this in the log:
Apr 29 07:01:39 serenity rpc.mountd: authenticated mount request from 192.168.0.
80:998 for /home/ftp (/home/ftp)
I have tried restarting the nfsdaemon, but no luck.
(And yes, I like to abuse [code])
edit2
Heya, lets edit again.
Got it working, and might write down why so others can search and find a solution.
I just removed "--no-nfs-version 2" in /etc/conf.d/nfsd, then I could use nfsvers=2 and mount it without any problems.
Offline
Hey, thanks a lot for that fix! I triple checked all my services, and couldn't find out what was wrong, until I found your soluton.
I guess that the line in nfsd.conf got added after some upgrade, and I vote for its removal, unless there is a compelling reason to have it stay...
One of the main causes of the fall of the Roman Empire was that, lacking zero,
they had no way to indicate successful termination of their C programs.
Offline
Odd. I didn't even know I had /etc/conf.d/nfsd until I read it here :shock: , because I've never had to do anything to it - nfs Just Works for me, after the usual configuration.
Offline
Pages: 1