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

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:


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.
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to