mdadm raid5 recover double disk failure – with a twist (drive order)

To answer your questions,

  1. Can it be restored?

    • First thing’s first – STOP, sit back and just think a little. Yes, algorithm, chunk size and disk order is vital to getting whatever filesystem that was present, to properly re-assemble. But since you’ve overwritten the superblocks, you’re now left with trial and error.
    • Second, is there any way you can retrieve the previous disk layout? I always do an mdadm –detail > backupfile just to keep that disk layout somewhere safe. Check dmesg, /var/log for any evidence of how the disks were configured in the raid.
    • Lastly, if you match the previous chunk size and disk order, you may have damaged the ext4 superblock – there are ways to quckly scan for other superblocks (and there’s a nifty program called TestDisk that scans for superblocks of existing filesystems and tries to browse them manually: http://www.cgsecurity.org/wiki/Main_Page)
  2. Since sdc is new, I would continue to try and assemble manually via the missing clause, and yes, sde must be in the correct order for it to assemble in degraded mode. Once you find the correct layout – copy all data off the array and start again, documenting the layout (so you don’t run in to this issue again).

Good Luck

Leave a Comment