In a closed network (where you know every device), NFS is a fine choice. With a good network, throughput it disgustingly fast and at the same time less CPU intensive on the server. It's very simple to set up and you can toggle readonly
on shares you don't need to be writeable.
I disagree with Anders. v4 can be just as simple as v3. It only gets complicated if you want to start layering on security through LDAP/gssd. It's capable of very complex and complete security mechanisms... But you don't need them. They're actually turned off by default.
sudo apt-get install nfs-kernel-server
Then edit /etc/exports
to configure your shares. Here's a line from my live version that shares my music:
/media/ned/music 192.168.0.0/255.255.255.0(ro,sync,no_subtree_check)
This shares that path with anybody on 192.168.0.* in a readonly
(notice the ro
) way.
When you've finished editing, restart NFS:
sudo /etc/init.d/nfs-kernel-server restart
To connect a client, you need the NFS gubbins (not installed by default):
sudo apt-get install nfs-common
And then add a line to /etc/fstab
192.168.0.4:/media/ned/music /media/music nfs ro,hard,intr 0 0
This is actually the NVSv3 client still because I'm lazy but it's compatible in this scenario. 192.168.0.4
is the NFS server (my desktop in this case). And you'll need to make sure the mount path (/media/music
here) exists.
For a Mac, follow this: http://www.techrepublic.com/blog/apple-in-the-enterprise/mounting-nfs-volumes-in-os-x/
It's much more simple than some older tutorials would have you believe.
It might look more complicated than it really is but it's solid, predictable and fast. Something you can't level against Samba... At least, in my experience.
/etc/fstab
set to mount, in my case, a NAS folder), but when the server reboots I'm repeatedly going throughumount
andmount -a
gyrations in the terminal to get my mount back. Mostly fine for me (except for annoyances like Picasa wiping the local DB when the network photo folder is suddenly absent :(), but this drives my wife up the wall... – Russ Jan 20 '11 at 04:00auto,_netdev
to the options fragment so it looks something like:auto,_netdev,ro,hard,intr
This should force the filesystem to wait for a network connection. – Oli Jan 20 '11 at 09:35