Bug 1052369

Summary: df does not show all mounted partitions
Product: [Fedora] Fedora Reporter: tgxqojko
Component: coreutilsAssignee: Ondrej Vasik <ovasik>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 20CC: admiller, kdudka, kzak, ooprala, ovasik, p, tgxqojko, twaugh
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-15 07:13:56 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
strace df
none
strace df -a none

Description tgxqojko 2014-01-13 17:36:06 UTC
Description of problem:
The df command does not show all mounted partitions

Version-Release number of selected component (if applicable):
8.21

How reproducible:
Always

Steps to Reproduce:
1. On command line give the df command
2. Observe the result
3.

Actual results:
Not all mounted partitions are shown

Expected results:
Information of all mounted partitions

Additional info:

In fstab I have two nfs mounts defined 
<host>:/mnt/raid/media	/mnt/media		nfs	defaults			    0 0
<host>:/mnt/raid/backup	/mnt/backup		nfs	defaults			    0 0

At boot these both get mounted, but only the first one shows up in the output provided by df. The mount command provides information for both nfs mounts. If I manually umount it and then mount it again it will also show up in df.

Comment 1 Ondrej Vasik 2014-01-14 09:40:22 UTC
Due to the change in the /etc/mtab (instead of simple tab of mounted partitions it is now symlink to /proc/mounts), there is a lot of duplicates in this tab. Therefore, df is trying to reduce the duplicates based on some mechanism - you can get all of the mountpoints using df -a .
Can you please check: 1) Do they appear in df -a?
                      2) Provide strace of both df -a and df , if the mountpoint is available in df -a ?

TIA.

Comment 2 tgxqojko 2014-01-14 11:15:05 UTC
Created attachment 849888 [details]
strace df

Comment 3 tgxqojko 2014-01-14 11:15:44 UTC
Created attachment 849889 [details]
strace df -a

Comment 4 tgxqojko 2014-01-14 11:16:58 UTC
1) both appear with df -a
2) attached strace output

Comment 5 Ondrej Vasik 2014-01-15 07:13:56 UTC
Thanks, based on the same 1K-blocks size for both mounts, it looks like they have the same device id, right? This is probably the reason for filtering.
I'll close it as duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=920806 - as the issue is already there and you are hitting the same issue. The best way would probably be not suppressing duplicates for remote filesystems. It is on our todo list, but will take some time.

*** This bug has been marked as a duplicate of bug 920806 ***