Bug 1221170

Summary: df utility omits folder from checking
Product: Red Hat Enterprise Linux 7 Reporter: Michael Arbet <marbet>
Component: coreutilsAssignee: Ondrej Vasik <ovasik>
Status: CLOSED DUPLICATE QA Contact: qe-baseos-daemons
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.1CC: marbet, pbrady
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-05-26 21:02:26 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
output of 'strace df -h'
none
for comparison, outputt of 'strace /nfs'
none
/proc/self/mountinfo none

Description Michael Arbet 2015-05-13 12:17:15 UTC
Created attachment 1025039 [details]
output of 'strace df -h'

Description of problem:

df utility omits folder from checking and output.
strace proved that /nfs folder even if presented in /etc/mtab file is not checked for its status thus no output regarding this folder appears. When you run 'df /nfs' the folder is properly checked.

Please see attachment with strace output; the statfs() is not called for /nfs folder

Version-Release number of selected component (if applicable):
found in RHEL 7.1

Comment 1 Michael Arbet 2015-05-13 12:19:14 UTC
Created attachment 1025040 [details]
for comparison, outputt of 'strace /nfs'

Comment 2 Michael Arbet 2015-05-13 12:21:28 UTC
this bugreport is regarding the case #01439933

Comment 4 Pádraig Brady 2015-05-13 16:19:07 UTC
Is /nfs mounted twice (overmounted), with the first causing the second to be discarded? Can you attach the output from /proc/self/mountinfo

Comment 5 Ondrej Vasik 2015-05-13 18:32:00 UTC
btw. deduplication can be supressed by using -a option.

Comment 6 Michael Arbet 2015-05-15 11:31:53 UTC
Created attachment 1025788 [details]
/proc/self/mountinfo

adding file requested from the customer

Comment 7 Pádraig Brady 2015-05-25 15:11:12 UTC
The issue here is due to incorrect deduplication.
There are two /nfs entries. Currently the device IDs for these are not passed to df, so it calls stat() to get those. Unfortunately, stat() will only get the device ID for the last mounted entry. During deduplication we only pick the first entry though.

This was already addressed upstream with:

http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=v8.22-108-g25a2c94
http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=v8.22-121-g4f8d74e
http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=v8.23-10-ged1a495

Probably best if not rebasing is to produce a single patch rolled up from the above 3

Comment 8 Ondrej Vasik 2015-05-26 21:02:26 UTC
Thanks Pádraig! There is already bz about df deduplication for NFS, #1100026 . I plan to get single patch from these commits, probably one or two more makes sense - e.g. http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=097897bd2c9de5723af24b3848d6d922a862064b

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