Re: Got raid10 assembled wrong - how to fix?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux