Saturday, January 26, 2013

NFS setup on NAS

How to setup NFS on NAS machine




Part I - setup static IP address for NAS machine

Go to Management->Network Management->LAN Settings:


Click on Setup button:


Setup Static IP address for NAS:




Part II - setup NFS on server (NAS)

Go to Management->Application Management->NFS Service and enable NFS service:


Then go to Management->Account Management->Network Shares:


Click on button New (in order to create new shared folder):


Select the folder that you want to share:


Define whether All Accounts will have the same permissions or you will define different permissions for particular users/groups:


Specify permissions for users:


Specify permissions for groups:


Define additional features for that share:

* Oplocks - Windows Lan Manager network feature for locking
* Map Archive - Archive flag (used for some backup tools) will be set for files that you put on this share
* Recycle - creates Recycle Bin in share folder for deleted files


Define what network sharing services will be used for accessing our shared folder:

* CIFS (SMB) - Windows services for accessing networked share (enabled by default)
* AFP - Apple's service for accessing networked share (enabled by default)
* FTP - File transport protocol
* NFS - Network File Service (sharing)
* WebDAV - network sharing through HTTP


If you selected FTP before - you have to define how FTP anonymous will access:


If you selected NFS before - you have to define how share will be accessed through NFS:

* Host - define from which host NFS shared folder can be accessed - put * for all hosts
* Root Squash - default NFS server behavior is to prevent root on client machines from having privileged access to exported files. Server do this by mapping the "root" user to some unprivileged user (usually the user "nobody") on the server side - this is known as root squashing. NAS provides an export option to disable this behavior and allow root on selected clients to enjoy full root privileges on exported file systems.


If you selected WebDAV before - you have to define writing privileges for it:


Summary of settings:




Part III - setup NFS on client (user machine)

In order to be able to access NFS shared folder one should have NFS support on his/her user machine.

$ sudo apt-get install nfs-common
Create mapping folder:

$ sudo mkdir /media/nas
Add the following into /etc/fstab file:

192.168.1.32:/mnt/HD/HD_a2/BOOKS /media/nas nfs rw,hard,intr 0 0
192.168.1.32 - static IP address of NAS machine where shared folder resides
/mnt/HD/HD_a2/BOOK - absolute path to shared folder (Volume_1/BOOKS)
/media/nas - is empty mapping folder (created just before for mapping shared folder)
nfs - access method (networking service)
rw - read/write privilege (ro for read only)

Then mount NFS shared folder from your client machine:

$ sudo mount -a
$ ls /media/nas
That's it folks.

No comments:

Post a Comment