Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Migrating a LUKS(encrypted root)+LVM2 system to RAID1
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
rochus
n00b
n00b


Joined: 06 Dec 2012
Posts: 8

PostPosted: Fri Oct 11, 2013 8:57 am    Post subject: Migrating a LUKS(encrypted root)+LVM2 system to RAID1 Reply with quote

Hello everyone,

As i have not done this before, I'm very cautious and rather ask many stupid questions ;-) Right now my system is running on one hdd (/dev/sda) with /dev/sda1 containing the unencrypted /boot (Fat32; Note this is a GPT/UEFI/grub2 installation) and /dev/sda2 with a LUKS encrypted container, holding the remainder of the system as an LVM volume.

I'd now like to put a software RAID1 layer beneath the luks+lvm system. I found some guidance on how to do that for an lvm setup, but nothing hinting towards luks. Are there any differences? What do I need to take care of? As this is an UEFI install, is there anything to be concerned about? If you have some resources, simply point me to that.

Thanks in advance!

PS: I'm not sure if this subforum is the right one to post this question to. Please move if necessary.
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Fri Oct 11, 2013 12:17 pm    Post subject: Reply with quote

The only difficulty is when you want to do this with/out moving or even re-encrypting the encrypted data.

There you can either choose 0.90 or 1.0 metadata (so it will be at the end of the disk), to make room for that you'd have to shrink the encrypted filesystem first.

If you want to use the default 1.2 metadata, you'd have to move the beginning of the partition to allow for that metadata to be stored, and then be very careful about how the mdadm is created (e.g. make it use a 1-2MB offset instead of 128MB which it sometimes uses for unfathomable reasons).

In that case none of the LUKS data would have to be moved, but in order to move the partition start by 1-2MiB, you'd probably have to shrink your boot partition a little. Depends on what your partition table looks like exactly.

Personally I'd go for the 1.2 metadata as that's simply the most common and most reliable one to have.



Can you show us your partitioning, e.g. `parted /dev/sda unit s print free`?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum