| Summary: | Missing values with df command | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 6 | Reporter: | Peter Pols <peter.pols> | ||||||
| Component: | coreutils | Assignee: | Kamil Dudka <kdudka> | ||||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | qe-baseos-daemons | ||||||
| Severity: | urgent | Docs Contact: | |||||||
| Priority: | urgent | ||||||||
| Version: | 6.8 | CC: | agk, ctatman, kdudka, martin.wilck, peter.pols, samuel.miller, William.Kuzeja | ||||||
| Target Milestone: | rc | Keywords: | Regression | ||||||
| Target Release: | --- | ||||||||
| Hardware: | x86_64 | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | coreutils-8.4-43.el6 | Doc Type: | Bug Fix | ||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2016-07-13 14:50:03 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: | |||||||
| Bug Depends On: | |||||||||
| Bug Blocks: | 1214472 | ||||||||
| Attachments: |
|
||||||||
Could you please provide some steps to reproduce it and the exact version of the coreutils package? 1. Install EL6.8 x86_64 snapshot3 2. Boot 6.8 snapshot3 3. Login as root 4. Type df or df -h or .. coreutils-8.4-42.el6.x86_64 Can you please provide strace of this failing command ? Is there some specific filesystem type on these mounts? (In reply to Peter Pols from comment #3) > 1. Install EL6.8 x86_64 snapshot3 > 2. Boot 6.8 snapshot3 > 3. Login as root > 4. Type df or df -h or .. > > coreutils-8.4-42.el6.x86_64 I am not able to reproduce the problem on a fresh installation of the latest RHEL-6.8: [root@el6 ~]# rpm -q coreutils coreutils-8.4-42.el6.x86_64 [root@el6 ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_el6-lv_root 18G 2.0G 15G 13% / tmpfs 1.9G 0 1.9G 0% /dev/shm /dev/vda1 477M 75M 377M 17% /boot Could you please elaborate on the first step? How exactly do you install it? Please attach the output of "mount" on the affected system. The problem exists since 6.8beta (2.6.32-621.el6). The installation (how/exactly) is visible with the anaconda-ks.cfg (see attechment). Created attachment 1145947 [details]
6.8 beta anaconda kickstart file
Created attachment 1145949 [details]
mount command output
The problem exists on all seen primergy installations with various FS (ext3/ext4). Comment on attachment 1145949 [details] mount command output > /tmp on /tmp type none (rw,bind) > /var/tmp on /var/tmp type none (rw,bind) > /home on /home type none (rw,bind) This ^^^ is the cause. The above directories are for some reason bind-mounted to themselves. I am able to trigger the bug on my el6 machine by the following command: # mount --bind /home /home Unfortunately, the problem does not seem to be limited to bind mounts to self. The more common use of bind mounts also causes problems to df:
[root@el6 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_el6-lv_root
18G 2.0G 15G 13% /
tmpfs 1.9G 0 1.9G 0% /dev/shm
/dev/vda1 477M 75M 377M 17% /boot
[root@el6 ~]# mkdir /mnt/root
[root@el6 ~]# mount --bind / /mnt/root
[root@el6 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_el6-lv_root
- - - - /
tmpfs 1.9G 0 1.9G 0% /dev/shm
/dev/vda1 477M 75M 377M 17% /boot
The following upstream commit fixes the bug: http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commitdiff;h=ed1a495b Unfortunately, the above patch fixes only the common case (without -a). If -a is used, the output of df for bind-mounted entries still differs from rhel-6.7. In order to fix it properly, gnulib/mountlist patches are needed but they rely on /proc/self/mountinfo, which could lead to unexpected side effects. This is the first gnulib commit where df starts to work properly: http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=3fb6e360 I am afraid the only safe way to fix this is to revert the fix for bug #1152615. *** Bug 1323843 has been marked as a duplicate of this bug. *** *** Bug 1328521 has been marked as a duplicate of this bug. *** Hi Samuel, Can you guys please pull the coreutils package from the link I sent you and test asap? Thanks! --Chris Chris, I also sent you an email that the provided rpm has a dependency of coreutils-8.4-43.el6.x86_64.rpmendency. If you could please provide this package. I was unable to find this package on any of the yum repositories. Sorry I had a bad paste. The dependency is
"error: Failed dependencies:
coreutils-libs = 8.4-43.el6 is needed by coreutils-8.4-43.el6.x86_64"
After applying
coreutils-libs-8.4-43.el6.x86_64
coreutils-8.4-43.el6.x86_64
df command is now listing root volume correctly.
[root@ictm1620s01h2 scratch]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rootvg-root
- - - - /
tmpfs 32G 296K 32G 1% /dev/shm
/dev/sda1 190M 40M 141M 23% /boot
[root@ictm1620s01h2 scratch]# rpm -Uvh --nodeps coreutils-libs-8.4-43.el6.x86_64.rpm
warning: coreutils-libs-8.4-43.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:coreutils-libs ########################################### [100%]
[root@ictm1620s01h2 scratch]# rpm -Uvh --replacefiles coreutils-8.4-43.el6.x86_64.rpm
warning: coreutils-8.4-43.el6.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID fd431d51: NOKEY
Preparing... ########################################### [100%]
1:coreutils ########################################### [100%]
[root@ictm1620s01h2 scratch]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/rootvg-root
87G 7.9G 75G 10% /
tmpfs 32G 296K 32G 1% /dev/shm
/dev/sda1 190M 40M 141M 23% /boot
(In reply to samuel.miller from comment #22) > After applying > coreutils-libs-8.4-43.el6.x86_64 > coreutils-8.4-43.el6.x86_64 > df command is now listing root volume correctly. Thanks for confirmation! Is this patch targeted for Rhel 6.8 GA release? (In reply to samuel.miller from comment #24) > Is this patch targeted for Rhel 6.8 GA release? This bug is fixed by reverting the patch for bug #1152615 and the revert is already committed. This bug will not appear in any released RHEL-6 package. Confirmation. Bug is fixed with Rhel 6.8 RC and coreutils-8.4-43.el6. This bug has never affected any released version of RHEL-6 coreutils. Closing. |
With Snapshot3 the df command only shows "-" for the size values of the FS. Examples: Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda8 - - - - / tmpfs 16366788 288 16366500 1% /dev/shm or Filesystem Type Size Used Avail Use% Mounted on /dev/mapper/vg_jsbx2560m1-lv_root - - - - - / tmpfs tmpfs 60G 300k 60G 1% /dev/shm /dev/sda1 ext4 500M 43M 431M 9% /boot /dev/mapper/vg_jsbx2560m1-lv_home - - - - - /home