NFS Access/Mount

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Quizzer
Posts: 24
Joined: Tue Jul 03, 2018 1:15 am

NFS Access/Mount

Post by Quizzer »

Hi, recently installed DietPi onto my Rasp Pi 2. All is well. Thought it would be a good little low power device to use for an Emby server. (I don't need transcoding and I don't server to more than 1 client at a time).

I have a Synology NAS with NFS setup. Kodi (installed on an Odroid C2) successfully accesses the NFS shares at: nfs://192.168.0.11/volume1/video/Movies

So I installed Emby, and when attempting to add source folders I obviously couldn't reach my server.

I Installled NFS Client, however when accessing it to input my server IP (192.18.0.11) it fails to connect:

Code: Select all

──────────────┤ DietPi-Config ├───────────────────────────────────────────────────┐
     │ Samba client : Unable to connect and/or incorrect details                                                            │ 
     │ FTP client   : Not Installed                                                                                         │ 
     │[b] NFS client   : Unable to connect and/or incorrect details      [/b]                                                      │ 
     │ NoIp status  : Not Installed                                                                                         │ 
     │ Apt mirror   : http://raspbian.raspberrypi.org/raspbian                                                              │ 
     │ NTPD mirror  : debian.pool.ntp.org                                                                                   │ 
     │                                              
I had a search and it appears some people are editing /etc/fstab (e.g. viewtopic.php?t=791) but when attempting to run edit /etc/fstab I get:

Code: Select all

Warning: unknown mime-type for "/etc/fstab" -- using "application/octet-stream"
Error: no "edit" mailcap rules found for type "application/octet-stream"
I'm not the best with Linux commands, but willing to learn - so any pointers or links to guides would be great. Thanks.
User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Re: NFS Access/Mount

Post by johnvick »

I have similar setup with QNAP NAS, Kodi on Odroid C2 (LibreELEC) and Emby server on a Z83 running DietPi.

In /etc/fstab on the Z83 I have the QNAP shares mounted as follows:

192.168.1.4:/Multimedia/Movies /mnt/Movies nfs rsize=8192,wsize=8192,timeo=14,intr,nofail,noauto,x-systemd.automount 0 0

I have the Kodi-Emby plugin installed on the C2.

Sounds like NFS isn't working on your Pi? Have you tried a manual install of NFS client? And how are you trying to edit /etc/fstab?

John
Quizzer
Posts: 24
Joined: Tue Jul 03, 2018 1:15 am

Re: NFS Access/Mount

Post by Quizzer »

I have the Kodi-Emby plugin installed on the C2.
I want the same on my C2 (well I already have it, but the Emby server is just a test one installed on my MacBook). And I also want MRMC pointing to Emby on an Apple TV 4 (the wife loves the ATV UI, the remote and the fact it has all the other services (Netflix, iTunes Movies etc.) on one box so she doesn't have to mess about changing inputs, changing Harmony settings etc.). The ATV in the lounge and the C2 in my mancave.

Curently I just use MRMC on the ATV and LibreELEC/Kodi on the C2, and manually update watched stauses between clients by running a library update which in turn triggers a Trakt sync.
Sounds like NFS isn't working on your Pi? Have you tried a manual install of NFS client?
Maybe, I just installed it through the "Optimized Software" GUI option.

I haven't installed NFS Client manually. Not sure how to go about it. I'll have a search. I'm guessing I have to uninstall the current version first?
And how are you trying to edit /etc/fstab?
Sorry was a bit burried in my original post. I log in via SSH and then run:

Code: Select all

edit /etc/fstab
The output I get is:

"Warning: unknown mime-type for "/etc/fstab" -- using "application/octet-stream"
Error: no "edit" mailcap rules found for type "application/octet-stream""

I tried searching for a solution and it appeared the problem was the lack of a text editor? I tried installing VI, but it failed and that's when I decided to post on here for help, ha.
Quizzer
Posts: 24
Joined: Tue Jul 03, 2018 1:15 am

Re: NFS Access/Mount

Post by Quizzer »

Code: Select all

nano /etc/fstab
Was what I was after. Going to tinker now.

This was a useful link if anyone stumbles across this thread:

https://www.htpcguides.com/configure-nf ... pberry-pi/
Quizzer
Posts: 24
Joined: Tue Jul 03, 2018 1:15 am

Re: NFS Access/Mount

Post by Quizzer »

So my fstab looked like this:

Code: Select all

192.168.0.11:/ /mnt/nfs_client nfs4 auto,_netdev 0  0
I tried removing the 4:

Code: Select all

192.168.0.11:/ /mnt/nfs_client nfs auto,_netdev 0  0
Rebooted, still no luck.

Tried a modified version of johnvick’s line:

Code: Select all

192.168.0.11:/volume1/video /mnt/nfs_client nfs rsize=8192,wsize=8192,timeo=14,intr,nofail,noauto,x-systemd.automount 0 0
and

Code: Select all

192.168.0.11:/ /mnt/nfs_client nfs rsize=8192,wsize=8192,timeo=14,intr,nofail,noauto,x-systemd.automount 0 0
But no luck. Emby can’t find the share.


Also when I go into dietpi-config -> 8 Network Options: NAS/Misc -> NFS Client:

I enter my IP address and OK, it attempts to mount but then displays an error message very quickly. I can only catch something like "mount error 13". But there is more text that disappears too quickly.
Quizzer
Posts: 24
Joined: Tue Jul 03, 2018 1:15 am

Re: NFS Access/Mount

Post by Quizzer »

I know I'm just talking to myself now. But the following works, may have been a reboot that fixed it, not sure:

Code: Select all

192.168.0.11:/volume1/video /mnt/nfs_client nfs rsize=8192,wsize=8192,timeo=14,intr,nofail,noauto,x-systemd.automount 0 0
Can browse to /mnt/nfs_client and all my nfs folders are there.

Got there in the end. 8)
User avatar
MichaIng
Site Admin
Posts: 2295
Joined: Sat Nov 18, 2017 6:21 pm

Re: NFS Access/Mount

Post by MichaIng »

Thanks for letting us know. I don't know much about NFS, but maybe the path to /volume1/video is needed due to NFS permissions restricted to that? Not sure about the other fstab options, but will check out. Maybe we can tweak these a bid and/or do some better checks for debugging within NFS mount attempts.
Quizzer
Posts: 24
Joined: Tue Jul 03, 2018 1:15 am

Re: NFS Access/Mount

Post by Quizzer »

but maybe the path to /volume1/video is needed due to NFS permissions restricted to that?
It's possible. I'd have to check.
Maybe we can tweak these a bid and/or do some better checks for debugging within NFS mount attempts.
Yeah would help no doubt. I think the main pain points were:

1. NFS Client defaults to nsf4 without any indication - maybe some sort of option/checkbox to enable disable nfs4 over nfs.
2. There's a message with an error code that flashes up very very quickly when attempting to mount via NFS Client. I'm sure there's a way of obtaining it, but I don't know how. Maybe allowing that error to persist until a keypress would be useful.
User avatar
MichaIng
Site Admin
Posts: 2295
Joined: Sat Nov 18, 2017 6:21 pm

Re: NFS Access/Mount

Post by MichaIng »

Btw. Network drive mounting with v6.10 is fully integrated into dietpi-drive_manager, which got some huge rework with v6.10 (release yesterday). Would be great to check, if this now works or the error stays the same.
Quizzer
Posts: 24
Joined: Tue Jul 03, 2018 1:15 am

Re: NFS Access/Mount

Post by Quizzer »

Haha. I can only laugh.

So... I get home from work and my Emby server had fully synced up and downloaded all metadata etc. Odroid with LibreElec and my Apple TV with MRMC can access it. All good.

I'd installed DietPi on my backup/test mSD card. So I thought I'd install it on my faster, larger mSD to squeeze out more performance. Install goes well.

First issue:

Code: Select all

dietpi-config -> 8 Network Options: NAS/Misc
No longer exists. I can't find any NAS/nfs options. I'm glad you mentioned it's been reworked I thought I was going mad. I guess more tinkering now to find the new locations for nfs options.
Post Reply