Help constructing my partition layout (btrfs and SSD)
I'm having some trouble constructing a partition layout for my system. It will most likely involve symlinks, bind mounts, or whatnot. Going straight to the point, these are the details and my goals:
-
Swap partition and a separate
/varon an HDD; system partition on an SSD. -
Config/cache files, etc. should stay in
/home/<user>in SSD to take advantage of the SSD's speed. However, I still want to treat/home/<user>as a place to store my media data, such as hundreds of GBs of videos in/home/<user>/videos, which will actually be stored on my HDD but appear as if it's in/home/<user>/videos. Do I want a symlink, bind-mount, or some other type of link? -
Both the SSD and the HDD are to be encrypted. How is this accomplished and in such a way that I only need to enter a passphrase to decrypt the system partition (or the SSD) and that will trigger a decryption of my HDD as well? I believe something similar can be done with an LVM on LUKS setup with multiple drives but isn't this situation different?
-
How can I fix the situation that swap partition and a separate
/varare encrypted on a different drive than the system partition which is also encrypted? -
Finally, I have a very large SSD and after creating these partitions, it might utilize only 10% of the total drive. I'm not sure what to do with the other 90% yet--I might expand the btrfs system partition, install Windows for dual-boot, or create another partition to house many virtual machines. Should I encrypt this unused space as unallocated data? Or is it better that I pick a filesystem to format it to first then encrypt it? I'm also concerned with how flexible it can be in terms of expanding an existing partition or creating a new partition--will it interfere with the current encryption that is in place?
Thank you and much appreciated.
About this post
- Posted
- Archived
- Score
- 5 · 100% up
- Kind
- Text
- ID
- 5780cf
2 comments
To address your points:
Personally putting swap on the HDD seems like an odd notion. I know this seems to be the conventional wisdom (due to concern about too many access to the SSD) but it would seem to me that you'd want a medium that could access it quickly. Regardless, in the only system I have that has both an SSD and HDD, it has enough ram that swap isn't really necessary so I went without.
Personally I just use symlinks and this works very well. I wouldn't complicate it by using anything else unless you have a specific reason to do so.
I've never done this but I think what you want is described here. Basically you are providing your password to grub to decrypt the boot image, then it uses the defined keys to decrypt everything else (from my understanding).
I don't believe this is an issue with the method described above, since the boot image has the keys to decrypt everything.
One of the cool things about btrfs is you can just pass it as many drives as you want without having to worry about partitioning, so I like to take advantage of that. It makes life easier and lets you just use btrfs subvolumes similar to how you might use partitions usually (obviously depends on what you want to do). But it lets you do everything you want to do without taking the system offline. As far as I know LUKS partitions can be resized without issue, but you'd have to do it all from a live disk. And I know that there are some gotcha's when it comes to having VM images on a btrfs partition, so that's something you'd want to consider.
I place swap on the HDD simply because it is never accessed, so it saves 8 GB on my SSD.