On 21/01/2013 20:41, Eddy Ilg|univation wrote:
Dear linux-raid users, I have a disk of a 2-disk RAID1 array with damaged superblock. Please forgive me if this question as already been asked, but as I am afraid of executing a dangerous command, I need to ask: To recover the superblock, I would run mdadm --create /dev/md2 --level=1 --raid-devices=2 /dev/sdb2 missing Is is correct, that this will NOT erase the data on /dev/sdb2?
As long as you're using the same mdadm version as the array was created with, and that is the create command used in the first place (apart from the "missing" bit of course), then yes.
If it's a different mdadm version, it may have a different default metadata type, so the new metadata might overwrite the original data area.
Different mdadm versions create arrays with different data offsets too, so even if the new create doesn't overwrite your old metadata, you may not be able to see your data (or at least, your filesystem may not be able to make sense of it).
So be sure to save a copy of `mdadm --examine /dev/sdb2` before you start, then check the man pages and release notes for the mdadm version(s) you're using.
Cheers, John. -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html