GNU bug report logs - #54427
df command doesnt report correct output

Previous Next

Package: coreutils;

Reported by: Fariya F <fariya.fatima03 <at> gmail.com>

Date: Wed, 16 Mar 2022 16:39:02 UTC

Severity: normal

To reply to this bug, email your comments to 54427 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#54427; Package coreutils. (Wed, 16 Mar 2022 16:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Fariya F <fariya.fatima03 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Wed, 16 Mar 2022 16:39:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Fariya F <fariya.fatima03 <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: df command doesnt report correct output
Date: Wed, 16 Mar 2022 21:38:16 +0530
[Message part 1 (text/plain, inline)]
Hi,


My eMMC device has a partition which reports the below output from df -h
command:

Filesystem       Size  Used Avail Use% Mounted on
/dev/mmcblk2p3    16Z   16Z   84M 100% /data

the partition is of size 100MB though! The partition is ext4 formatted. As
can be seen above, the output reports huge values for Used space. in
reality, the partition is just about 5MB used but for some reason df
reports the huge value. When i check the partition used size via du -sh
command, it reports the below:

#du -sh
5.8MB

I also checked the ouput via tune2fs command and below is what I get:

Filesystem state:         clean
Errors behavior:          Continue
Filesystem OS type:       Linux
Inode count:              25688
Block count:              102400
Reserved block count:     5120
Overhead blocks:        50343939
Free blocks:              87634
Free inodes:              25190
First block:              1
Block size:               1024
Fragment size:            1024
Reserved GDT blocks:      256
Fragments per group:      8192
Inodes per group:         1976
Inode blocks per group:   247
Flex block group size:    16
Filesystem created:       Thu Nov 21 06:38:03 2019
Last mount time:          Thu Mar 10 13:20:58 2022
Last write time:          Thu Mar 10 13:20:58 2022
Mount count:              31
Maximum mount count:      -1
Last checked:             Sat Jan 22 08:17:33 2022
Check interval:           0 (<none>)
Lifetime writes:          604 MB
Reserved blocks uid:      0 (user root)
Reserved blocks gid:      0 (group root)
First inode:              11
Inode size:               128
Journal inode:            8

Any idea what is the Overhead blocks and why the Overhead blocks is showing
a huge number? Though the output from df command indicates 100% usage, I am
still able to create files in the partition. Any idea how to ensure df
command returns the correct value instead of 100% usage or how to clear the
"overhead blocks" listed in tune2fs?

My script goes through the usage percentage of a partition and deletes off
files if usage is >70%. Because df command  always shows 100% usage it
always deletes any files. Please let me know if df command is apt to use Or
some other command like du i should use.

Regards

Ff
[Message part 2 (text/html, inline)]

Information forwarded to bug-coreutils <at> gnu.org:
bug#54427; Package coreutils. (Wed, 16 Mar 2022 17:01:02 GMT) Full text and rfc822 format available.

Message #8 received at 54427 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Fariya F <fariya.fatima03 <at> gmail.com>
Cc: 54427 <at> debbugs.gnu.org
Subject: Re: bug#54427: df command doesnt report correct output
Date: Wed, 16 Mar 2022 18:00:15 +0100
On Mär 16 2022, Fariya F wrote:

> Any idea what is the Overhead blocks and why the Overhead blocks is showing
> a huge number?

Looks like the filesystem superblock has been corrupted.  You should
probably copy the data to a new storage medium.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




This bug report was last modified 2 years and 256 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.