08-10-2018 04:14 PM
So I'm trying to connect to a NFS share on an Ubuntu box that I can hit from other Linux boxes, but when I try to execute "mount -t nfs <target> <local directory>", I get an error telling me that there's something wrong with the filesystem and that maybe I need to set up a conf file. The NFS utilities seem to be installed on the box -- certainly opkg didn't pick up anything new -- and "mount" seems to behave normally, EXCEPT that if I put in garbage for the other machine's share location (like /foo), I get the exact same error. This strongly suggests to me that while the system can see the host machine, it can't actually see the shares -- but the sharemount command isn't available for me to iterate a list of visible shares to confirm.
I'm hardly a Linux expert, so I'm sure there are other debugging options I can try to figure this out. Any ideas?
08-14-2018 02:47 PM - edited 08-14-2018 02:48 PM
There's a linux forum over here:
https://forums.ni.com/t5/NI-Linux-Real-Time/ct-p/7013
Also, have you considered serving files with WebDAV instead? You'll find better support of that protocol without messing with the OS.
08-14-2018 05:08 PM
The fact that you get the same response no matter if you type in the correct address or not makes me think that you are having problems reaching the server or that the server is mis-configured/disabled.
It might be as simple as starting/enabling your NFS server.
sudo systemctl start nfs-kernel-server.service
sudo systemctl enable nfs-kernel-server.service
Here is the Ubuntu documentation on setting up an NFS server:
https://help.ubuntu.com/lts/serverguide/network-file-system.html.en#nfs-configuration
Check out this link for more comprehensive, but not Ubuntu specific, instructions on configuring NFS server/clients:
https://wiki.archlinux.org/index.php/NFS
Hope that helps!
08-14-2018 05:11 PM
Want to have your mind blown? 🙂
Changing nothing at all about anything else on the 9039, I added the mount instruction to the fstab file and ran "mount -a" instead of trying to run "mount -t nfs <x> <y>" and, automagically, it worked. I have NO IDEA why that would work when mount.nfs would not, but it did.
08-15-2018 10:37 AM
Excellent! Glad you got it working!
The -a option causes the NFS share to mount (a)utomatically on boot which should be the default behavior.
Not sure what the -t option does. Where did you see that you should use -t?
08-15-2018 10:55 AM
-t is just a parameter that lets you specify the type of share you're mounting, so "mount -t nfs" is equivalent to "mount.nfs".
What's unusual (to me) in this scenario is that mounting from the list in fstab worked, but manually mounting a single share from the command line did NOT work.