Page 1 of 3 123 LastLast
Results 1 to 10 of 25

Thread: eCryptfs eating up double disk space

  1. #1
    Join Date
    Feb 2007
    Location
    Slovenia
    Beans
    251
    Distro
    Ubuntu 10.10 Maverick Meerkat

    eCryptfs eating up double disk space

    I'm getting "Low Disk Space" warnings in Ubuntu 10.04, because of eCryptfs, which somehow manages to eat up twice as much disk space as an unencrypted partition normally would.



    When I click "Examine" this is the picture that I see:


    (the blurred out part is my username of course)

    Why is this happening?
    And most importantly, what can I do about it?
    Does Ubuntu expect me to buy twice as much disk space just to encrypt it?!

  2. #2
    Join Date
    Apr 2008
    Location
    Far, far away
    Beans
    2,148
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: eCryptfs eating up double disk space

    I've been using ecryptfs as an encrypted home for quite a while now. It definately doesn't use double the space. Could it be that you copied files into the encrypted space and left copies of the originals behind? That would account for double as it doesn't remove the originals by itself if you copy them into the encrypted space.

    I checked on my system using Disk Usage Analyzer and I don't get the same values as you. My /home/.ecryptfs is different than my /home/username. The files that show up in /home/username exist as encrypted names in /home/.ecryptfs/username/.Private but they don't take any extra space (well approx no difference, I'm not sure if they take a wee bit more or less). There is some kind of "link" managed by ecryptfs.

    The only way I could see you using double space if you accidently had two copies still - one encrypted and one not-encrypted.

  3. #3
    Join Date
    Feb 2007
    Location
    Slovenia
    Beans
    251
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: eCryptfs eating up double disk space

    I did not copy anything, since I have no idea how to set it up. All I did was tell it to encrypt my /home partition during installation.

    And like you've said: "The files that show up in /home/username exist as encrypted names in /home/.ecryptfs/username/.Private" it is the same in my case, only the files take up exactly the same as the original ones apparently.

  4. #4
    Join Date
    Feb 2007
    Location
    Slovenia
    Beans
    251
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: eCryptfs eating up double disk space

    So, what if I just deleted the /home/.ecryptfs folder ?
    Would I still be able to boot back?

  5. #5
    Join Date
    Apr 2008
    Location
    Far, far away
    Beans
    2,148
    Distro
    Ubuntu 11.04 Natty Narwhal

    Re: eCryptfs eating up double disk space

    That doesn't sound like a good idea to me. All your encrypted files are stored in /home/.ecryptfs/username. So deleting /home/.ecryptfs would wipe out all your files.

    I don't know what you've got happening there. I think I would boot into recovery mode as root and have a look at what is actually there. In that case the encrypted home will not be mounted and so you should see only the encrypted files in /home/.ecryptfs/username/.Private. If the other /home/username files also exist then it means something is misconfigured and you have two copies.

    Also, the df -h command will give you a summary of actual disk usage that I think is more reliable than what Disk Usage Analyzer (DUA) probably says. I know from my experience that DUA does report some things twice in some cases. In that case it may be that ecryptfs is working fine but your disk full msg is related to some other issue.

    Also a useful command for discovering where disk space is used is simply,

    sudo du -h --max-depth=1 / or
    sudo du -h --max-depth=1 /home

  6. #6
    Join Date
    Jul 2010
    Beans
    1

    Re: eCryptfs eating up double disk space

    I noticed the same thing on mine. I selected it during installation because I'm booting from a portable drive... With only 8gb every bit matters.

    Just found this:


    Quote Originally Posted by cefn View Post
    I could be wrong about this, but I think the information you gathered from Disk Usage Analyser is misleading and you didn't save yourself any significant storage by removing encryption.

    The /home/.ecryptfs folder is where your data is actually stored. You would expect this to be the same size (at least) as the data found in any encrypted home folder, with a minor overhead. Mine is just 2% bigger than the data it stores.

    Your home folder (e.g. /home/cefn/ is dynamically generated by a process which decrypts the data from the .ecryptfs folder. You would expect this to appear to be the same size, less the overhead. /home/cefn is not a real filesystem.

    What I suspect is the case is that your home folder contains 11 GB of actual data. You're seeing this in the .ecryptfs folder because that's where it's really stored.

    The fact that the /home/cefn folder is virtual (and hence doesn't represent extra disk usage) is brought home by the fact that Disk Usage Analyser reports I'm storing 97.9 GB on a partition which the GParted utility reports is only 58GB in size!

    Check your own Disk Usage and GParted numbers before risking a complex decryption process for no gain.
    Attached Images Attached Images
    Last edited by ebaychuck; August 31st, 2010 at 11:43 PM. Reason: More Info

  7. #7
    Join Date
    Mar 2006
    Location
    Williams Lake
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: eCryptfs eating up double disk space

    Could you post the output of:

    Code:
    df -h
    I seem to recall there was a bug in the disk usage analyzer in some versions that seem to read disk usage wrong.

  8. #8
    Join Date
    Oct 2006
    Beans
    4,624
    Distro
    Kubuntu 15.10 Wily Werewolf

    Re: eCryptfs eating up double disk space

    I think there's some confusion here. Ecryptfs is a virtual file system. Disk usage analyzer sees files in /home/.ecryptfs and /home/$USER and adds them making it appear twice as much disk space is being used. However, there is only 1 set of your files which are in /home/.ecryptfs/$USER. When your encrypted home is mounted it appears that there is twice as much space being used. df -h may help display how this works as it will show that your encrypted home is appearing as a separate mount.
    Blog | Ubuntu User #15350 | Zsh FTW | Ubuntu Security | Nothing to hide?
    AMD Phenom II X6 1075T @ 3GHz, Nvidia GTX 650, 8GB DDR3 RAM, 2 X 1TB, 1 X 3TB HDD
    Please don't request support via PM


  9. #9
    Join Date
    Feb 2007
    Location
    Slovenia
    Beans
    251
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: eCryptfs eating up double disk space

    Oh gosh darn you were right...

    Code:
    Filesystem            Size  Used Avail Use% Mounted on
    /dev/sda7             4.9G  4.4G  222M  96% /home
    /home/******/.Private
                          4.9G  4.4G  222M  96% /home/******
    I was absolutely sure I had at least 10gigs in my /home partition
    Looks like it was only 5G after all.

    Well, I'm glad we solved the mystery. Still, the disk analyzer remains an issue. There ought to be something done about it not to display double usage and thus cause further confusion among users.

  10. #10
    Join Date
    Mar 2006
    Location
    Williams Lake
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: eCryptfs eating up double disk space

    I don't have an encrypted home directory, but the Disk Usage Analyzer works the way it should. I'm running Maverick Alpha 3.

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •