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

Re: Mdadm won't rebuild a RAID5



On Saturday 18 August 2007 01:51, Hal Vaughan wrote:
> I have a RAID5 on 3 drives with a spare.  One drive failed and it
> rebuilt itself using the spare, then, before I could replace the spare,
> a 2nd drive failed.  I shut it down, got some new drives (bigger to be
> sure they weren't too small, allowing for differences in drive sizes
> reported by drive makers), replaced the bad drives, and rebuilt the
> spare with no problem at all.  Last night there were thunderstorms all
> night and the computer lost power a few times (yes, normally it's
> plugged in to a UPS, that's a long story that doesn't effect anything
> here).

(big snip)

> I notice the information changes from drive to drive and is
> inconsistent.
>
> Mdadm is not telling me which drives are bad when it assembles the array
> and I want to verify what is going on.  I'd like to get more info to
> see if mdadm "officially" sees drives e and f as bad or just drive e,
> or none at all (since reports vary according to the drive).
>
> I would have thought, after the first issue with any drive, that the
> system would not have had the others in use, since, when booting, it
> would have waited for me to hit "Control-D to continue," so I doubt
> that there are actually two bad drives.
>
> Any ideas how I can get more information, find out why mdadm is not
> rebuilding the RAID or to get it to rebuild it?  It seems to think the
> drives are all okay when it's adding them and doesn't report any issues
> with any drives until it's done, then it says there aren't enough
> drives to start the RAID.

1) I don't see that any of your drives are "bad".  However they are so
   inconsistent that data recovery is unlikely.

2) If you just need to assemble the array and are not worried about
   recovering the data, I would suggest zeroing each drive's superblock
   using mdadm and then creating a new array.

3) RAID 5 is not resilient against multiple failures.  We now use RAID 1.
   RAID 1 is also faster, although it sometimes requires more drives.
   In extreme cases we use RAID 1 with three or more drives.

4) With four drives, rather than RAID 5 with a hot spare, I would create
   two RAID 1 arrays.  One could then combine them in RAID 0 or linear
   but I would choose to make them be PVMs in a LVM VG.

--Mike Bird



Reply to: