linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Understanding "Used" in df
@ 2020-07-22 15:10 Martin Steigerwald
  2020-07-22 19:07 ` A L
  2020-07-23  4:51 ` Zygo Blaxell
  0 siblings, 2 replies; 9+ messages in thread
From: Martin Steigerwald @ 2020-07-22 15:10 UTC (permalink / raw)
  To: linux-btrfs

I have:

% LANG=en df -hT /home
Filesystem            Type   Size  Used Avail Use% Mounted on
/dev/mapper/sata-home btrfs  300G  175G  123G  59% /home

And:

merkaba:~> btrfs fi sh /home   
Label: 'home'  uuid: […]
        Total devices 2 FS bytes used 173.91GiB
        devid    1 size 300.00GiB used 223.03GiB path /dev/mapper/sata-home
        devid    2 size 300.00GiB used 223.03GiB path /dev/mapper/msata-home

merkaba:~> btrfs fi df /home
Data, RAID1: total=218.00GiB, used=171.98GiB
System, RAID1: total=32.00MiB, used=64.00KiB
Metadata, RAID1: total=5.00GiB, used=1.94GiB
GlobalReserve, single: total=490.48MiB, used=0.00B

As well as:

merkaba:~> btrfs fi usage -T /home
Overall:
    Device size:                 600.00GiB
    Device allocated:            446.06GiB
    Device unallocated:          153.94GiB
    Device missing:                  0.00B
    Used:                        347.82GiB
    Free (estimated):            123.00GiB      (min: 123.00GiB)
    Data ratio:                       2.00
    Metadata ratio:                   2.00
    Global reserve:              490.45MiB      (used: 0.00B)
    Multiple profiles:                  no

                          Data      Metadata System              
Id Path                   RAID1     RAID1    RAID1    Unallocated
-- ---------------------- --------- -------- -------- -----------
 1 /dev/mapper/sata-home  218.00GiB  5.00GiB 32.00MiB    76.97GiB
 2 /dev/mapper/msata-home 218.00GiB  5.00GiB 32.00MiB    76.97GiB
-- ---------------------- --------- -------- -------- -----------
   Total                  218.00GiB  5.00GiB 32.00MiB   153.94GiB
   Used                   171.97GiB  1.94GiB 64.00KiB   


I think I understand all of it, including just 123G instead of
300 - 175 = 125 GiB "Avail" in df -hT.

But why 175 GiB "Used" in 'df -hT' when just 173.91GiB (see 'btrfs fi sh')
is allocated *within* the block group / chunks?

Does this have something to do with that global reserve thing?

Thank you,
-- 
Martin



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2020-07-28 21:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-22 15:10 Understanding "Used" in df Martin Steigerwald
2020-07-22 19:07 ` A L
2020-07-23  4:51 ` Zygo Blaxell
2020-07-27 11:38   ` Martin Steigerwald
2020-07-27 16:42     ` Andrei Borzenkov
2020-07-27 19:30       ` Chris Murphy
2020-07-27 19:48         ` Andrei Borzenkov
2020-07-27 20:47           ` Hugo Mills
2020-07-28 21:20     ` Zygo Blaxell

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).