Friday 19 May 2017

Network File System (NFS) Concepts

This post will discuss about the concepts involved in network file system (NFS) administration.
Prerequisites for NFS:
  1. NFS daemons should be running on both client as well as server machines.
  2. A file system should always be available on the server that has to be exported.
  3. Exported file system must be mounted on the remote client machine.
NFS daemons are not running by default on new OS installation.
To active the NFSD daemons, following command needs to be run:
# startsrc –s nfsd
To start all daemons:
# startsrc –g nfs
Can also be activated from smit by running this command,
# smit mknfs
Exporting a Directory:
There are 2 ways to export a directory:
  1. Using smit
# smit mknfsexp
It will update /etc/exports file. If the file does not exist, it will be created.
  1. Through command line
End user or admin will create (update) /etc/exports file using,
# vi /etc/exports
If it does not exists, end user will create it and then run the export command,
# exportfs –a
This command will send the information available in /etc/exports file to the kernel.
Other Options available are:
# exportfs –u </dir name>
This will remove the information from /etc/exports file
This can also be done through smit using the following command:
# smit rmnfsexp
It will remove the information from /etc/exports file
To change the data through smit, command used is:
# smit chnfsexp
Will change the information in /etc/exports file
Verification:
To verify from the remote server:
# showmount –e <localhost> OR <ip address>
To check/verify from the client side:
Using smit,
# smit mknfsmnt
Using command line,
# mount –t nfs <ip address> </dir name> /mnt
To unmount:
# umount /mnt

No comments:

Post a Comment