1

the difference between disk usage reported by df and du makes 20% of capacity of my drive. It is ubuntu-type btrfs filesystem with @ and @home. Where could be the problem please?

df -h /dev/sda2
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda2       112G   68G   43G  62% /

sda2 partition is mounted to /run/timeshift/backup

sudo du -h -d 0 /run/timeshift/backup
48G /run/timeshift/backup

Where is the difference of 20GB?

On other disk:

janbenes@Tablet4 ~ (master)> sudo btrfs filesystem du -s /run/timeshift/backup/@
     Total   Exclusive  Set shared  Filename
 678.45GiB   305.54MiB   678.15GiB  /run/timeshift/backup/@
janbenes@Tablet4 ~ (master)> sudo btrfs filesystem du -s /run/timeshift/backup/@home
     Total   Exclusive  Set shared  Filename
 175.53GiB   168.46MiB   175.36GiB  /run/timeshift/backup/@home
janbenes@Tablet4 ~ (master)> sudo btrfs filesystem df /run/timeshift/backup
Data, single: total=1.45TiB, used=1.02TiB
System, single: total=4.00MiB, used=240.00KiB
Metadata, single: total=11.01GiB, used=6.77GiB
GlobalReserve, single: total=512.00MiB, used=0.00B

According to btrfs filesystem du used capacity should be about 850GB and not 1,020GB.

2
  • 3
    Probably this. Take this into account and still there are other factors (did you btrfs balance recently?). Take them into account and still df and du are different in general; plus there are btrfs filesystem du and btrfs filesystem df. Commented Mar 14, 2022 at 16:16
  • hello. Tried btrfs filesystem on another disk and still huge difference. I have seen it before. Looks like BTRFS comes at cost of 20% capacity of a disk...
    – Jan
    Commented Mar 16, 2022 at 17:26

0

You must log in to answer this question.

Browse other questions tagged .