This file outlines the steps to configure NFS in a Network.
All the nodes must be ina same network and should be able to ping each other. It is suggested to configure Open SSH aswell.
-
Install nfs-server in the head node.
sudo apt update sudo apt-get install nfs-server -
Establish a shared directory on the head node and modify the '/etc/exports' file to grant permission to all client nodes to access the '/nfs' directory.
mkdir /nfs sudo nano /etc/exports # add the following line inside /etc/exports /nfs *(rw,sync) -
Restart nfs-kernel-server
sudo systemctl nfs-kernel-server restart -
Changing the ownership of '/nfs' from root to user
sudo chown #username /nfs -
Check the ownership of the file to be sure
ls -ld /nfs
-
Install nfs-client in the client node
sudo apt update sudo apt-get install nfs-client -
Create a similar shared directory '/nfs' as headnode
mkdir /nfs -
Navigate to the '/etc/fstab' file and add the file system to be mounted on the client node.
sudo nano /etc/fstab #add the following line to mount /nfs headnode_username:/nfs /nfs nfs -
Restart daemon if necessary
sudo systemctl daemon-reload -
Mount all file partitions.
sudo mount -a
After following the steps provided above, users will be able to configure NFS on their cluster computers. After configuring NFS, the resource management system should be set up to handle processes.