I have two storage devices in my machine. When I installed ubuntu, it offered to format the SSD and install to it, which was what I wanted. I didn't offer to do anything with the second. Fair enough. I can see that it's there with lshw.
So I can use LUKS to format the second drive and mount it at /home2. On my desktop, this arrangement isn't too annoying, because the machine is up most of the time. But having to do an explicit mount of /home2 isn't great on my laptop, there are just too many boots in its life.
I don't think I have a preference on LUKS vs ecryptfs.
What I'd prefer is to see the second storage device mounted when I login with my password decrypting it, as it does my home directory. I don't see how to do this, though. Any pointers?
Thanks.
You could use eCryptFS and make a private folder on the second drive, it could decrypt automatically as you log in (see
ecryptfs-setup-private
and this other answer about a different ~/.Private (use a link).But the second drive's partition would have to be mounted already. Having it in /etc/fstab should mount it automatically at boot time (unless the "noauto" option is present).
Or you could just click on the partition's name in most file managers after logging in to mount it, but then the eCryptFS private folder wouldn't be automatically decrypted/mounted on login, and you'd have to call
ecryptfs-mount-private
yourself and probably re-type your login passphrase, or the wrapping passphrase.