Fixing your Linux software RAID array

On couple occasions I have had experience of RAID array going bezerk after a machine hosting that RAID array was rebooted or was shutdown uncleanly. As a result during boot software RAID would fail to initialize. Note I am not talking about file system being unclean but command raidstart /dev/md0 failing. As a result you have nothing since the RAID device hasn't been created. I was able to find an answer at the following URL

http://www.spinics.net/lists/raid/msg02546.html (I just trashed my RAID5 array - recovery possible?)

You will have to download mdadm utility that is available at

http://www.cse.unsw.edu.au/~neilb/source/mdadm/

Even though the above URL refers to RAID5 array I was able to use mdadm to fix a RAID0 array as well.
mdadm -A /dev/md1 --force /dev/sd[egik]1
Note however that you should use it at your own risk. This is has worked for me but there are no guarantees it will work for you as well. You may trash your RAID array completely. You have been warned.