I accidentally opened my 1 disk raid1 as raid0 with mdadm --create, and this looks like it overwrote the default raid meta info, and makes my device detected as raid0 with mdadm --assemble --scan. For obvious reasons I can't see my partition currently, so I'm sure I didn't write anything to the partition.
Is there a safe way to get that 1 disk raid1 back without losing data on my disk?
Many thanks, Clooney
Thanks for the quick replies. I may have not been specific enough, let me fix that.
Scenario: - I have a raid1 where sda1 and sdb1 are in /dev/md0, operating fine. - My sdb starts failing, so I remove sdb and take it back to get my warranty in place. - I boot from my rescure CD which confuses my drives order: I have 2 sata ports on my mb and 4 other sata ports on a Sil SATA card, i.e. the difference when loaded as a kernel module vs compiled into the kernel can cause such things - so after all i make the mistake to say mdadm --create /dev/md1 --level=0 --raid-devices=1 /dev/sda1 -f and have my md1 created I figure the mixup.
I did not wipe the partition containing my raid1 data. I did not create a new filesystem (as I realized hopefully on time).
However I noticed that mdadm metadata may have been changed to v1.2 - which I believe means nothing else but it's kept elsewhere - making me also think that the previous raid meta info should be still available.
So the real questions behind this are: What does mdadm --create do exactly? Would mdadm --create /dev/md0 --level=0 on the same partition solve this or would it result in an even bigger trouble? Can I, and if so how, find the previous meta data (which I didn't see any indication of getting deleted/wiped/etc) and use it to reconstruct my faulty /dev/md0?