Pages

Showing posts with label NFS. Show all posts
Showing posts with label NFS. Show all posts

1. Setting Up the NFS on the Computer Cluster

I have 3 machines, each of which has Ubuntu 12.04 32bit installed. I have named my machine as node0, node1, node2.

Note:  If you want to rename your machines in edit the /etc/hostname file:
madhawa@node0:~$ sudo nano /etc/hosts
and replace the current machine name with your preferred name.

So let's start the setting up.

1. Define the host names by editing the /etc/hosts file:


madhawa@node0:~$ sudo nano /etc/hosts

and put the following. Note that I have removed the line 127.0.1.1 node0

127.0.0.1 localhost

10.16.32.10 node0
10.16.32.11 node1
10.16.32.12 node2

2. Install NFS server on the master node. I take the node0 as the master.

madhawa@node0:~$ sudo apt-get install nfs-kernel-server

3. Make a new directory that is to be shared among all the nodes. My shared folder is /mirror. In order to share the edit the /etc/exports file:

madhawa@node0:~$ mkdir /mirror
madhawa@node0:~$ sudo nano /etc/exports

And put the following line to set the permissions for the nfs. 

/mirror *(rw,sync)

4. Restart the server 

madhawa@node0:~$ sudo service nfs-kernel-server restart

5. Install the NFS client programs on the other machines.

madhawa@node1:~$ sudo apt-get install nfs-common

6. Mount the shared folder on the other nodes.

madhawa@node1:~$ sudo mount node0:/mirror /mirror
madhawa@node2:~$ sudo mount node0:/mirror /mirror

Note: This is the folder that is used to put the shared files required for the distributed execution. NFS enables remote mount and access to the files in another machine.