Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Mounting a NFS share on a NI 9039 running Linux RT...?

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?

0 Kudos
Message 1 of 6
(2,845 Views)

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.

0 Kudos
Message 2 of 6
(2,793 Views)

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!

0 Kudos
Message 3 of 6
(2,789 Views)

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. 

0 Kudos
Message 4 of 6
(2,785 Views)

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?

0 Kudos
Message 5 of 6
(2,769 Views)

-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.

0 Kudos
Message 6 of 6
(2,767 Views)