dundee / gdu

Fast disk usage analyzer with console interface written in Go
MIT License
4k stars 144 forks source link

"Show apparent size" needed for WSL instance to Windows drive #162

Open danie-dejager opened 2 years ago

danie-dejager commented 2 years ago

Hi,

I'm not sure why this is happening but when I run gdu -dn I get the following output:

  Device      Size      Used      Free Used% Mount point
/dev/sdc 251.0 GiB  13.7 GiB 237.3 GiB    5% /

when I am inside a mnt to the Windows drive from my WSL the following happens: /mnt/d/Data/repo/security

$ gdu -n
    7.8 EiB /packages
    4.8 EiB /app1
  -463550477559806976 B /app2
  -3473665266239336448 B /audit_configs
  -3801883870989672960 B /server-fixes

to get the proper output I need to run it like this:

$ gdu -na
  106.9 MiB /packages
    1.0 GiB /app1
  333.1 KiB /app2
  215.4 KiB /audit_configs
  442.2 MiB /server-fixes

Is this expected behaviour? I'm not sure why the mnt is confusing the space from within WSL.

dundee commented 2 years ago

Interesting, I will need to install WSL to check this, so it will take me some time.

danie-dejager commented 1 year ago

I've noticed that dust is doing the same thing on WSL drives. It must be the way the kernel presents the filesystem, what is "apparent size" actually? https://github.com/bootandy/dust/issues/295