'df' doesn't always show all duplicate mounts

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

Environment

SUSE Linux Enterprise Server 12 Service Pack 2 (SLES 12 SP2)

Situation

The release notes for SLES 12 SP2, section 9.2.9, says (in part):
 
df no longer suppresses separate exports of the same remote device, as these are generally explicitly mounted. The --total option does still suppress duplicate remote file systems.
 
In other words, this says that for NFS mounts, df should display multiple entries if there multiple mounts, even if those mounts all come from the same remote file system export.  Such mounts would show duplicate file system information.  However, it is often still preferred to see them.
 
For the most part, this holds true.  However, a fringe case has been found where this is not true.
 
For manual mounts, fstab mounts, and most autofs mounts, it is true.  However:
 
If autofs is being used
   and if autofs is using direct mounts (instead of indirect)
      and if the remote exported directories are in a parent/child relationship
      (note that the client mount locations do not have to be in a parent/child relationship)
         and if autofs mounts the exported parent directory first, and mounts the exported child directory second
            then "df" will suppress (not list) the mount of the exported parent directory.
 

Resolution

The duplicate entries will still be shown (not suppressed) by "df -a", so that can be used as a workaround.
 
Another workaround is to add the mount option "nosharecache" to the autofs direct maps which define the mounts in question.  Note that the first option in any map should be preceded with a hyphen (-), so the entries might look as follows (the "hard" option shown below is not necessary, it is only present to show the format when multiple options are present):
 
/dir1/subdirB     -nosharecache     server1:/export/dirB
/dir1/subdirC     -nosharecache,hard     server1:/export/dirB/subdirC

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:7021324
  • Creation Date: 07-Sep-2017
  • Modified Date:03-Mar-2020
    • 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