Connect to NFS share
From NMTWiki
Jump to: navigation, search
Image:Yellowvsmall.jpg Medium difficulty requiring some technical skills, or some parts require more than basic knowledge.
This is a guide for mounting an NFS share on a Ubuntu/Debian Linux PC from an NMT device. It may work similar on other Linux distros too.
Procedure
If you don't have it installed already, open a terminal and download/install the NFS package. (You may use a package manager like Synaptic, Yum etc. too)
sudo apt-get install nfs-kernel-server
Next, we need to edit which folders we want to export to the network.
Open your exports file with your favorite editor: vim, nano, gedit etc:
nano /etc/exports
Edit which IP's you want to share which folders to.
E.g. if your NMT has the ip '192.168.0.100' and you want to share the folder '/mnt/movies' and '/home/user/pictures' with read only permissions do:
/mnt/movies 192.168.0.100(ro,sync,no_subtree_check)
/home/user/pictures 192.168.0.100(ro,sync,no_subtree_check)
If you want read/write access and want to share the folders to all computers on your network, do
/mnt/movies 192.168.0.0/24(rw,sync,no_subtree_check)
/home/user/pictures 192.168.0.0/24(rw,sync,no_subtree_check)
Remember to update the exports or restart the server:
exportfs -r
sudo /etc/init.d/nfs-kernel-server restart
If you have all your harddisks mounted to a single point you need to add options to the exports file.
E.g. if you have a structure like this:
/media <- sda
/media/xvid <- sdb
/media/x264 <- sdc
Then your exports file should contain this:
/media 192.168.0.100(ro,sync,no_subtree_check,fsid=0)
/media/xvid 192.168.0.100(ro,sync,no_subtree_check,nohide)
/media/x264 192.168.0.100(ro,sync,no_subtree_check,nohide)
Finally, simply add /media to the network shares on your NMT, and you can browse all harddisks through a single share.
This is very useful if you want to make a Jukebox with YAMJ and want to get the faster streaming from NFS.