3

I have a 1TB internal hard drive, and I discovered today that it is almost full even though I know I shouldn't have nearly that much data on it. A few months ago I spent some time trying to encrypt the drive using ecryptfs (I think I followed this tutorial) I had a hard time getting it to work but I thought I had succeeded in the end. Unfortunately I can't remember the details of where I struggled and where I found help.

The reason I think that this is relevant to my lack of disk space is that Disk Usage Analyser shows that almost three quarters of my drive is taken up with one enormous encrypted directory. Here's a couple of screenshots to demonstrate:

enter image description here enter image description here

The brown segment from roughly 12 to 3 is my usual home directory; Documents, Music, etc. It's the stuff that I'd hoped to encrypt, and the size looks about right for what I thought I had on the machine (there is only one user account). The bigger red segment is taken up with mystery stuff, all stored in a directory called ecryptfs.

I have seen people raise similar concerns in the past but with an ecryptfs directory the same size as the home directory, this is more like three times the size. My suspicion is that it became enlarged because of the difficulties I had encrypting the drive in the first place (I probably attempted to run the tool two or three times, thinking it hadn't worked each time). Either way the responses to those questions don't do much to fix the issue. So far as I can tell there is little practical difference between "the disk is nearly full" or "the computer just thinks the disk is nearly full because of a virtual ecryptfs file".

Does anybody have any thoughts on this issue?

Edit: df shows the following:

$ df -h
Filesystem           Size  Used Avail Use% Mounted on
udev                 7.8G     0  7.8G   0% /dev
tmpfs                1.6G  9.9M  1.6G   1% /run
/dev/sda2            913G  758G  110G  88% /
tmpfs                7.8G  152M  7.7G   2% /dev/shm
tmpfs                5.0M  4.0K  5.0M   1% /run/lock
tmpfs                7.8G     0  7.8G   0% /sys/fs/cgroup
tmpfs                1.6G   92K  1.6G   1% /run/user/1000
/home/eddy/.Private  913G  758G  110G  88% /home/eddy
EddyTheB
  • 337

1 Answers1

0

Baobab (the proper name of Disk Usage Analyzer) doesn't look into file systems mounted at subdirectories (here: /home/eddy) of the parent directory to analyze. Instead it only sees the content of the files inside the parent file system which happen to be the files and file names that back your encrypted home directory in their encrypted state. I found two ways around this.

1 Tell Baobab to look at your home directory specifically

To that end open a terminal and run:

baobab "$HOME"

I didn't find a way to do this reliably via graphical user interface.

2 Use a command-line disk usage analyzer

du doesn't produce neat looking output like Baobab but it does its job:

du "$HOME"

The output of the plain command may be a little difficult to read and I recommend you use the -h option for human-readable number magnitudes:

du -h "$HOME"

You can also sort this output by size in descending order with an additional tool:

du -h "$HOME" | sort -h -r -k 1,1

Last but not least, the output of du will likely span multiple terminal screens. Therefore I recommend that you redirect its output to a pager program like less that lets you scroll through text data at your own leisure:

du -h "$HOME" | sort -h -r -k 1,1 | less

Alternatively you can save the output of du in a file and view it with your favourite text viewer, e. g.:

du -h "$HOME" | sort -h -r -k 1,1 > ~/Desktop/disk-usage.txt
David Foerster
  • 36,890
  • 56
  • 97
  • 151