NFS Client Networking  «Prev 
Question:Is the NFS section of /etc/fstab file to access NFS shares still used in the Red Hat Operating System?
Yes, the NFS section of the /etc/fstab file is still used in Red Hat-based operating systems, such as Red Hat Enterprise Linux (RHEL) and CentOS, to mount NFS shares. The /etc/fstab file is a system configuration file that is used to define file systems and their mount points. The NFS section of the file is used to specify the options for mounting NFS shares. To mount an NFS share using the /etc/fstab file, you need to add an entry to the file for the NFS share. The entry should include the IP address or hostname of the NFS server, the path to the NFS share, the mount point on the local system, and any additional mount options such as the NFS version to use, the security options, or the access mode.
For example, the following entry in the /etc/fstab file would mount an NFS share from an NFS server with IP address, using NFS version 4, with the ro (read-only) option, and mount it to the local directory /mnt/nfs-share: /mnt/nfs-share nfs ro,nfsvers=4 0 0

After adding the entry to the /etc/fstab file, you can mount the NFS share by running the mount command with the mount point specified in the
file. For example:
mount /mnt/nfs-share

This will mount the NFS share to the local directory /mnt/nfs-share, using the options specified in the /etc/fstab file.

Sample NFS Section of /etc/fstab file

The first column gives the locations of the remote volumes to mount. homeserver holds a common home directory structure shared across the network. Similarly, the computer appserver supplies X Window System programs to the network. The last line mounts a project directory on homeserver for the user.

1) The second column gives the mount points. The directories given in this column must already exist for the volume to be mounted.

2) Each of these lines specify the mounting of NFS volumes. In this example, the filesystem type is nfs.

3) Each of these NFS volumes receives the options to both send and receive data in 1KB increments using the rsize and wsize commands.

The last two columns contain all zeroes for these NFS volumes. This basically tells Linux to let the NFS server handle its own filesystem maintenance.