All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm-crypt] Encrypted Raid1 or Raid 1 of encrypted devices?
@ 2011-07-11 22:03 Laurence Darby
  2011-07-12 11:32 ` Jorge Fábregas
  2011-07-12 12:20 ` Arno Wagner
  0 siblings, 2 replies; 10+ messages in thread
From: Laurence Darby @ 2011-07-11 22:03 UTC (permalink / raw)
  To: dm-crypt

Hello,

I have 2 disks currently as a RAID1, and want to encrypt it.  I've
done several tests with loopback devices, and found that I can either
create a raid1 with the raw devices, and then encrypt the /dev/md
device, eg:

losetup /dev/loop1 /tmp/a
losetup /dev/loop2 /tmp/b

mdadm --create /dev/md3 --level=1 /dev/loop1 /dev/loop2 --raid-devices=2

cryptsetup luksFormat /dev/md3
cryptsetup luksOpen /dev/md3 md3


or instead encrypt each device, and then make the 2 encrypted devices
into a raid, eg:

losetup /dev/loop3 /tmp/c
losetup /dev/loop4 /tmp/d

cryptsetup luksFormat /dev/loop3
cryptsetup luksFormat /dev/loop4

cryptsetup luksOpen /dev/loop3 data3
cryptsetup luksOpen /dev/loop4 data4

mdadm --create /dev/md4 --level=1 /dev/mapper/data3 /dev/mapper/data4
--raid-devices=2


Is there a recommended way to do this?

I've read the FAQ, especially the part about bad RAM, how single bit
flip errors get amplified - would that mean encrypting each disk
separately is safer, because a bit flip error would be only be copied
to only one device instead of both?  If that happened and a
verification test spotted it, I could remove each device in turn to
find which has the corruption, and repair it.  I am planning on running
the full set of RAM tests anyway.  Is there any reason not to encrypt
each device separately, or any other general advice here?

Thanks,
Laurence

^ permalink raw reply	[flat|nested] 10+ messages in thread
[parent not found: <mailman.6.1310512453.3639.dm-crypt@saout.de>]

end of thread, other threads:[~2011-07-14 13:42 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-11 22:03 [dm-crypt] Encrypted Raid1 or Raid 1 of encrypted devices? Laurence Darby
2011-07-12 11:32 ` Jorge Fábregas
2011-07-12 12:10   ` Milan Broz
2011-07-12 12:31     ` Arno Wagner
2011-07-12 23:14       ` Laurence Darby
2011-07-12 12:20 ` Arno Wagner
     [not found] <mailman.6.1310512453.3639.dm-crypt@saout.de>
2011-07-14  6:17 ` Yaron Sheffer
2011-07-14 11:01   ` Arno Wagner
2011-07-14 11:41     ` Roscoe
2011-07-14 13:42       ` Arno Wagner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.