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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-02-2014, 01:31 PM
|
#1
|
Member
Registered: Nov 2007
Posts: 35
Rep:
|
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 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.
|
|
|
11-03-2014, 06:07 AM
|
#2
|
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,201
|
You also need to have the nfsd server running on the pi and run exportfs -a.
|
|
1 members found this post helpful.
|
11-03-2014, 07:10 AM
|
#3
|
LQ Newbie
Registered: Oct 2014
Distribution: Centos 6.5
Posts: 16
Rep:
|
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 07:13 AM.
|
|
1 members found this post helpful.
|
11-05-2014, 07:24 AM
|
#4
|
Member
Registered: Nov 2007
Posts: 35
Original Poster
Rep:
|
Quote:
Originally Posted by smallpond
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
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.
|
|
|
11-06-2014, 06:27 AM
|
#5
|
LQ Newbie
Registered: Oct 2014
Distribution: Centos 6.5
Posts: 16
Rep:
|
Quote:
Originally Posted by CrinkElite
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.
|
11-06-2014, 09:26 AM
|
#6
|
Member
Registered: Nov 2007
Posts: 35
Original Poster
Rep:
|
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 09:59 AM.
|
|
|
11-07-2014, 12:39 PM
|
#7
|
Member
Registered: Nov 2007
Posts: 35
Original Poster
Rep:
|
Just want to bump this as I am still looking for a solution.
|
|
|
11-07-2014, 12:57 PM
|
#8
|
Moderator
Registered: Aug 2002
Posts: 26,128
|
You also need to start rpcbind which should of been installed with the above packages.
|
|
|
11-07-2014, 01:21 PM
|
#9
|
Member
Registered: Nov 2007
Posts: 35
Original Poster
Rep:
|
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.
|
|
|
11-07-2014, 03:44 PM
|
#10
|
Moderator
Registered: Aug 2002
Posts: 26,128
|
Out of curiosity have you tried to exporting and mounting /home again?
|
|
1 members found this post helpful.
|
11-08-2014, 09:25 AM
|
#11
|
Member
Registered: Nov 2007
Posts: 35
Original Poster
Rep:
|
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.
|
|
|
11-10-2014, 07:41 AM
|
#12
|
Member
Registered: Nov 2007
Posts: 35
Original Poster
Rep:
|
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!
|
|
|
09-09-2016, 08:34 AM
|
#14
|
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912
|
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 08:37 AM.
|
|
|
11-08-2016, 08:02 PM
|
#15
|
Member
Registered: Aug 2004
Distribution: Lubuntu Live OS
Posts: 432
Rep:
|
thank you, I will try...
"You also need to have the nfsd server running on the pi and run 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-20-2016 at 11:48 PM.
|
|
|
All times are GMT -5. The time now is 02:07 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|