All of lore.kernel.org
 help / color / mirror / Atom feed
* Recovering RAID1 superblock
@ 2013-01-21 20:41 Eddy Ilg|univation
  2013-01-21 21:09 ` John Robinson
  0 siblings, 1 reply; 2+ messages in thread
From: Eddy Ilg|univation @ 2013-01-21 20:41 UTC (permalink / raw)
  To: linux-raid

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?

Best regards,


Eddy Ilg

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Recovering RAID1 superblock
  2013-01-21 20:41 Recovering RAID1 superblock Eddy Ilg|univation
@ 2013-01-21 21:09 ` John Robinson
  0 siblings, 0 replies; 2+ messages in thread
From: John Robinson @ 2013-01-21 21:09 UTC (permalink / raw)
  To: Eddy Ilg|univation; +Cc: linux-raid

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.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-21 21:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-21 20:41 Recovering RAID1 superblock Eddy Ilg|univation
2013-01-21 21:09 ` John Robinson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.