You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docker.raw file size vs diskusage report discrepancy #182
I am using Docker Desktop on macOS.
The Docker data file (Docker.raw) is configured with a maximum size of 20GB.
When inspecting disk usage using different tools on the same directory path, I see a large discrepancy.
diskusage result
diskusage -D -u G ~/Library/Containers/com.docker.docker
Total reported usage: ~1024GB
The entire usage is attributed to the Data directory (100%)
du result on the same path
du -sh ~/Library/Containers/com.docker.docker/*
Data: ~30GB
Other files: negligible size
This indicates that both tools are inspecting the same directory, but reporting vastly different disk usage values.
Issue
While du reports a reasonable and expected disk usage (~30GB) for the Data directory, diskusage reports it as occupying the maximum allocatable disk size (~1TB).
This makes it appear as if Docker is consuming almost the entire disk, even though the actual allocated space is much smaller.
Question
Is this behavior an expected consequence of how diskusage handles sparse files on macOS,
or is this a limitation or bug in how disk usage is calculated for directories containing sparse files such as Docker.raw?
If this is expected behavior, documenting this would help prevent confusion.
Otherwise, is there a recommended approach for reporting sparse file usage more accurately?
Activity
fix: report allocated disk usage for sparse files (#182) (#191)