Using LUKS with the storage expansion card (Linux)

I hope this is the right place. I know there’s a Linux sub-category for each of the Framework laptops but this would apply to all of them I think?

I picked up a storage expansion card with the intent of using it either for my entire /home directory or just as a general mount where I can symlink folders from my home to it (which also lets me use the drive for other things). At first I thought this was a horrible idea because of how easy the expansion card is to remove. But my thought is, if someone can get to where they can remove my storage, they can just take the laptop.

And coupling it with LUKS adds a layer of security. As well as allowing me to remove it from the laptop and store it separately (or something take it with me or some such). This plus being able to transfer secure files to/from my workstation (like SSH keys or my KeePass vault) has some nice benefits.

My plan was to set things up so that on the Framework it auto-mounts so it works normally. On my workstation I could perhaps set it up the same way but there I wouldn’t mind just typing the keyphrase when needed. I’d still use ecryptfs for the Private directory since I’m just used to doing that (I tend to store my SSH and Keepass vaults there).

I tested this with just a USB keychain and it seemed to work well enough, I was curious if anyone is using storage expansion in a similar way and had any thoughts or suggestions?

I’m not using a storage expansion card but I’m doing something similar to what you’re asking about.

I have a 12th Gen i7 running LMC 21.1 on a 6.8 kernel. I favour stability and consistency over shiny and new.

I’m using LUKS FDE on a 512GB SSD with a LUKS-encrypted 512 GB micro SDXC as a direct attached backup device. The encrypted card holds a single ext4 filesystem. I have (trivial) bespoke tools to clone encrypted storage cards. All clones unlock with the same secret.

The SDXC auto-mounts at boot time.

How has the performance been? I know most modern processors have crypto acceleration but I’m not sure if this applies to the symmetric encryption used by LUKS or ecryptfs.

Your question is one that requires a YMMV answer. :wink:

I’ve never questioned its performance. I don’t game on this machine but I do run VirtualBox, often with Win11 and Linux guests running concurrently. The few things I build from source do so snappily.

None of my use cases are disk i/o bound however. The i7 has proven excessive to my needs and I have 64 GB of RAM so the swap is barely touched. The network connection–mostly wifi but occasionally the wired NIC–are my bottlenecks.

The only time I notice LUKS “sluggishness” is on cold boot which only happens a couple of times a month.

Yeah it was more an idle curiosity. I don’t plan to edit video on mine (or play games generally), but sometimes may copy bulk files around.