Trying to configure NFS Server according to wiki but no success

hello :slight_smile:
I’m following a guide from Wiki: File sharing with a NAS, media server, windows share or other device - General - OSMC
What I want to achieve is share data from OSMC Raspberry 3 to device inside my local network - which is Kodi on TV
First step is to setup server - OSMC as a server
so I edit /etc/fstab to include UUID:

UUID=6ab084a2-bfdd-4ad6-80ff-xxxxxxxxxxx /mnt/mySharedDrive ext4 defaults,noatime,nofail,x-systemd.mount-timeout=30 0 0

then mount: sudo mount -a
then edit /etc/exports to include the path:
/mnt/mySharedDrive 192.168.100.0/24(async,no_subtree_check)

then run: sudo exportfs -a

no errors, everything smooth so far

when I list content of /mnt/mySharedDrive I get everything from root directory / :

osmc@osmc:~$ ls /mnt/mySharedDrive
bin dev home lib64 media opt root sbin srv tmp var
boot etc lib lost+found mnt proc run selinux sys usr walkthrough_completed

so I assume setup is done

the data I want to access is inside my home directory, so: /mnt/mySharedDrive/home/osmc/Movies/
at this point I’m not sure if I should just export /home/osmc/Movies instead of /mnt/myShared....

anyways then the client part

when adding a video source from GUI:
Videos → Files → Add videos → Browse → Network File System (NFS)
I put here: nfs://192.168.100.55/mnt/mySharedDrive/home/osmc/Movies/
and I’m presented with info that directory info cannot be retrievied


and later when I accept anyways and try to open that it cannot connect to server:

what do I do wrong here?
when I run the showmount command I can see something connected

osmc@osmc:~$ showmount -a
All mount points on osmc:
192.168.100.27:/mnt/mySharedDrive

You mounted the SD that was already mounted and then setup a share for that? Why didn’t you just make the share point to you home folder directly?

Also…

Did you have a mix-up with the ip addresses?

yeah I followed blindly the guide not thinking what I’m doing
and right now something is really off
initially I mounted my SD drive to /home/osmc/Movies directory

so when I list my Movies dir I have the root content:

osmc@osmc:/$ ls /home/osmc/Movies
bin   dev  home  lib64       media  opt   root  sbin     srv  tmp  var
boot  etc  lib   lost+found  mnt    proc  run   selinux  sys  usr  walkthrough_completed

so to get to the Movies dir I have to go this path:

osmc@osmc:/$ ls /home/osmc/Movies/home/osmc/Movies

Jesus please help me sort this out first

:rofl:

Upload some logs so we can gain some more insight into what you’ve done please.

I think what I did was I added to /etc/fstab

UUID=6ab084a2-bfdd-4ad6-80ff-xxxxxxxxxxx /home/osmc/Movies/ ext4 defaults,noatime,nofail,x-systemd.mount-timeout=30 0 0

and then sudo mount -a

to get the logs I need to connect OSMC Raspberry to display, it’s gonna take some time

No, if your at the terminal you just type “grab-logs -A” and hit enter and it will spit back a url. I’d venture a guess that you just need to remove everything you added to fstab, reboot, and then just point the exports to the home folder instead of mnt.

or even easier just use SMB by installing samba server from the My OSMC add-on. The home folder is shared by default.

1 Like