Oh carp, destroyed my MDADM array??

Associate
Joined
9 Nov 2005
Posts
767
Location
places..
I noticed That my Raid1 array was missing a Disk it appeared as .

So i didnt think anything of doing a quick

PHP:
mdadm --grow /dev/mdX --raid-devices=2

and then:

PHP:
mdadm --add /dev/mdx /dev/sdx

I then left it to sync up, happy days.

But I added the block device; i.e. /dev/sdb NOT the partition ie /dev/sdb1 (how did this work?)

Now when I attempt to mount the array, it fails as the partition ID is fd (linux raid autodetect :() and not 83 (linux).

will this have nuked my actual data, or can I change the partition id using sfdisk?

Any Gurus here any ideas? I'd rather have NOT lost it! :)
 
Associate
OP
Joined
9 Nov 2005
Posts
767
Location
places..
Thanks KIA,

I'm gonna try those tools, and ad them to my arsenal if they're good, have you used them much ?? But I take it you think it's deffo destroyed, I've a feeling i might be able to change the partition ID and sort it?

And would those tools work with MDADM based RAID ?

Again thanks.
 
Soldato
Joined
22 Dec 2008
Posts
10,370
Location
England
I'm not entirely clear what you've done. However, given it's a raid 1, I think I'd unplug all the drives bar one and try to mount it in isolation. If that works, there's your data. If not, try the next drive. Write zeros over whichever drive refused to mount and then recreate the array.
 
Back
Top Bottom