You are on page 1of 2

NETWORK FILE SYSTEM (NFS)

- Avinash Dattatraya Jadhao - College of Engineering, Pune - avinashdjadhao.coep@gmail.com

What is file system ?


A file system is the method for storing and organizing computer files and their data. It organizes these files into a database for the storage, organization, manipulation, and retrieval by the computer's operating system. A file system can be used to organize and represent access to any data, whether it is stored or dynamically generated.

What is thin client ?


A thin client (sometimes also called a lean or slim client) is a computer or a computer program which depends heavily on some other computer (its server) to fulfill its traditional computational roles.

What is Network File System (NFS)?


NFS allows the system to share various files and directories with each other over the network. NFS is a client/server environment. Thin clients have no hard drives and thus need a virtual hard-disk. The NFS mount their hard disk from the server and, while the user thinks they are saving their documents to their local (thin client) disk, they are in fact saving them to the server. In a thin client environment, the root, usr and home partitions are all offered to the client from the server via NFS. In NFS, commonly used data can be stored on a single machine and still remain accessible to others over the network.

Install NFS Server in Ubuntu (At the server side) :


Open the terminal and enter the following command to install the NFS server. sudo apt-get install nfs-kernel-server

NFS Server Configuration (At the server side):


NFS exports from a server are controlled by the file /etc/exports. Each line begins with the absolute path of a directory to be exported, followed by a space-seperated list of allowed clients. We need to edit this exports file. So open the exports file using the following command. sudo vi /etc/exports ExSuppose the server ip address is 10.200.53.122 and client ip address is 10.200.53.130 . And suppose you want to export the directory /avinash of the server to the client, then add the following line to /etc/exports (at the server side). i.e. /avinash /avinash 10.200.53.130(rw,sync) <client_machine>(rw,sync)

For Full Read Write Permissions allowing any computer from 192.168.1.1 through 192.168.1.255 /avinash 192.168.1.1/24(rw,no_root_squash,async) or /avinash 192.168.1.*(rw,no_root_squash,async)

save this file and exit. A client can be specified either by name or IP address. A client specification may be followed by a set of options, in parenthesis. It is important not to leave any space between the last client specification character and the opening parenthesis, since spaces are intrepreted as client seperators. Now, we need to start the NFS server using the following command. sudo /etc/init.d/nfs-kernel-server start

Install NFS client support in Ubuntu (At the client side):


Install the nfs-common using the following command. sudo apt-get install nfs-common Mounting manually : Example to mount server.mydomain.com:/avinash to /avinash. In this example server.mydomain.com is the name of the server containing the nfs share, and avinash is the name of the share on the nfs server. The mount point /avinash must first exist on the client machine.There should be no files or subdirectories in the /avinash directory. Create avinash directory using the following command sudo mkdir /avinash You need to mount the share using the following command sudo mount server.mydomain.com:/avinash /avinash i.e i.e sudo mount <server_machine>:/avinash /avinash sudo mount 10.200.53.122:/avinash /avinash

Now we need to restart the services the using the following the command. sudo /etc/init.d/nfs-common restart Mounting at boot using /etc/fstab : An alternate way to mount an NFS share from another machine is to add a line to the /etc/fstab file. The line must state the hostname of the NFS server, the directory on the server being exported, and the directory on the local machine where the NFS share is to be mounted. The general syntax for the line in /etc/fstab file is as follows: example.hostname.com:/avinash /avinash nfs rsize=8192,wsize=8192,timeo=14,intr i.e 10.200.53.122:/avinash /avinash nfs rsize=8192,wsize=8192,timeo=14,intr i.e <server_machine>:/avinash /avinash nfs rsize=8192,wsize=8192,timeo=14,intr

References :
https://help.ubuntu.com/6.06/ubuntu/serverguide/C/network-file-system.html http://www.ubuntugeek.com/nfs-server-and-client-configuration-in-ubuntu.html http://en.wikipedia.org/wiki/File_system http://en.wikipedia.org/wiki/Thin_client

You might also like