Bug 1152615
Summary: | df incorrectly reports free space when filesystem is double-mounted | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Byron S <bsorgdrager> | ||||
Component: | coreutils | Assignee: | Kamil Dudka <kdudka> | ||||
Status: | CLOSED WONTFIX | QA Contact: | Branislav Blaškovič <bblaskov> | ||||
Severity: | low | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 6.5 | CC: | agk, bblaskov, kdudka | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | x86_64 | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2016-07-29 13:17:42 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
Byron S
2014-10-14 14:13:20 UTC
There are changes in upstream and RHEL7 to deal with this. The behavior should be to show the last device mounted at a particular point, and previous devices are not accessible to the user (nor to df to get the stats) Created attachment 1115059 [details]
[PATCH] deal better with over-mount devices
I have backported 5 upstream commits to address this issue. It was non-trivial to isolate the code from the mount entry de-duplication feature, which we probably do not want to introduce in RHEL-6 at this point. A quick demo follows:
# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/vda1 16381864 10641408 4901648 69% /
/dev/vdb1 1968368 35756 1832620 2% /boot
# mount /dev/vdb2 /boot
# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/vda1 16381864 10641408 4901648 69% /
/dev/vdb1 - - - - /boot
/dev/vdb2 7743112 17592 7325524 1% /boot
# df /boot
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/vdb2 7743112 17592 7325524 1% /boot
# df /dev/vdb1
df: cannot access `/dev/vdb1': over-mounted by another device
df: no file systems processed
# df /dev/vdb2
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/vdb2 7743112 17592 7325524 1% /boot
# df -a
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/vda1 16381864 10641408 4901648 69% /
proc 0 0 0 - /proc
sysfs 0 0 0 - /sys
devpts 0 0 0 - /dev/pts
/dev/vdb1 - - - - /boot
/dev/vdb2 7743112 17592 7325524 1% /boot
The related upstream test could not be picked because it does not work with the legacy /etc/mtab file containing source files instead of /dev/loop* in case of loopback mounts.
A review would be appreciated...
Makes sense, thanks for the patch. Looks sane to me... I agree with not doing deduplication effort on RHEL 6 - it is required in the case of huge amount of duplicates - when /proc/mounts is symlink to /etc/mtab - on RHEL 6 it would only cause change in behaviour and confusion. Patch looks good, thank you! Per bug #1325347 comment #14, closing WONTFIX. |