nerdexam
Red_Hat

RH302 · Question #163

Some users' home directories are configured to be shared from your system via NFS. However, running showmount -e localhost does not display the shared directory. Ensure the shared users' home…

If showmount -e localhost does not display NFS exports, it typically indicates that the NFS server is not running correctly or its configuration (/etc/exports) is not loaded. 1. Verify the NFS export configuration: Check the /etc/exports file to ensure the home directories are…

Troubleshooting

Question

Some users' home directories are configured to be shared from your system via NFS. However, running showmount -e localhost does not display the shared directory. Ensure the shared users' home directory is accessible through NFS exports.

Explanation

If showmount -e localhost does not display NFS exports, it typically indicates that the NFS server is not running correctly or its configuration (/etc/exports) is not loaded.

  1. Verify the NFS export configuration: Check the /etc/exports file to ensure the home directories are correctly listed for sharing. cat /etc/exports (Example entry: /home/users *(rw,sync,no_root_squash))
  2. Start the nfs service: service nfs start (On newer systems, this might be systemctl start nfs-server)
  3. Start the portmap service: NFS relies on portmap (or rpcbind on newer systems) to register its services. service portmap start (On newer systems, this might be systemctl start rpcbind)
  4. Enable nfs service to start automatically on boot: chkconfig nfs on (On newer systems: systemctl enable nfs-server)
  5. Enable portmap service to start automatically on boot: chkconfig portmap on (On newer systems: systemctl enable rpcbind)
  6. Check firewall status: Ensure that the firewall (iptables or firewalld) is not blocking NFS traffic (ports 111, 2049, and others). service iptables status (or firewall-cmd --list-all) If the firewall is active and blocking, you may need to temporarily stop it for testing or configure it to allow NFS services: # service iptables stop # chkconfig iptables off (Use with caution in production environments; better to configure specific rules).
  7. Reload NFS exports: If you only modified /etc/exports, you can try exportfs -ra to reload the configuration without restarting the service.
  8. Verify the NFS exports again: showmount -e localhost You can also try mounting from a client machine to confirm accessibility.

Topics

#NFS exports#etc/exports#showmount#NFS troubleshooting

Community Discussion

No community discussion yet for this question.

Full RH302 Practice