From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 16 12:38:12 2022 Received: (at submit) by debbugs.gnu.org; 16 Mar 2022 16:38:12 +0000 Received: from localhost ([127.0.0.1]:52160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUWf5-00046d-OT for submit@debbugs.gnu.org; Wed, 16 Mar 2022 12:38:12 -0400 Received: from lists.gnu.org ([209.51.188.17]:47540) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUWCZ-0003J8-JO for submit@debbugs.gnu.org; Wed, 16 Mar 2022 12:08:43 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56228) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nUWCZ-0000Rw-DK for bug-coreutils@gnu.org; Wed, 16 Mar 2022 12:08:43 -0400 Received: from [2607:f8b0:4864:20::432] (port=43932 helo=mail-pf1-x432.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nUWCV-0007zd-To for bug-coreutils@gnu.org; Wed, 16 Mar 2022 12:08:43 -0400 Received: by mail-pf1-x432.google.com with SMTP id t2so4345928pfj.10 for ; Wed, 16 Mar 2022 09:08:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:from:date:message-id:subject:to; bh=NSjpRNf3jRtYdsTcG44tiYUFF8JtcO9VOKORWfkz4ic=; b=huNqZ3jz8e1dsxCQfxMwasZD3Ul1UqNcloFrI9OLDDtMycIXD6Sv9zvMeUurE8/UhJ 0X/GF9d4er7vnNZgmUMGCHlQsibnYY/vFhIvy8uRhBTjDa/4Ph86FBSK0mZ9/0ciq19o l9v2X7QiP/xQN5EqR9i627u1JeojsBza1RHF20HaDpO7/cCQ2udPKIRh+DrTbM6iPR+K /ng8aQ76dAG+TKMwuRKzjTINkG+pF1Ao15ESAVaA+4TPPSqo5UdQqn2TkZ+/pH8Fuij2 UL6eD53ysuGaE3fdUYiLqXegyb67lQT2EUozbt5dXg8SLkj7cAwiNU1ac38bfxNLRIQP OJkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=NSjpRNf3jRtYdsTcG44tiYUFF8JtcO9VOKORWfkz4ic=; b=usN892UZ1RLhy1ndBSgOV23Bx1CKJYfN3rzZINJd0655s2nkebS7O0c+3atd2LSCJN wGKEZgyKgRqqMrm7lhgY7tJjUaCPoXmIQ75iBjPY0cNjXYNLu6vLJQnjydENXzYxxehf YGDWmKpdg+ILfjDB3pVDOXQAqJNpXJNb34Tlqkwnj3ZrJpSDX1VoCuukMVc4KtHy+zfW 055BwsPW0zBr6AEUyfCeqvM7bXMSohCoizXb4N7qhHkAftZK4BWsm1gX020hWSB5qzr5 pJWOeqYrQO2Uc9QT9ZH5+gw5jlq9TmrpzLCSGbJGvHoMJtTaILRnYT6uHHMM9htSTEjU MzEQ== X-Gm-Message-State: AOAM5310WKgEDJ6wcCN0oPJ8Xt8zrK7q2erqd18wDUwxsi3icTh3JKg/ TDuK5rF/bYBIwTvOBW9UHQzK1nV6x1P9UoI8rxoUgpJ2 X-Google-Smtp-Source: ABdhPJwX7s+f1rEnYn9CYduOdGJGhZjBSyI3MRf9ZWa0+EVa+65MZCnp0NtsVKNYn+YWpBlf8NJOwf/g4vnlT/T/ak8= X-Received: by 2002:aa7:87da:0:b0:4fa:282e:d1f3 with SMTP id i26-20020aa787da000000b004fa282ed1f3mr337131pfo.71.1647446907348; Wed, 16 Mar 2022 09:08:27 -0700 (PDT) MIME-Version: 1.0 From: Fariya F Date: Wed, 16 Mar 2022 21:38:16 +0530 Message-ID: Subject: df command doesnt report correct output To: bug-coreutils@gnu.org Content-Type: multipart/alternative; boundary="000000000000b2e96205da581fac" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::432 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::432; envelope-from=fariya.fatima03@gmail.com; helo=mail-pf1-x432.google.com X-Spam_score_int: -3 X-Spam_score: -0.4 X-Spam_bar: / X-Spam_report: (-0.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.5 (/) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 16 Mar 2022 12:38:10 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) --000000000000b2e96205da581fac Content-Type: text/plain; charset="UTF-8" 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 () 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 --000000000000b2e96205da581fac Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

Hi,=C2=A0


M= y eMMC device has a partition which reports the below output from df -h com= mand:

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, t= he 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 al= so 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 h= uge number? Though the output from df command indicates 100% usage, I am st= ill able to create files in the partition. Any idea how to ensure df comman= d returns the correct value instead of 100% usage or how to clear the "= ;overhead blocks" listed in tune2fs?=C2=A0

My script goes through the usage percenta= ge of a partition and deletes off files if usage is >70%. Because df com= mand=C2=A0 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.=C2=A0

Reg= ards

Ff

--000000000000b2e96205da581fac-- From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 16 13:00:19 2022 Received: (at 54427) by debbugs.gnu.org; 16 Mar 2022 17:00:19 +0000 Received: from localhost ([127.0.0.1]:52193 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUX0V-0004mE-Hq for submit@debbugs.gnu.org; Wed, 16 Mar 2022 13:00:19 -0400 Received: from mail-out.m-online.net ([212.18.0.10]:52329) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nUX0T-0004m4-PH for 54427@debbugs.gnu.org; Wed, 16 Mar 2022 13:00:18 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4KJc3444B6z1s7tV; Wed, 16 Mar 2022 18:00:16 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4KJc341pRZz1qqkD; Wed, 16 Mar 2022 18:00:16 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id w3iGlS5-IQbb; Wed, 16 Mar 2022 18:00:15 +0100 (CET) X-Auth-Info: KkJSGO8UThf2oHB7OOwVlaDuM5uD+EHntH7/fM+Dmj3d5FcPnVY7e4aQwIK3otjF Received: from igel.home (ppp-46-244-175-139.dynamic.mnet-online.de [46.244.175.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Wed, 16 Mar 2022 18:00:15 +0100 (CET) Received: by igel.home (Postfix, from userid 1000) id 3A58D2C3A9E; Wed, 16 Mar 2022 18:00:15 +0100 (CET) From: Andreas Schwab To: Fariya F Subject: Re: bug#54427: df command doesnt report correct output References: X-Yow: I hope the ``Eurythmics'' practice birth control... Date: Wed, 16 Mar 2022 18:00:15 +0100 In-Reply-To: (Fariya F.'s message of "Wed, 16 Mar 2022 21:38:16 +0530") Message-ID: <87bky5de8w.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.5 (/) X-Debbugs-Envelope-To: 54427 Cc: 54427@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.5 (-) 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@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."