[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

lvm2 on top of dm-crypt - how to add new hard disk



Hello folks,

So I might better ask before attempting something stupid. I need to add
a new hard drive to an encrypted debian box. The encryption scheme was
set using debian installer defaults which resulted in just /dev/sda1
-> /boot outside block device encryption. Everything else is encrypted
and lvm is used instead of ordinary partitions.

My initial guess was that it should be possible to extend this
encryption scheme to the new hard disk using standard lvm tools and the
unencrypted "open" disk as physical volume to the already existing
volume group. However, after some research the nearest I got was someone
who added the disk while creating a new volume group:

http://earlruby.org/2010/02/adding-an-external-encrypted-drive-with-lvm-to-ubuntu-linux/comment-page-1/

and this arch wiki saying I should better have the reverse: luks on lvm.

https://wiki.archlinux.org/index.php/Encrypted_LVM#Spanned.2FMultiple_Disks

But it does not state it is impossible, it just says that it requires
modifying the "encrypted hook". Also, it's clear that once this is done,
if one disk fails, the system will be unbootable.

So my question is: have anyone here ever done that? How to I tell init
to unlock both disks before mapping lvm?

-- 
André N. Batista
GNUPG/PGP KEY: 6722CF80



Reply to: