Linux RAID subsystem development
 help / color / mirror / Atom feed
From: Wols Lists <antlists@youngman.org.uk>
To: Peter Sangas <pete@wnsdev.com>, linux-raid@vger.kernel.org
Subject: Re: Read data from disk that was part of RAID1 array
Date: Mon, 20 Mar 2017 19:33:46 +0000	[thread overview]
Message-ID: <58D02E9A.7080300@youngman.org.uk> (raw)
In-Reply-To: <006a01d2a1a0$ac148170$043d8450$@wnsdev.com>

On 20/03/17 17:37, Peter Sangas wrote:
>> From: Wols Lists [mailto:antlists@youngman.org.uk]
>> NEVER NEVER NEVER use --create !!!
>>
>>
>> Use something like --assemble --force, which will set up a working array
> if it can. 
> 
> OK, I tried this command but received an error:
> 
> mdadm --assemble --force  /dev/md10 /dev/sdc   
> 
> "Cannot assemble mbr metadata in /dev/sdc, no superblock"
> 
> What command do you suggest...?
> 
That makes it sound like something had trashed the superblock, or maybe
it was sdc1, or something. Anyways, it worked for you, so hopefully the
question is academic.
> 
> 
>> If that had been an old array, with a different offset or superblock or
> the like...
> 
> by "old" do you mean an array created using a different superblock format
> other than 1.2?
> 
Yes. The superblock format is v1. Whether it's v1.0, v1.1 or v1.2
depends on where the superblock is found. So if, for example, the array
had been created with a v1.0 superblock, the data would probably have
started at offset 2048, with the superblock at the end of the disk. v1.2
puts the superblock near the start, maybe offset 4096? So you would have
smashed some of your data, and also told the array to look in the wrong
place for the start of the data.

That's why --create is so dangerous - pick the wrong version and you can
damage the data, but even if you pick the right version, all the default
offsets and things have changed over the years (that's assuming they
haven't also been modified by general array management), so you can
easily lose where the data area starts.

Cheers,
Wol


      reply	other threads:[~2017-03-20 19:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-16 22:18 Read data from disk that was part of RAID1 array Peter Sangas
2017-03-16 22:31 ` Reindl Harald
2017-03-17 23:17 ` Peter Sangas
2017-03-19 10:18   ` Wols Lists
2017-03-20 17:37     ` Peter Sangas
2017-03-20 19:33       ` Wols Lists [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=58D02E9A.7080300@youngman.org.uk \
    --to=antlists@youngman.org.uk \
    --cc=linux-raid@vger.kernel.org \
    --cc=pete@wnsdev.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox