Add NFS share from Ubuntu

I have setup an Ubuntu 20.04 computer to share with nfs. In /etc/exports there is this line

NFSv4
/mnt/raid5/Video/Series 192.168.1.103(rw,sync,no_subtree_check)

ufw status give (among otherlines)
2049 ALLOW 192.168.1.103

And on the Vero 4k+ in /etc/fstab
192.168.1.101:/mnt/raid5/Video/Series /mnt/Series nfs noauto,x-systemd.automount 0 0

The ip adresses are correct, use static ip in the router and I have double checked the actual ip’s on each device.

But I can’t get it to mount in osmc, when I try to access or add /mnt/Series in the Kodi gui the system becomes unresponsive for a few minutes, until a connection timeout I guess…

I have restarted both the Vero and the computer. In another Ubuntu 20.04 computer the share mounts nicely via fstab thou I did not manage to access it with nautilus.

Anyone got any tips? Maybe there is a user permission issue, I have tried to change owner and group of the folder but I am a bit of a noob…

Why on earch do you want to restrict your V4K+ to a single port? Is this the Pentagon we’re dealing with?

Switch off UFW and see what happens. Then switch it back on.

On a home network, I’d normally just let through all traffic from an authorised IP address.

FYI, here’s what I see on a small NFS server I’m running:

/usr/sbin/rpcinfo -p 
   program vers proto   port  service
    100000    4   tcp    111  portmapper
    100000    3   tcp    111  portmapper
    100000    2   tcp    111  portmapper
    100000    4   udp    111  portmapper
    100000    3   udp    111  portmapper
    100000    2   udp    111  portmapper
    100005    1   udp  35960  mountd
    100005    1   tcp  51457  mountd
    100005    2   udp  43752  mountd
    100005    2   tcp  46763  mountd
    100005    3   udp  38401  mountd
    100005    3   tcp  45933  mountd
    100003    3   tcp   2049  nfs
    100003    4   tcp   2049  nfs
    100227    3   tcp   2049
    100003    3   udp   2049  nfs
    100003    4   udp   2049  nfs
    100227    3   udp   2049
    100021    1   udp  37918  nlockmgr
    100021    3   udp  37918  nlockmgr
    100021    4   udp  37918  nlockmgr
    100021    1   tcp  41937  nlockmgr
    100021    3   tcp  41937  nlockmgr
    100021    4   tcp  41937  nlockmgr
    100024    1   udp  51782  status
    100024    1   tcp  56731  status

Many of those are dynamically allocated.

Well, I followed a guide, and when I ran the command to allow the specific ip the port number came automaticaly.

And I am gonna use my server as backup and personal cloud for my extended family (probably nextcloud or something that can sync photos with android).

Anyhow, disabling ufw made it work on my Vero so many thanks!

Now, how do I proceed? Can I allow a range of ports or a range of ip’s in ufw, would that work?

You would need to open several ports and also limit the upper ports used by the server.

Best to check some info available
https://www.google.com/search?q=nfs%20Server%20Firewall%20fixed%20Port%20

Hmm, found this

Maybe I’ll try to add nfs version and port to fstab options. Will get deeper into this tomorrow.

Thank you for your help!

Check if the vero4k is recognizing it correctly with:

showmount -e 192.168.1.101

should mount you what the NFS server exports (Assuming the NFS Server is 192.168.1.101.
I rather think you have an issue with the local firewall. As I use my own firewall setup (Manual) and I don’t have a firewall per se on my NAS, can’t help yu here directly.

You may want to check here for instructions on how to run a NFS server with details for ubuntu 20.x

Then, I may use different settings on the exports file:

/path/Movies 192.168.1.103(fsid=1,rw,subtree_check,secure,crossmnt,async)

As this is the movies directory, using sync would only force it to try at all costs to keep it in sync and cause the system to hang. I use sync on NFS shares where I need to actually work on files and want to keep these in sync accross.

1 Like

Forgot to post the other day.

Well, the nfs share started to work when I disabled ufw on the server, and when I reenabled ufw it continued to work. Maybe there was a reinitialize command for ufw that I had missed.

Thanks for your help :smiley: