2

I was about to use the encryptfs procedure to migrate my existing home folder and discovered that the process needs 2.5x the size of home to complete. I have 258GB in my home, but only 430GB free. Is there a way that I can encrypt home without reinstalling?

  • yes, but you need to temporarily store some of the home data to another partition and then encrypt the home partition (which is less used). However, you should maybe also think about not encrypting the whole home directory, but only important private data. – Michael K Jan 13 '12 at 13:55
  • What happens if I move "documents," then encrypt, then copy documents back after encryption? will this work? – Kendor Jan 14 '12 at 1:26
  • yes of course, it is as if you would store new data on your home drive. – Michael K Jan 16 '12 at 7:07
3

Full disclosure here, I'm the co-author and maintainer of the ecryptfs-migrate-home utility.

Note that the 2.5x multiplier is perhaps an aggressive overestimation of the required disk space, but I've published that recommendation as a safety precaution

To answer your question, yes, it is possible, though perhaps slightly risky, and not generally recommended.

You could accomplish this by editing the shell script, /usr/bin/ecryptfs-migrate-home, and modify the line that looks like this:

rsync -aP "$orig/" "$USER_HOME/" 1>&2 

to:

mv -vf "$orig/"* "$orig/".* "$USER_HOME/" 1>&2 

This will move files in place, instead of copying them.

  • This is perfect. I did a backup to an external drive previously, so I'm not worried about it breaking things. – LadyCailin Oct 28 '15 at 20:02
  • Hey Dustin, I've modified the line as you suggested and I've also "neutralized" the check for the 2.5x free space, but it doesn't work. The encryption process actually starts, but for some reason the files are not moved in place. They rather seem to be copied, and the original file is not deleted afterwards (I checked this). In fact, after about 30 seconds the process has started, the system runs out of space. Do you have any idea how to fix that? (of course I'm running encryptfs-migrate-home as root with sudo su) – korg91 Mar 2 '17 at 11:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.