From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: Valerio Pachera <sirio81@gmail.com>, linux-btrfs@vger.kernel.org
Subject: Re: Fwd: Used space discrepancy
Date: Tue, 13 Mar 2018 09:31:24 -0400 [thread overview]
Message-ID: <e934275d-2ff0-7d46-fd5d-421d6bd2ad9b@gmail.com> (raw)
In-Reply-To: <CAHS0cb_77AcDUyV1iPAMN-CkYfOx_d4ZhSzhrKB=-ZVBU4jWYQ@mail.gmail.com>
On 2018-03-13 09:07, Valerio Pachera wrote:
> Short version:
>
> 656G used (df -h)
> 450G used (du -sh)
> 10G used by snapshots
> 196G discrepancy <-----
>
> I don't undertand what is using 196G.
>
> df -h /mnt/dati/
> File system Dim. Usati Dispon. Uso% Montato su
> /dev/mapper/vg00-dati 919G 656G 262G 72% /mnt/dati
>
> du -sh /mnt/dati/folder1,2,3
> 450G
>
> I have a subvolume with 10 snapshots.
> I know that 10G of data has been copied, so snapshots should hold no
> more than 10G.
>
> There's not a huge amount of metadata:
>
> btrfs fi df /mnt/dati
> Data, single: total=774.00GiB, used=654.42GiB
> System, single: total=32.00MiB, used=92.00KiB
> Metadata, single: total=2.00GiB, used=1007.42MiB
> GlobalReserve, single: total=512.00MiB, used=0.00B
>
> Why such a big difference between 'df -h' and 'du -sh' ?
>
> uname -a
> Linux cubo-ats 4.9.0-0.bpo.5-amd64 #1 SMP Debian
> 4.9.65-3+deb9u2~bpo8+1 (2017-01-05) x86_64 GNU/Linux
>
> btrfs --version
> btrfs-progs v4.7.3
>
> btrfs fi show
> Label: none uuid: f0a8ff89-608e-4ca2-bde9-8dc09b91accf
> Total devices 1 FS bytes used 655.40GiB
> devid 1 size 918.35GiB used 776.03GiB path /dev/mapper/vg00-dati
The difference is because of how `du` and `df` compute space. See the
threads linked here for more concrete discussion:
https://www.spinics.net/lists/linux-btrfs/msg75176.html
https://www.spinics.net/lists/linux-btrfs/msg75101.html
In your case, start by just calling `du` on the _whole_ volume. There's
probably some space you're missing that isn't in snapshots and isn't
used under the folder/folders you told it to look at.
next prev parent reply other threads:[~2018-03-13 13:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAHS0cb_Pp8z5d_iKKX8MsDX5ixxVQLMyu94eir_a-AJsnhzqUQ@mail.gmail.com>
2018-03-13 13:07 ` Fwd: Used space discrepancy Valerio Pachera
2018-03-13 13:19 ` Valerio Pachera
2018-03-13 13:31 ` Austin S. Hemmelgarn [this message]
2018-03-13 14:59 ` Fwd: " Valerio Pachera
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=e934275d-2ff0-7d46-fd5d-421d6bd2ad9b@gmail.com \
--to=ahferroin7@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=sirio81@gmail.com \
/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