NFS mounts fail during boot

This document (000020614) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 12
SUSE Linux Enterprise Server 15

Situation

A Linux system under control of systemd has some NFS mounts specified in /etc/fstab but they are not getting mounted during boot.

Resolution

Enable nfs.service with this command:

systemctl enable nfs.service

Upon the next reboot, chances are that the nfs mount will succeed.

Of course, other reasons for failure could exist, including improper configuration or syntax for the NFS Server machine's export or within the NFS client machine's /etc/fstab syntax.

Cause

"nfs.service" is a enhanced alias for "nfs-client.target" which helps ensure that everything needed for a successful NFS client mount is present on the system, and that systemd nfs mount units are built as needed.  Without this enabled, it is common (but not absolute) that NFS mounts may fail during boot.

Status

Top Issue

Additional Information

In some cases, even without "nfs.service" (aka nfs-client.target) enabled, NFS mounts in /etc/fstab will succeed.  This is because another systemd target, "remote-fs.target" can often accomplish NFS mounts successfully.  However, nfs.service has more thorough knowledge of what is needed to successfully mount NFS shares, and has a higher success rate.

Many cases have been seen where "remote-fs.target" would not successfully mount NFS shares, but nfs.service (nfs-client.target) would.  Administrators should enable nfs.service if there are NFS mounts listed in /etc/fstab.  Even if there are none in /etc/fstab, it may be best to enable nfs.service if other services or processes (such as autofs or manual mount commands) will be performing NFS mounts after boot.

There is no need to disable remote-fs.target.  Simply enable nfs.service as well.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000020614
  • Creation Date: 15-Mar-2022
  • Modified Date:15-Mar-2022
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback@suse.com

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.


SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center