All of lore.kernel.org
 help / color / mirror / Atom feed
From: berk walker <berk@panix.com>
To: John Robinson <john.robinson@anonymous.org.uk>
Cc: Ben Beuchler <insyte@gmail.com>, linux-raid@vger.kernel.org
Subject: Re: migrate single disk to RAID 1?
Date: Tue, 14 Jul 2009 07:13:08 -0400	[thread overview]
Message-ID: <4A5C6844.903@panix.com> (raw)
In-Reply-To: <4A5C588D.4000400@anonymous.org.uk>

John Robinson wrote:
> On 14/07/2009 08:16, Ben Beuchler wrote:
>> I'd like to convert an existing partition to RAID 1 using a portion of
>> a new, blank drive.  All of the examples I've seen involve creating
>> the RAID device with the *empty* partition (sda4), copying the data
>> from the old partition to the new RAID, then adding the old partition
>> to the RAID set.
>>
>>> From my modest understanding of how linux software RAID works, it
>> seems I should be able to take an existing partition containing data
>> (in this case sdb4 mounted as /mail) and build a RAID 1 array with
>> something similar to this:
>>
>> umount /dev/sdb4
>> mdadm --build /dev/md0 --level=1 -n2 /dev/sdb4 missing
>> mount /dev/md0 /mail
>> mdadm --add /dev/md0 /dev/sda4
>>
>> Will that work?  Or am I misunderstanding something fundamental?
>
> It'll work but you'll be using a legacy array without superblocks, so 
> you can't have various features that come with superblocks like being 
> recognisable or having a write-intent bitmap, which is why most guides 
> suggest you --create an array with a blank partition then copy the 
> data. The man page says of build mode:
>   Build an array that doesn’t  have  per-device  superblocks.
>   For  these  sorts  of  arrays,  mdadm  cannot differentiate
>   between initial creation  and  subsequent  assembly  of  an
>   array.   It also cannot perform any checks that appropriate
>   components have been requested.  Because of this, the Build
>   mode  should  only  be used together with a complete under-
>   standing of what you are doing.
>
> Cheers,
>
> John.
> .
I think that after a --create, missing on the new drive, you would want 
to copy the contents of the original drive ,. Then add the original to 
the raid..
berk


--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-07-14 11:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-14  7:16 migrate single disk to RAID 1? Ben Beuchler
2009-07-14 10:06 ` John Robinson
2009-07-14 11:13   ` berk walker [this message]
2009-07-14 15:44   ` Ben Beuchler
2009-07-14 16:00     ` Robin Hill
2009-07-14 16:15     ` Michal Soltys

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=4A5C6844.903@panix.com \
    --to=berk@panix.com \
    --cc=insyte@gmail.com \
    --cc=john.robinson@anonymous.org.uk \
    --cc=linux-raid@vger.kernel.org \
    /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.