Re: Raid 5 rebuild with only 2 spare devices

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

 



On 02/12/2011 01:30 PM, Thomas Heilberg wrote:
> 2011/2/10 John Robinson <john.robinson@xxxxxxxxxxxxxxxx>:
> 
>> Those loop devices are now trashed since you didn't re-create the array with
>> exactly the parameters with which it was initially created. Your settings
>> make me think the array was created with an older version of mdadm; the
>> defaults for metadata version and chunk size changed a little while ago.
>> Anyway, if you're trying again, you should specify -e 0.90 -c 64. While
>> you're at it, add --assume-clean to avoid any rebuild, which in your case
>> may in fact destroy good data (though the array's parity would end up
>> consistent). Or if as you noted in your other reply you're going to have to
>> wait 15 hours before trying anything, maybe wait until The Boss[1] makes a
>> more intelligent suggestion than I can; he usually posts at times that
>> appear to be overnight to me but are presumably sensible times of day for
>> him.
> 
> It worked! Although I am not quite sure why.

Wonderful!

[trim /]
 
> But there is one thing I don't understand. I did that recreating act 2
> times. The first time it didn't work and I had to restore the
> raid-partitions from my backup(this time onto a btrfs partition in the
> hope I could use its snapshot feature) and then it worked. Is it
> possible that the order of the devices is important for the recreate
> process?
> I mean mdadm -C... /dev/loop1 /dev/loop0 /dev/loop2 instead of the
> normal order? Because I did that by mistake(or to be more precise I
> "mounted" the second image into loop0)

Yes, the order of devices matters for "create".  With the original images, "mdadm -E" on each should report which "slot" or raid device number they expect to be.  That's used in normal assembly to keep everything in order (the kernel doesn't guarantee consistent block device names or load order).

So, if you are recreating an array (with --assume-clean), you need to specify them in the same order that "mdadm -E" sees.

Phil
--
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