Clients access files on the server by first mounting a server’s exported directories. When a client mounts a directory, it does not make a copy of that directory. Rather, the mounting process uses a series of remote procedure calls to enable a client to access the directories on the server transparently.
There are three types of NFS mounts: Predefined, explicit, and automatic.
– Predefined mounts are specified in the /etc/filesystems file.
– Explicit mounts serve the needs of the root user. Explicit mounts are usually done for short periods of time when there is a requirement for occasional unplanned mounts. Explicit mounts can also be used if a mount is required for special tasks, and that mount should not be generally available on the NFS client. These mounts are usually fully qualified on the command line by using the mount command with all the needed information. Explicit mounts do not require updating the /etc/filesystems file. File systems mounted explicitly remain mounted unless explicitly unmounted with the umount command or until the system is restarted.
– Automatic mounts are controlled by the automount command, which causes the AutoFS kernel extension to monitor specified directories for activity. If a program or user attempts to access a directory that is not currently mounted, then AutoFS intercepts the request, arranges for the mount of the file system, and then services the request.
1. Show what is being exported on the source server:
# showmount -e
Note: If the command above does not show the correct mount points that needs to be exported. You can run the following command to attempt to export the filesystems.
# exportfs -a
2. To unmount the filesystem on the source server that is being NFS on other systems.
a) unmount the NFS mount points on the target server:
# umount (filesystems) ### on target servers
b) umount the filesystem on the source server once the target servers are unmounted.
# umount (filesystems)
3. Mounting NFS mount points on target server.
# mount (IP):(mount point) (mount point)
Getting the Current Status of the NFS Daemons
You can get the current status of the NFS daemons individually or all at once. To get the current status of the NFS daemons individually, enter:
# lssrc -s daemon
where daemon is any one of the SRC controlled daemons. For example, to get the current status of the rpc.lockd daemon, enter:
# lssrc -s rpc.lockd
To get the current status of all NFS daemons at once, enter:
# lssrc -g nfs