From: mfe555 <mfe555@web.de>
To: linux-ext4@vger.kernel.org
Cc: mfe555 <mfe555@web.de>
Subject: Re: Significant difference in 'file size' and 'disk usage' for single files
Date: Sun, 5 Nov 2017 12:16:12 +0100 [thread overview]
Message-ID: <d2136540-6e7c-9e19-1ba4-fbf304b63362@web.de> (raw)
In-Reply-To: <472fde11-654a-4826-0256-46149e90216e@web.de>
Some follow-up:
The issue only occurs with "bigalloc" enabled.
echo 3 > /proc/sys/vm/drop_caches
seems to detach the blocked disk space from the files (so that 'du file' no longer includes the offset), but it does not free the space, 'df' still shows all file overheads as used disk space.
Am 02.11.2017 um 20:17 schrieb mfe555:
> Hi, I'm using ext4 on a Linux based Enigma2 set-top box, kernel 4.8.3.
>
> When creating a fresh file, there is a significant difference in file
> size (ls -la) and disk usage (du). When making two copies of the file ..
>
> gbquad:/hdd/test# cp file file.copy1
> gbquad:/hdd/test# cp file file.copy2
> gbquad:/hdd/test# ls -la
> -rw------- 1 root root 581821460 Nov 1 18:52 file
> -rw------- 1 root root 581821460 Nov 1 18:56 file.copy1
> -rw------- 1 root root 581821460 Nov 1 18:57 file.copy2
> gbquad:/hdd/test# du *
> 607232 file
> 658176 file.copy1
> 644864 file.copy2
>
> ... all three files show an overhead in the ~10% range, and the
> overhead is different for these files although their md5sums are equal.
>
> When deleting a file (rm), the overhead remains occupied on the disk.
> For example, after deleting "file", "df" reports approx. 581821460
> more bytes free, not 607232 kbytes more free space. The overhead
> (607232 kB - 581821460 B =pprox. 39 MB) remains blocked.
>
> When re-booting, the blocked space becomes free again, and in addition
> the overhead of those files that were not deleted also disappears, so
> that after a reboot the'file size' and 'disk usage' match for all
> files (except for rounding up to some block size).
>
> A colleague and I have observed this on two different "kernel 4.8.3"
> boxes and three ext4 disks, but not on a "kernel 3.14" box also using
> ext4.
>
> Can anyone help me with this ?
>
> Thanks a lot
> Lukas
>
next prev parent reply other threads:[~2017-11-05 11:16 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-02 19:17 Significant difference in 'file size' and 'disk usage' for single files mfe555
2017-11-05 11:16 ` mfe555 [this message]
2017-11-06 15:35 ` Mattthew L. Martin
2017-11-06 17:35 ` mfe555
2017-11-06 18:56 ` Mattthew L. Martin
2017-11-07 7:30 ` mfe555
2017-11-10 14:43 ` Mattthew L. Martin
[not found] ` <7e9c7d78-baa5-5680-2e33-b6c5db3590ef@web.de>
2017-11-11 12:14 ` betacentauri
2017-11-11 16:05 ` betacentauri
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=d2136540-6e7c-9e19-1ba4-fbf304b63362@web.de \
--to=mfe555@web.de \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).