LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-02-2014, 02:31 PM   #1
CrinkElite
Member
 
Registered: Nov 2007
Posts: 35

Rep: Reputation: 16
nfs woes mount.nsf: Connection timed out


I'm trying to mount the home folder of my raspberry pi on /mnt of a Debian VM.

From what I understand, I need to add the line

Code:
/home 192.168.1.0/24(rw,async)
to the PI's /etc/exports file and the line

Code:
192.168.1.32:/home  /mnt  nfs   rsize=8192,wsize=8192,timeo=14,intr	0	0
to my /etc/fstab file on the VM.

The mount seems to fail silenlty on boot (nothing in /mnt)
and the command
Code:
sudo mount -a
results in
Code:
mount.nsf: Connection timed out
I'm fairly bewildered at this stage as I've checked and rechecked the process a number of times but I still don't know where I'm going wrong.

All suggestions welcome.

Thanks for reading.
 
Old 11-03-2014, 07:07 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 (pre-systemd)
Posts: 2,609

Rep: Reputation: 702Reputation: 702Reputation: 702Reputation: 702Reputation: 702Reputation: 702Reputation: 702
You also need to have the nfsd server running on the pi and run exportfs -a.
 
1 members found this post helpful.
Old 11-03-2014, 08:10 AM   #3
grubby
LQ Newbie
 
Registered: Oct 2014
Distribution: Centos 6.5
Posts: 16

Rep: Reputation: Disabled
Also, add the _netdev option to your fstab line. It tells "mount" this filesystem needs network to be up and running before attempting to mount it.

So the line would be:

192.168.1.32:/home /mnt nfs _netdev,rsize=8192,wsize=8192,timeo=14,intr 0 0

This will not solve your mount -a problem, but is important for the booting part.

Last edited by grubby; 11-03-2014 at 08:13 AM.
 
1 members found this post helpful.
Old 11-05-2014, 08:24 AM   #4
CrinkElite
Member
 
Registered: Nov 2007
Posts: 35

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by smallpond View Post
You also need to have the nfsd server running on the pi and run exportfs -a.
Thank you for your reply, I haven't been able to try this until today.

The command exportfs -a returns "No such file or directory"

Maybe I'm missing a package?

Also, How would I check that the nfsd server is running?

---------- Post added 11-05-14 at 01:25 PM ----------

Quote:
Originally Posted by grubby View Post
Also, add the _netdev option to your fstab line. It tells "mount" this filesystem needs network to be up and running before attempting to mount it.

So the line would be:

192.168.1.32:/home /mnt nfs _netdev,rsize=8192,wsize=8192,timeo=14,intr 0 0

This will not solve your mount -a problem, but is important for the booting part.

Thanks for the tip. I'll add the line to fstab.
 
Old 11-06-2014, 07:27 AM   #5
grubby
LQ Newbie
 
Registered: Oct 2014
Distribution: Centos 6.5
Posts: 16

Rep: Reputation: Disabled
Quote:
Originally Posted by CrinkElite View Post
Also, How would I check that the nfsd server is running?[COLOR="Silver"]
Not sure on debian, on centos I can do:

service nfs status

If that does not work try:

/etc/init.d/nfs status

if your linux is still "systemd free" that is
 
1 members found this post helpful.
Old 11-06-2014, 10:26 AM   #6
CrinkElite
Member
 
Registered: Nov 2007
Posts: 35

Original Poster
Rep: Reputation: 16
Ok thanks everyone for the input so far.

I've managed to get myself a little more up to speed with nfs.

I've now installed the nfs-kernel-server and the nfs-common packages.

Here's what's happening now.

Code:
pi@berry ~ $ sudo /etc/init.d/nfs-kernel-server start
[....] Exporting directories for NFS kernel daemon...exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "192.168.1.50:/".
  Assuming default behaviour ('no_subtree_check').
  NOTE: this default has changed since nfs-utils version 1.0.x

exportfs: / does not support NFS export
. ok 
[....] Starting NFS kernel daemon: nfsdrpc.nfsd: address family inet6 not supported by protocol TCP
 mountdrpc.mountd: svc_tli_create: could not open connection for udp6
rpc.mountd: svc_tli_create: could not open connection for tcp6
rpc.mountd: svc_tli_create: could not open connection for udp6
rpc.mountd: svc_tli_create: could not open connection for tcp6
rpc.mountd: svc_tli_create: could not open connection for udp6
rpc.mountd: svc_tli_create: could not open connection for tcp6
. ok
Here's the output of /etc/exports on the server..

Code:
cat: exports: No such file or directory
# /etc/exports: the access control list for filesystems which may be exported
#		to NFS clients.  See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes       hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4        gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
#
/ 192.168.1.50(rw,async)

When I try mount -a on the VM I get..

Code:
deb@debian:~$ sudo mount -a
mount.nfs: access denied by server while mounting 192.168.1.32:/
Here's the output from /etc/fstab on the VM.

Code:
deb@debian:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=47fcdba3-caed-4fc2-88c3-e3aadbe7dcbb /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
UUID=4019a1da-86c6-46a3-8558-61e8c33a9dae none            swap    sw              0       0
/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0
192.168.1.32:/  /mnt/pi  nfs   rsize=8192,wsize=8192,timeo=14,intr	0	0
I should point out that I am now trying to mount the root directory of the raspberry pi but the results are the same when I try to mount any folder. I have given each machine a static IP.

Also, Raspbian was installed using BerryBoot (It's a bootloading program that grabs distro's from the net on the fly during installation allowing multiple OS's to exist on the SD card simultaniously)

EDIT/

Just thought I'd try mounting the VM on the pi's file system out of interest. It works flawlessly :/ ??

Last edited by CrinkElite; 11-06-2014 at 10:59 AM.
 
Old 11-07-2014, 01:39 PM   #7
CrinkElite
Member
 
Registered: Nov 2007
Posts: 35

Original Poster
Rep: Reputation: 16
Just want to bump this as I am still looking for a solution.
 
Old 11-07-2014, 01:57 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,932

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
You also need to start rpcbind which should of been installed with the above packages.
 
Old 11-07-2014, 02:21 PM   #9
CrinkElite
Member
 
Registered: Nov 2007
Posts: 35

Original Poster
Rep: Reputation: 16
Thanks michaelk, however I am running rpcbind.

I was getting a connection timed out message before when rpcbind wasn't running, now I get

Code:
mount.nfs: access denied by server while mounting 192.168.1.32:/
I believe this is related to the output of
Code:
pi@berry ~ $ sudo /etc/init.d/nfs-kernel-server start
which gives
Code:
exportfs: / does not support NFS export
with some other messages relating to ipv6 failure (full output is in a previous post)

It's puzzling and frustrating that it works without a hitch when mounting the VM on the pi but not the other way round.
 
Old 11-07-2014, 04:44 PM   #10
michaelk
Moderator
 
Registered: Aug 2002
Posts: 14,932

Rep: Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520Reputation: 1520
Out of curiosity have you tried to exporting and mounting /home again?
 
1 members found this post helpful.
Old 11-08-2014, 10:25 AM   #11
CrinkElite
Member
 
Registered: Nov 2007
Posts: 35

Original Poster
Rep: Reputation: 16
Just tried exporting and mounting the /home directory there.

Same results.

I have just found a post here which I believe may be related to my issue. (interestingly he is also running on an ARM processor)

http://forum.doozan.com/read.php?2,15423

I have to go out for a bit now but I'll try and follow his solution later.#

It seems he managed to get things working by forcing NFS3. (if you know how to do this please post, you'll save me having to read the docs.)

In any case, I'll post the results tonight.

Thanks again for the suggestions.
 
Old 11-10-2014, 08:41 AM   #12
CrinkElite
Member
 
Registered: Nov 2007
Posts: 35

Original Poster
Rep: Reputation: 16
Tried forcing nfs version 3 by adding the nfsver=3 to client's /etc/fstab file.

Same result

Thanks for all the suggestions but I think I'm going to have admit defeat.

Sickened!
 
Old 09-08-2016, 10:27 PM   #13
fhleung
Member
 
Registered: Aug 2004
Distribution: Lubuntu Live OS
Posts: 427

Rep: Reputation: 30
must have to need to install this? rpcbind

rpcbind https://packages.debian.org/wheezy/rpcbind
 
Old 09-09-2016, 09:34 AM   #14
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,602

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
What filesystem is /?

This may be possible for ext4 - assuming the kernel was configured to allow it.

Exporting root is most insecure, and may be why exportfs is refusing to do it.

BTW, one of the security problems is that it can be used to subvert both systems - you can create devices on the server that bypass the security of the client... The client can mess with system locking as the client doesn't have to enforce locks...

Last edited by jpollard; 09-09-2016 at 09:37 AM.
 
Old 11-08-2016, 09:02 PM   #15
fhleung
Member
 
Registered: Aug 2004
Distribution: Lubuntu Live OS
Posts: 427

Rep: Reputation: 30
thank you, I will try...
"You also need to have the nfsd server running on the pi and run exportfs -a "

Code:
exportfs -a
By default, access control lists (ACLs) are supported by NFS under Red Hat Enterprise Linux. To disable this feature, specify the no_acl option when exporting the file system.

https://www.centos.org/docs/5/html/5...g-exports.html

The default export options are sync,ro,root_squash,wdelay. <ip-client-1>(rw,sync,no_subtree_check,no_root_squash)
http://www.tutorialspoint.com/unix_c...s/exportfs.htm





append -v verbose end of the command
#mount -t nfs4 ip:/192.168.1.1/directory /mnt -v
#mount -t nfs4 192.168.1.1:/where /mnt -v
#mount -t nfs ip:/192.168.1.1/directory /mnt -v
#mount -t nfs 192.168.1.1:/directory /mnt -v

many connection refused then Connection timed out
answer: connection refused was the error verbose

Last edited by fhleung; 11-21-2016 at 12:48 AM.
 
  


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
mount.nfs: Connection timed out muttalmanithan Linux - Server 1 07-27-2013 03:52 PM
mount.nfs: Connection timed out rsheikh Linux - Newbie 1 12-19-2011 10:48 PM
Unable to NFS mount .ERROR (mount: RPC: Remote system error - Connection timed) pabba Linux - Networking 3 05-06-2010 01:09 PM
mount.nfs: mount to NFS server 'jesse' failed: timed out, retrying keupie Linux - Networking 3 06-05-2009 08:03 PM
mount.nfs: Connection timed out - Slack 12.1 bigfoot cascadia Linux - Networking 1 08-27-2008 05:32 PM


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

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