A system administrator is tasked with configuring a RHEL 9 system to automatically mount an NFS share from 192.168.1.10:/export/data on /mnt/data at boot. Which entry in /etc/fstab is correct?
Trap 1: 192.168.1.10 /export/data /mnt/data nfs4 defaults 0 0
This line erroneously splits the remote source into two whitespace-delimited fields: the server IP (192.168.1.10) and the export path (/export/data). In /etc/fstab, an NFS mount must place the server and path together in a single fs_spec field separated by a colon, e.g., 192.168.1.10:/export/data. As written, the parser treats /export/data as the mount point and /mnt/data as an extra field, causing the mount to fail because there is no valid NFS source token.
Trap 2: /mnt/data 192.168.1.10:/export/data nfs4 defaults 0 0
This entry reverses the required column order. The first field in fstab must be the remote source (server:/export/data), and the second field must be the local mount point (/mnt/data). Here /mnt/data is placed in the fs_spec position and 192.168.1.10:/export/data in the fs_file position, which would make mount try to attach a local device named /mnt/data at a mount point named 192.168.1.10:/export/data—neither of which exists.
Trap 3: 192.168.1.10:/export/data /mnt/data nfs defaults 0 0
The only deviation from the correct entry is the file system type nfs instead of nfs4. While nfs is a recognized fstab type, it permits negotiated NFS version selection, which can cause the client to fall back to NFSv3 depending on server settings or mount options. Since the task explicitly requires configuring an NFSv4 mount, nfs4 must be used to guarantee the v4 protocol; nfs is therefore incorrect because it does not pin the NFS version as required.
- A
192.168.1.10 /export/data /mnt/data nfs4 defaults 0 0
Why it fails: This line erroneously splits the remote source into two whitespace-delimited fields: the server IP (192.168.1.10) and the export path (/export/data). In /etc/fstab, an NFS mount must place the server and path together in a single fs_spec field separated by a colon, e.g., 192.168.1.10:/export/data. As written, the parser treats /export/data as the mount point and /mnt/data as an extra field, causing the mount to fail because there is no valid NFS source token.
- B
/mnt/data 192.168.1.10:/export/data nfs4 defaults 0 0
Why it fails: This entry reverses the required column order. The first field in fstab must be the remote source (server:/export/data), and the second field must be the local mount point (/mnt/data). Here /mnt/data is placed in the fs_spec position and 192.168.1.10:/export/data in the fs_file position, which would make mount try to attach a local device named /mnt/data at a mount point named 192.168.1.10:/export/data—neither of which exists.
- C
192.168.1.10:/export/data /mnt/data nfs4 defaults 0 0
This entry has the correct fstab grammar for an NFSv4 mount: the source and exported path form one colon-delimited token, 192.168.1.10:/export/data, followed by the local mount point /mnt/data, the file system type nfs4, and mount options defaults. The trailing 0 0 disable dump backups and fsck on this network file system, both of which are appropriate for NFS. Explicitly using nfs4 forces the NFSv4 protocol rather than leaving version negotiation to the generic nfs type.
- D
192.168.1.10:/export/data /mnt/data nfs defaults 0 0
Why it fails: The only deviation from the correct entry is the file system type nfs instead of nfs4. While nfs is a recognized fstab type, it permits negotiated NFS version selection, which can cause the client to fall back to NFSv3 depending on server settings or mount options. Since the task explicitly requires configuring an NFSv4 mount, nfs4 must be used to guarantee the v4 protocol; nfs is therefore incorrect because it does not pin the NFS version as required.