Hi Thomas,

Rorschach <[email protected]> writes:

> The `df --total` command returns incorrect values for total disk space
> (total, used, available, etc.). It simply adds all values without
> considering whether they are already in use. See the CSV file (output of
> `df --total`) and the LibreOffice Calc spreadsheet, where the values are
> calculated correctly by excluding duplicates.

I am copying the 'df' output you shared, so that others on the mailing
list can see it more easily:

    Dateisystem Typ     Größe   Benutzt Verf.   Verw%   Eingehängt auf
    dev devtmpfs        32G     0       32G     0%      /dev
    run tmpfs   32G     2,4M    32G     1%      /run
    efivarfs    efivarfs        128K    47K     77K     38%     
/sys/firmware/efi/efivars
    /dev/sda2   btrfs   222G    126G    94G     58%     /
    tmpfs       tmpfs   32G     0       32G     0%      /dev/shm
    none        tmpfs   1,0M    0       1,0M    0%      
/run/credentials/systemd-journald.service
    none        tmpfs   1,0M    0       1,0M    0%      
/run/credentials/systemd-resolved.service
    /dev/sda2   btrfs   222G    126G    94G     58%     /srv
    /dev/sda2   btrfs   222G    126G    94G     58%     /var/tmp
    /dev/sda2   btrfs   222G    126G    94G     58%     /root
    /dev/sda2   btrfs   222G    126G    94G     58%     /var/log
    /dev/sda2   btrfs   222G    126G    94G     58%     /home
    /dev/sda2   btrfs   222G    126G    94G     58%     /var/cache
    tmpfs       tmpfs   32G     76K     32G     1%      /tmp
    /dev/sda1   vfat    2,0G    440M    1,6G    22%     /boot
    /dev/sdb1   ntfs3   932G    583G    349G    63%     /home/tom/Daten
    tmpfs       tmpfs   6,3G    72K     6,3G    1%      /run/user/1000
    total       -       2,6T    1,5T    1,2T    57%     -

It looks like the duplicate entries you mention are btrfs subvolumes. If
so, that is the expected behavior, albeit a bit awkward.

I will link a good explanation that Pádraig Brady wrote, instead of
poorly paraphrasing it [1].

Collin

[1] https://debbugs.gnu.org/cgi/bugreport.cgi?bug=17676#8



Reply via email to