Hi Collin.
Thanks for the reply.
My report wasn't about the display of the duplicate entries, though. I
understand that's how it's supposed to work.
My issue was with the total storage display. It simply adds up everything
that's shown, which leads to an incorrect result.
I do not have 2.6T of disk storage and I do not have 1.5T of stored data.
The btrfs-disk has a size of 222G in total and the ntfs-volume has a size
of 932G in total. Therefore, the entire row containing the totals (except
for the percentage) displays incorrect values.

The explanation written by Pádraig Brady shows that the problem is already
known.
My problem is that I want to use the output of 'df' for a zsh plugin that
monitors disk usage during cp/mv operations, and the incorrect values then
corrupt the return values of my plugin.
I will probably have to come up with a different strategy.

Best regards,
Tom

Am So., 1. März 2026 um 10:27 Uhr schrieb Collin Funk <
[email protected]>:

> 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