Setup NFS to smoothly share 1080p movies over Wireless
NFS is the traditional lightweight and superfast file sharing solution on mainly Nix and BSD distros. Due to small protocol overhead, NFS is one of the fastest ways of sharing files over local networks (See NFS vs SMF vs FTP vs SSH speed benchmark). So if you want to share those 1080p movies over home network to your HTPC without any stuttering, NFS can be the best choice.
So how to setup FreeNAS7 with NFS share? The first thing is WebGUI for FreeNAS7 is buggy for NFS service. So, have your SSH connection to FreeNAS ready.
Step1: Enable NFS through WebGUI
- Services > NFS > Shares > [+]
- Path: path to your movie directory on the server
- Map all users to root: if you want to give write access select yes
- Authorised network: Subclass C of your network e.g. 192.168.1.1/24
- Press Add.
- Apply changes and wait for NFS service to start.
Step2: Modification through SSH
- SSH to FreeNAS7
- Change user to root (su)
- Edit /etc/exports (e.g. vi /etc/exports)
- If you have multiple directories on one mounting point that you want to share on the same network, make sure to add them all in one line. e.g. /mnt/disk1/music /mnt/disk1/video
- Remove mask and network part and add the client IP address that you want to have access from. e.g. 192.168.1.2
- Optional add -mapall=YOURUSERNAME to give write access to share directory.
- You config file should look like:
/mnt/disk1/music /mnt/disk1/video -mapall=pi3ch 192.168.1.2
- Restart NFS service: kill -HUP `cat /var/run/mountd.pid`
Step3: Check and mount share directories
On the client host run
showmount -e FREENASIP
if you can see the share directories congrat! if not, have look at the logs (WebGUI > Diagnostics > Log)
To mount a NFS share on the client host run (as a root)
mount FREENASIP:FULLPATHTODIR MOUNTPOINT e.g. mount 192.168.1.1:/mnt/disk1/music musicEnjoy the speed of NFS!