Freebsd and nfs:// protocol
#10
(2015-04-07, 01:59)Memphiz Wrote: your problem is that the server is not configured correctly for usage with kodi. Read the nfs link in my signature (especially the stuff about connections from privileged ports)

Something very weird happened. (BTW, I'd already found your nfs wiki entry, thanks for writing it)
Anyway, I added -insecure into the /media exports line and separated out a small of section of etc/rc,conf with the new lines so I could keep track of edits.

Code:
#New for Kodi                          
mountd_flags="-n"                      
nfs_reserved_port_only="NO"            
nfs_server_flags="-u -t -n 4"          
weak_mountd_authentication="YES"

and it still didn't work on the "normal" shares, but I had made a new one, fred, nfs://192.168.1.2 into the root dir. Suddenly that started working, but only into /usr/home and /stuff, not to /media. On checking /etc/exports I found the working shares were -maproot=0 and /media, for some reason, I'd set to maproot=root.

I changed the /media export to -maproot=0. That works, via the "fred" share to root dir, but none of the others, eg nfs://192.168.1.2/tv worked.

I did another service mountd restart and service nfsd restart again (also did both after each change above as well as restarting kodi) and suddenly all the shares were working!

Out of curiosity, I commented out the lines from /etc/rc.conf listed above as #New for Kodi and again restarted the relevant services and the shares all failed. the relevant "culprit" was the mountd_flags="-n" which when added back in restored the shares.

This one certainly had me scratching my head and I was sure I'd read your wiki entry carefully. I had mountd_flags="-r" and may have mis-read that as "-n"

I've now copied over .kodi/userdata/advancedsettings.xml from a RasPi to the PC and it's happily sharing the database.

Anyway, thanks for the extra poke and making me re-read your NFS wiki entry again. Big Grin

In summary:

For nfs:// protocol shares on FreeBSD,

Install net/libnfs from ports or packages

Find and remove --disable-nfs from the /usr/posrts/multimedia/kodi/Makefile
(Line is CONFIGURE_ARGS+= --disable-debug --disable-nfs --disable-alsa --disable-pulse)

Build Kodi from ports, either portinstall -c kodi or make install clean in the ports dir.

On the NFS server
/etc/exports
Code:
/media  -maproot=0 -alldirs -network=192.168.1.0/24
/stuff  -maproot=0 -alldirs pc1 pc2 laptop laptop2 testbox 192.168.1.107 192.168.1.50
/usr/home -maproot=0 -alldirs pc1 pc2 laptop laptop2 testbox 192.168.1.107 192.168.1.50

On the PC
NFS related bits of /etc/rc.conf
Code:
nfs_server_enable="YES"
rpcbind_enable="YES"
mountd_enable="YES"
rpc_lockd_enable="YES"
rpc_statd_enable="YES"
mountd_flags="-n"

Finish off with
Code:
service mountd restart
service nfsd restart
Reply


Messages In This Thread
Freebsd and nfs:// protocol - by dave2015 - 2015-04-05, 15:42
RE: Freebsd and nfs:// protocol - by dave2015 - 2015-04-05, 16:31
RE: Freebsd and nfs:// protocol - by dave2015 - 2015-04-05, 17:28
RE: Freebsd and nfs:// protocol - by dave2015 - 2015-04-06, 16:12
Freebsd and nfs:// protocol - by Memphiz - 2015-04-07, 01:59
RE: Freebsd and nfs:// protocol - by dave2015 - 2015-04-07, 14:43
RE: Freebsd and nfs:// protocol - by Memphiz - 2015-04-07, 10:40
RE: Freebsd and nfs:// protocol - by Milhouse - 2015-04-07, 16:43
RE: Freebsd and nfs:// protocol - by dave2015 - 2015-04-07, 17:34
RE: Freebsd and nfs:// protocol - by Memphiz - 2015-04-08, 10:41
RE: Freebsd and nfs:// protocol - by dave2015 - 2015-04-12, 23:28
Logout Mark Read Team Forum Stats Members Help
Freebsd and nfs:// protocol0