On 12/09/18 11:17, Mark Rogers wrote:
I have just moved two mdadm RAID1 arrays from an old server to a new one.
Initially mdadm automatically created two arrays (md126 & md127), read-only and marked resync=pending. I mounted these and they were fine.
I then stopped those arrays and rebuilt them manually as md0 & md1, and the resync started.
Neither will now mount; mdadm seems happy but there isn't a recognisable filesystem on either array. I have stopped both arrays while I try to work out what went wrong and whether I can fix it.
Suggestions?
Caveat: I am not a MDADM expert. Anything you do could destroy all the data permanently.
Read https://raid.wiki.kernel.org/index.php/RAID_Recovery and https://raid.wiki.kernel.org/index.php/Linux_Raid#When_Things_Go_Wrogn and google MDADM recovery.
If nothing works, as a last resort, you're probably in a situation where you just want to recover data. If you have nothing else to lose, and accepting that it's not my fault if something goes wrong, & I suggested you look elsewhere for help first.... ...you could try mounting each disk, one at a time into a degraded raid 1 array - i.e. it's expecting 2 (or more) disks but it knows one (or more) has failed. If you can mount a drive (preferably read-only) like this and see the contents of the disk, then you can copy that elsewhere, and then make a new raid array. You can try it for each drive individually.
All the important data is backed up elsewhere but there's a lot of unimportant stuff that I'd nevertheless prefer to retrieve if I can. (Several TB of applications, distros, etc which can all be retrieved from the Internet if needed, which is why I don't waste space backing them up, but I'd still rather not have to throw them away and start again if I can avoid it.)
One thought, although I'm fairly sure this isn't what happened, is that because I have two raid arrays I might have mixed my disks up when I created my new arrays (one of each in each). I would have thought that mdadm would have tried very hard to stop me doing that though?
mdadm is quite powerful but I personally don't think it's very user friendly (probably because I don't understand it enough). I think it's probably quite easy to create a new raid array erasing an old one, rather than mounting & resyncing an old one. I guess that that is the most likely possibility. I'm intrigued why the first time the raid arrays mounted read-only and resyncing. That suggests to me there was already some sort of failure.
Anyhoo - good luck!
Steve