Is LVM worth the overhead to reduce decryption time in LVM on LUKS?
I have 2 partitions on my laptop--one for the system and another for my media data. I want both encrypted and without LVM, I could add a key to my system partition to automatically decrypt the second partition after entering the passphrase for the first partition. However, it still takes twice the amount of time to decrypt than if I were to just decrypt 1 partition .
-
Maybe I could make the encryption for the second partition much weaker, but I don't know if that's a security risk in this setup. Or maybe I just combine the two partitions into 1 partition? I don't know what advantages I might be losing doing this way.
-
Another scheme is to use LVM on LUKS for the entire drive, where only one decryption is necessary. I already use Btrfs whose features tend to overlap LVM's. Of course an added bonus is being able to shrink/extend encrypted logical volumes if I ever want to do that.
I think the obvious answer is to just combine the two partitions into 1 partition, but I'm more interested in hearing the pros/cons of each method just so I can understand when they might be useful in other situations.
Thanks.
About this post
- Posted
- Archived
- Score
- 2 · 100% up
- Kind
- Text
- ID
- 71vpis
5 comments
I don't see any advantage in having 2 partitions. I use a setup like this, one large btrfs filesystem with subvolumes on luks. really depends on why you have 2 partitions in the first place... seems to me much more inflexible, as you have to know beforehand how big the partitions need to be. one partition, it doesn't matter, both filesets just share all the space.
Is this 'twice the time' something you measured? Details please.
My experience is that with modern hardware, dm_crypt is almost too fast to measure.
I'm a complete noob so maybe I'm interpreting the wrong info--
systemd-analyze blameshows:The ~5.4 seconds for each
systemd-cryptsetup@crypt_______.servicemeans it takes that long to decrypt each drive, right? I'm using i5-2500k processor. Also, I have no idea why my HDD's are taking so long to mount. I have Arch installed on an SSD (Samsung 850 Pro) and my boot time is abysmal--it takes at least 30 seconds to boot to Linux. I don't know if this is normal even with 3 HDDs that are mounted on startup (if it is normal, I guess I can delay mounting it and see what happens; otherwise, I want them mounted ASAP).I have a Btrfs on LUKS setup and can provide further details if you can diagnose the issue. On my laptop I also have the same setup except I don't have a /var subvolume on an HDD and everything is on an SSD so there is no HDD to mount/decrypt--boot time is very low which is what you'd expect. I think having /var on an HDD might also be a culprit because the system needs to wait for the HDD to mount/decrypt but I'm not sure. I'm really trying to figure out whether it is mounting and/or decrypting that causes boot time to be so slow. I think
systemd-analyze blamesuggests mounting takes ~40 seconds, but I assume that's not literally the case because I've read that whileman-db.servicecan be very long according tosystemd-analyze blame, it's running in parallel so it's not an issue.Thanks.
I see no reply. Try bbs.archlinux.org maybe
Great info. Let's wait for more knowledgeable help than me. :-)
I have not had a FDE system in a long time, but IIRC, it booted much, much faster than your example.
I can say that systems I have with btrfs roots seem to boot much slower than EXT4 or EXT4 on LVM.
Sorry.