All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arno Wagner <arno@wagner.name>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] filesystem conversion guidance needed
Date: Thu, 28 Feb 2013 15:47:25 +0100	[thread overview]
Message-ID: <20130228144725.GA18930@tansi.org> (raw)
In-Reply-To: <alpine.LRH.2.00.1302280828010.6329@rray.drdc.mstc.ms.gov>

While it is possible to do something like this in-place,
any mistake can permanentely destroy all your data. So an
absolute requirement is a complete backup (see FAQ for tips for 
secure backup).

Now, swap is usually not put on RAID, so you can just let 
it be as it is.

For the others, encryption is usually placed on top of
RAID, so here is what you can do:

1. Make degraded RAID1 partitions on the new drive
   (put in "missing" for the missing partitions.
2. Copy the data over.
3. Reboot using the new RAID devices for boot/root
4. Sync the old partitions into the RAID devices.

Notes:
- You need to make the new partitions exactly (!) the
  same size as the old ones aor smaller. Or you
  need to repartition the old drive between steps
  3. and 4. accordingly
- I recomend using partition type 0xfb end kernel-level
  autodetection. For this to work, you have to use
  MD superblock version 0.90.

Gr"usse,
Arno   


On Thu, Feb 28, 2013 at 08:37:21AM -0600, lxnf98mm@gmail.com wrote:
> I have a setup with 1 drive
> The root, swap, and data partitions are encrypted
> I want to add a second drive and convert all partitions to raid 1 encrypted
> Can I do this conversion safely or do I need to start from scratch
> If so I would appreciate a bit of procedure guidance
> I have
> 
> Debian 6.0.5
> kernel 3.4.4
> cryptsetup 1.4.1
> 
> Thanks
> Richard
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt

-- 
Arno Wagner,     Dr. sc. techn., Dipl. Inform.,    Email: arno@wagner.name
GnuPG: ID: CB5D9718  FP: 12D6 C03B 1B30 33BB 13CF  B774 E35C 5FA1 CB5D 9718
----
One of the painful things about our time is that those who feel certainty
are stupid, and those with any imagination and understanding are filled
with doubt and indecision. -- Bertrand Russell

  reply	other threads:[~2013-02-28 14:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-28 14:37 [dm-crypt] filesystem conversion guidance needed lxnf98mm
2013-02-28 14:47 ` Arno Wagner [this message]
2013-02-28 15:01   ` lxnf98mm
2013-02-28 16:00     ` Arno Wagner
2013-02-28 16:12       ` lxnf98mm
2013-03-06 14:25       ` lxnf98mm
2013-03-06 18:47         ` 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=20130228144725.GA18930@tansi.org \
    --to=arno@wagner.name \
    --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 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.