2

I'm having an issue with my encrypted home folder:

I enabled /home/theUser encryption when creating theUser. I don't have a proper /home/theUser/.Private directory (it's a link as shown by Luís de Sousa), the whole /home/theUser directory is encrypted.

I now have a df -h resulting in:

Filesystem             Size    Used Avail Use% Mounted on
udev                   189G       0  189G   0% /dev
tmpfs                   38G    146M   38G   1% /run
/dev/sda2              6,9T    5,9T  650G  91% /
tmpfs                  189G    180K  189G   1% /dev/shm
tmpfs                  5,0M       0  5,0M   0% /run/lock
tmpfs                  189G       0  189G   0% /sys/fs/cgroup
/dev/sdb1              235G     60M  223G   1% /opt
cgmfs                  100K       0  100K   0% /run/cgmanager/fs
tmpfs                   38G     40K   38G   1% /run/user/112
tmpfs                   38G       0   38G   0% /run/user/1020
/home/theUser/.Private   6,9T    5,9T  650G  91% /home/theUser
tmpfs                   38G       0   38G   0% /run/user/1000

Also, when loggin the result of du -h at the root of theUser's home folder I get:

du -h | cat > log_du_home_theUser.txt
tail log_du_home_theUser.txt

862M    ./Téléchargements
4,0K    ./Public
473G

which seems to mean my total home folder reach 473G.

The OS is ubuntu server, so no Trash:

cd /home/theUser
ls -lah .local/share/

total 96K
drwxr-xr-x 13 theUser theUser 4,0K déc.   2 14:20 .
drwxr-xr-x  3 theUser theUser 4,0K déc.  11  2014 ..
drwx------  2 theUser theUser 4,0K déc.  11  2014 applications
-rw-rw-r--  1 theUser theUser    0 déc.  11  2014 .converted-launchers
drwx------  7 theUser theUser 4,0K déc.  11  2014 evolution
-rw-rw-r--  1 theUser theUser  956 déc.  11  2014 gsettings-data-convert
drwx------  2 theUser theUser 4,0K févr.  4  2016 gvfs-metadata
drwxrwxr-x  2 theUser theUser 4,0K déc.  11  2014 icc
drwx------  2 theUser theUser 4,0K janv. 26  2017 keyrings
drwx------  3 theUser theUser 4,0K déc.  11  2014 nautilus
-rw-------  1 theUser theUser 3,4K mars  24  2015 recently-used.xbel
-rw-rw-r--  1 theUser theUser  594 janv. 26  2017 session_migration-ubuntu
drwx------  2 theUser theUser 4,0K déc.  11  2014 sounds
drwx------  3 theUser theUser 4,0K déc.  11  2014 telepathy
drwxr-xr-x  2 theUser theUser 4,0K déc.  11  2014 unity-settings-daemon
drwx------  2 theUser theUser 4,0K sept. 18  2015 unity-webapps
drwx------  3 theUser theUser 4,0K déc.  11  2014 zeitgeist

Why the huge diff. between /home/theUser (473G) and /home/theUser/.Private (6,9T) ?

I cannot backup/delete/copy the theUser account because of low disk space on site and would prefer to keep encrypted home if possible, all this is getting out of hand soon.

Cheers.

2
  • What's mount and df -Th say? eCryptfs is probably adding the "false" /home/theuser line
    – Xen2050
    Dec 20, 2017 at 3:07
  • Don't add unrelated tags just to bump your question.
    – muru
    Dec 20, 2017 at 3:16

1 Answer 1

0

Your df output has two nearly identical lines:

/dev/sda2                6,9T    5,9T  650G  91% /
/home/theUser/.Private   6,9T    5,9T  650G  91% /home/theUser

Check with df -T & mount, but if you're using eCryptfs on your home it shows up in df as using the same space as it's host filesystem, your / in this case, even though /home/theUser is using much less space.

So that 5.9T is taken up by everything in / , not just /home, so there's many more files there outside of your home.

This explanation from Tyler Hicks (maintainer of eCryptfs) about an invalid bug report may be helpful:

As Dustin mentioned, the on-disk footprint is not duplicated when using eCryptfs. The eCryptfs inode, as queried by the du -h /home/name/9726255eec083aa56dc0449a21b3319, is an in-memory representation of the actual on-disk inode in the lower filesystem.

Similarly, when df is reporting filesystem usage, the reported usage of any eCryptfs mount is simply the usage amount reported by the filesystem that eCryptfs is mounted upon.

While the output of those commands (and my explanation) may be confusing at first, it is the expected output when dealing with a stacked filesystem like eCryptfs.


I can't tell if your encrypted home is taking up "too much space" beyond it's du size, checking /home/.ecryptfs and comparing it's size to your mounted home might reveal more info.

  • You could try du -h -d1 / to see what size the main root folders are, or -dN to look down N folder "depths".

  • I like baobab / Disk Usage Analyzer as a nice graphic way to see what's taking up disk space (run with sudo/as root, otherwise there's a lot of "Permission denied" messages & missing info)

Though the tools above will probably see /home/.ecryptfs and /home/theUser as separate, thus taking up twice as much space (roughly equal space). Only files in /home/.ecryptfs take up disk space; the mounted /home/theUser is a virtual decrypted "view".

(Also, the used size in your df output, for /dev/sda, is 5.9T. The 6.9T is it's total size. And I'm unfamiliar with ... | cat > file the pipe to cat seems unnecessary.)

1
  • Non-commenting ("drive-by) downvoter: A comment would have been helpful, but it's still right but with more explanation now. Feel free to switch to upvote or help with a comment why it's "wrong"
    – Xen2050
    Dec 20, 2017 at 3:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .