* Fwd: Used space discrepancy
[not found] <CAHS0cb_Pp8z5d_iKKX8MsDX5ixxVQLMyu94eir_a-AJsnhzqUQ@mail.gmail.com>
@ 2018-03-13 13:07 ` Valerio Pachera
2018-03-13 13:19 ` Valerio Pachera
2018-03-13 13:31 ` Fwd: " Austin S. Hemmelgarn
0 siblings, 2 replies; 4+ messages in thread
From: Valerio Pachera @ 2018-03-13 13:07 UTC (permalink / raw)
To: linux-btrfs
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Used space discrepancy
2018-03-13 13:07 ` Fwd: Used space discrepancy Valerio Pachera
@ 2018-03-13 13:19 ` Valerio Pachera
2018-03-13 13:31 ` Fwd: " Austin S. Hemmelgarn
1 sibling, 0 replies; 4+ messages in thread
From: Valerio Pachera @ 2018-03-13 13:19 UTC (permalink / raw)
To: linux-btrfs
Today I've been updating the kernel and btrfs-progs to jessie
backports and rebooted the server.
There seems to not be usefull info in dmesg
dmesg | grep -i btrfs
[ 4.702295] Btrfs loaded, crc32c=crc32c-generic
[ 8.371792] BTRFS: device fsid f0a8ff89-608e-4ca2-bde9-8dc09b91accf
devid 1 transid 61700 /dev/dm-1
[ 8.485413] BTRFS info (device dm-1): disk space caching is enabled
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Fwd: Used space discrepancy
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
2018-03-13 14:59 ` Valerio Pachera
1 sibling, 1 reply; 4+ messages in thread
From: Austin S. Hemmelgarn @ 2018-03-13 13:31 UTC (permalink / raw)
To: Valerio Pachera, linux-btrfs
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.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Fwd: Used space discrepancy
2018-03-13 13:31 ` Fwd: " Austin S. Hemmelgarn
@ 2018-03-13 14:59 ` Valerio Pachera
0 siblings, 0 replies; 4+ messages in thread
From: Valerio Pachera @ 2018-03-13 14:59 UTC (permalink / raw)
To: linux-btrfs
2018-03-13 14:31 GMT+01:00 Austin S. Hemmelgarn <ahferroin7@gmail.com>:
> 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.
du -sh /mnt/dati/
1,8T /mnt/dati/
df -h /mnt/dati/
File system Dim. Usati Dispon. Uso% Montato su
/dev/mapper/vg00-dati 919G 656G 262G 72% /mnt/dati
ls -lah /mnt/dati/
totale 4,0K
drwxr-xr-x 1 root root 644 mar 12 22:18 .
drwxr-xr-x 4 root root 4,0K set 9 2016 ..
drwxr-xr-x 1 root root 314 gen 31 15:28 archivio
drwxr-xr-x 1 root root 14 gen 11 11:32 backup
drwxr-xr-x 1 www-data www-data 422 set 26 10:29 cloud
drwx------ 1 root root 0 feb 24 2014 lost+found
drwxr-xr-x 1 root root 62 gen 31 16:27 win2016_files
drwxr-xr-x 1 root root 62 gen 31 16:27 win2016_files.20180301221156
drwxr-xr-x 1 root root 62 gen 31 16:27 win2016_files.20180302221241
drwxr-xr-x 1 root root 62 gen 31 16:27 win2016_files.20180303221230
drwxr-xr-x 1 root root 62 gen 31 16:27 win2016_files.20180305221827
drwxr-xr-x 1 root root 62 gen 31 16:27 win2016_files.20180306221228
drwxr-xr-x 1 root root 62 gen 31 16:27 win2016_files.20180307221258
drwxr-xr-x 1 root root 62 gen 31 16:27 win2016_files.20180308221256
drwxr-xr-x 1 root root 62 gen 31 16:27 win2016_files.20180309221252
drwxr-xr-x 1 root root 62 gen 31 16:27 win2016_files.20180310221230
drwxr-xr-x 1 root root 62 gen 31 16:27 win2016_files.20180312221818
cd /mnt/dati
du -sh archivio/ backup/ cloud/ win2016_files | sort -rh
188G backup/
130G win2016_files
92G cloud/
40G archivio/
As you can see there's not really much to look at.
Note: once a month I run
btrfs balance start -v -musage=0 /mnt/dati
May this influence the used space somehow?
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-03-13 14:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[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 ` Fwd: " Austin S. Hemmelgarn
2018-03-13 14:59 ` Valerio Pachera
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox