linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Tokarev <mjt@tls.msk.ru>
To: George Spelvin <linux@horizon.com>
Cc: linux-raid@vger.kernel.org
Subject: Re: Got raid10 assembled wrong - how to fix?
Date: Wed, 13 Feb 2008 12:16:47 +0300	[thread overview]
Message-ID: <47B2B57F.6000800@msgid.tls.msk.ru> (raw)
In-Reply-To: <20080212165900.15511.qmail@science.horizon.com>

George Spelvin wrote:
> I just discovered (the hard way, sigh, but not too much data loss) that a
> 4-drive RAID 10 array had the mirroring set up incorrectly.
> 
> Given 4 drvies A, B, C and D, I had intended to mirror A<->C and B<->D,
> so that I could split the mirror and run on either (A,B) or (C,D).
> 
> However, it turns out that the mirror pairs are A<->B and C<->D.  So
> pulling both A and B off-line results in a non-functional array.
> 
> So basically what I need to do is to decommission B and C, and rebuild
> the array with them swapped: A, C, B, D.
> 
> Can someone tell me if the following incantation is correct?
> 
> mdadm /dev/mdX -f /dev/B -r /dev/B
> mdadm /dev/mdX -f /dev/C -r /dev/C
> mdadm --zero-superblock /dev/B
> mdadm --zero-superblock /dev/C
> mdadm /dev/mdX -a /dev/C
> mdadm /dev/mdX -a /dev/B

That should work.

But I think you'd better just physically swap the drives instead -
this way, no rebuilding the array will be necessary, and your data
will be safe all the time.

/mjt

      reply	other threads:[~2008-02-13  9:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-12 16:59 Got raid10 assembled wrong - how to fix? George Spelvin
2008-02-13  9:16 ` Michael Tokarev [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=47B2B57F.6000800@msgid.tls.msk.ru \
    --to=mjt@tls.msk.ru \
    --cc=linux-raid@vger.kernel.org \
    --cc=linux@horizon.com \
    /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;
as well as URLs for NNTP newsgroup(s).