Quote:
mdadm --force is a scary thing to use late at night trying to recover the array.


Yep - been there...

One of my motivations for the wiki was to try and gather best-practices to explain what you should do in this situation.

Oh, and 'this situation" is usually a catastrophic failure where you've lost multiple drives at once or in a cascade. Your array is dead, dead, dead. You have blown the redundancy you designed in (ie you lost 3+ drives in a RAID6 array).

You have however done data-recovery using ddrescue and friends and there is a chance that you can recover something - try *that* on a hardware raid

I think I'm right in saying that if you use --force it will recreate your superblocks and not touch your data.
If you get it wrong you re-run it with different parameters until it works.

**BUT**
If, for some reason the kernel thinks that your array needs 'synchronising' then it will start writing all over your data and 'goodnight Vienna'.
So it's a good idea to use --force with the 'missing' keyword to assemble the array in 'degraded' mode. That way you can try a read-only mount and see if there is anything resembling a filesystem there...

This kind of stuff is what I want to put up on the wiki after running it by the list.

The linux-raid list (http://vger.kernel.org/majordomo-info.html) is a very friendly and helpful place BTW - far less busy than lkml and much more newbie-friendly - do pop in if you have any raid or recovery questions...


PS My favourite HW raid issues: when your raid card goes titsup - how much are they? Do they even make those Adaptec raid cards you bought 4 years ago? Are the new ones compatible? What happens if you can't get a disk that's *exactly* the same anymore?
_________________________
LittleBlueThing Running twin 30's