xdiskusage not showing disk space properly in some cases

Bug #1844017 reported by Andy Fingerhut
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xdiskusage (Ubuntu)
New
Undecided
Unassigned

Bug Description

Using this command shows lots of disk space used in the /snap directory, and subdirectories:

$ du /snap | xdiskusage

Using this command shows nearly 0 disk space (only 4 KiB):

$ xdiskusage /snap

This is not unique to the /snap directory -- it occurs for most directories, maybe all?

$ lsb_release -rd
Description: Ubuntu 18.04.3 LTS
Release: 18.04

$ apt-cache policy xdiskusage
xdiskusage:
  Installed: 1.48-10.1build1
  Candidate: 1.48-10.1build1
  Version table:
 *** 1.48-10.1build1 500
        500 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
        100 /var/lib/dpkg/status

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: xdiskusage 1.48-10.1build1
ProcVersionSignature: Ubuntu 4.15.0-62.69-generic 4.15.18
Uname: Linux 4.15.0-62-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.7
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Sat Sep 14 12:39:09 2019
InstallationDate: Installed on 2018-09-24 (355 days ago)
InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: xdiskusage
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Andy Fingerhut (andy-fingerhut) wrote :
Revision history for this message
Andy Fingerhut (andy-fingerhut) wrote :

It is definitely not most directories that cause this behavior -- only a few. Another example I have found is /mnt

Revision history for this message
Andy Fingerhut (andy-fingerhut) wrote :

Ugh, sorry. Scratch my previous comment about the /mnt directory exhibiting this behavior -- I have not observed that. I have observed this difference in behavior between du and xdiskusage with the /media directory, though. And those are the only two top-level directories on my Ubuntu 18.04.3 system that I have observed this behavior with, after trying them all.

Revision history for this message
Andy Fingerhut (andy-fingerhut) wrote :

OK, debugging this more myself, I have determined that "xdiskusage <filename>" executes the du program with the -x option, which is documented to "skip directories on different file systems". The /media and /snap directories on my system contain subdirectories that are apparently mounted as different file systems, so that seems to explain the existing behavior.

Sorry for the noise.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.