All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Soltys <soltys@ziu.info>
To: Ben Beuchler <insyte@gmail.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: migrate single disk to RAID 1?
Date: Tue, 14 Jul 2009 18:15:04 +0200	[thread overview]
Message-ID: <4A5CAF08.1080408@ziu.info> (raw)
In-Reply-To: <479b70ed0907140844p16b0081fh28bb1386a28afb1a@mail.gmail.com>

Ben Beuchler wrote:
>>> 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
> 
> Right; for this particular application I'm willing to give up
> superblocks.  Just to be 100% sure, thought:  the way I've described
> the process would be non-destructive of the data on sdb4?
> 
> Thanks!

Actually, if on that sdb4 is a shrinkable filesystem, you can create md 
raid with superblock at the end. So the process would be something like:

- resize2fs filesystem on sdb4 a bit (shrink)
- mdadm stuff with e.g. 1.0 superblock
- resize2fs filesystem again, this time on md0

According to md(4) you shouldn't need to shrink more than 128KB, but be 
sure to get a healthy margin. Or do simple test with some tiny 
partition, or md-on-lvm.

      parent reply	other threads:[~2009-07-14 16:15 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
2009-07-14 15:44   ` Ben Beuchler
2009-07-14 16:00     ` Robin Hill
2009-07-14 16:15     ` Michal Soltys [this message]

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=4A5CAF08.1080408@ziu.info \
    --to=soltys@ziu.info \
    --cc=insyte@gmail.com \
    --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.