From: Laurence Darby <ldarby@tuffmail.com>
To: dm-crypt@saout.de
Subject: [dm-crypt] Encrypted Raid1 or Raid 1 of encrypted devices?
Date: Mon, 11 Jul 2011 23:03:12 +0100 [thread overview]
Message-ID: <20110711230312.9833b94d.ldarby@tuffmail.com> (raw)
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
next reply other threads:[~2011-07-11 22:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-11 22:03 Laurence Darby [this message]
2011-07-12 11:32 ` [dm-crypt] Encrypted Raid1 or Raid 1 of encrypted devices? 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110711230312.9833b94d.ldarby@tuffmail.com \
--to=ldarby@tuffmail.com \
--cc=dm-crypt@saout.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox