NFS Client & Server

NFS is probably the simplest file sharing solution for non-Windows systems – it is great for Linux to Linux shares. You can find some workarounds or third party apps which will let you mount NFS shares in Windows too but I’ll be using SAMBA for Windows shares (search this blog or look in for the SMB tag, I’ll try to remember to come back and link when I write it).
NFS Penguins!
NFS doesn’t have too many security features so don’t use it if you want to control access to your files in any more than the simplest ways – the Linux file permissioning is still applied so for example you can prevent people deleting files.

Install dependencies

apt-get -y install nfs-kernel-server nfs-common

Share from NAS

This can totally be done through the command line but I found it infinitely easier doing it really quickly with Webmin. Configure shares in Webmin->Networking->NFS Exports (module may be in the unused modules section and might need activated) when you need to set up shares. Note that enabling any nfs shares (aka ‘nfs exports’) will generate a ‘no hostname’ error in the boot sequence. This is because Ubuntu likes to warn you if you have not specified a host to share it with – not an issue if you want to share to any computers on your LAN.

Mount shares

This will mount another share from ‘servername’ to /nfs/servername on your local system.

showmount -e servername
mkdir -p /nfs/servername
mount -o soft,intr,rsize=8192,wsize=8192 /nfs/servername/
df –h

To mount persistently

nano /etc/fstab

Add: /nfs/servername/       nfs     auto,nobootwait 0       0


Useful sources

Leave a Reply

(email optional)

Warning: Undefined array key "rerror" in /home/public/blog/wp-content/plugins/wp-recaptcha/recaptcha.php on line 291