linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robin Hill <robin@robinhill.me.uk>
To: Andris Berzins <pkix@inbox.lv>
Cc: Mikael Abrahamsson <swmike@swm.pp.se>, linux-raid@vger.kernel.org
Subject: Re: failed raid re-create changed dev size
Date: Tue, 11 Dec 2012 09:27:10 +0000	[thread overview]
Message-ID: <20121211092710.GA28593@cthulhu.home.robinhill.me.uk> (raw)
In-Reply-To: <1355216495.50c6f66f123b1@mail.inbox.lv>

[-- Attachment #1: Type: text/plain, Size: 2365 bytes --]

On Tue Dec 11, 2012 at 11:01:35AM +0200, Andris Berzins wrote:

> Quoting "Mikael Abrahamsson" <swmike@swm.pp.se>:
> > On Tue, 11 Dec 2012, Andris Berzins wrote:
> > 
> >> I found on internet that this can be fixed if I re-create raid with the same
> >> configuration, but with dead drive set as 'missing'.
> > 
> > This is extremely dangerous. You would have been better off by first
> > trying --assemble --force.
> > 
> >> However, I can not mount md1 and looks like it contains random data. The
> >> order is correct. However, I noticed that new raid device size is
> >> different from old one.
> > 
> > Your data offset is different, most likely you're not using the same mdadm
> > version as was initially used to create the raid. Mdadm defaults have
> > changed over time regarding chink size, data offset and others.
> 
> Thank you!
> I did not notice that.
> Looks that I will have to try downgrade kernel:
> http://serverfault.com/questions/427683/what-parameters-to-mdadm-to-re-create-md-device-with-payload-starting-at-
> 0x2200
> 
No, that's an entirely unrelated issue (though if you are running one of
the affected kernel versions you really ought to up/downgrade it).

> 
> > 
> > I don't know off the top of my head how to change the mdadm data offset
> > unfortunately.
> > 
There's no way in the current mdadm releases to do so. Neil does have a
version in git which will allow specifying the data offsets on a
disk-by-disk basis (as it is possible to have multiple offsets within an
array). If all the disks in your array were using an offset of 2048
though, then you'll just need to downgrade mdadm to 3.2.3 (or slightly
earlier) - from what I can find it was changed to 262144 for 3.2.4 (it
was 272 pre version 3.0, so don't go any further back than that).

You will likely have lost some data though, as the new superblocks will
have overwritten part of the data, so make sure you run a fsck
afterwards (start with fsck -n though, to make sure the overall array
looks okay first).

Good luck (and please make sure you try just forcing an assemble next
time),
    Robin
-- 
     ___        
    ( ' }     |       Robin Hill        <robin@robinhill.me.uk> |
   / / )      | Little Jim says ....                            |
  // !!       |      "He fallen in de water !!"                 |

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2012-12-11  9:27 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-10 23:37 failed raid re-create changed dev size Andris Berzins
2012-12-11  8:15 ` Mikael Abrahamsson
2012-12-11  9:01   ` Andris Berzins
2012-12-11  9:27     ` Robin Hill [this message]
2012-12-11 14:35       ` Andris Berzins
2012-12-11 14:49         ` Robin Hill
2012-12-12 16:10           ` Andris Berzins
2012-12-13  9:30             ` Robin Hill
2012-12-13 16:13               ` Andris Berzins
2012-12-12  1:04         ` Brad Campbell

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=20121211092710.GA28593@cthulhu.home.robinhill.me.uk \
    --to=robin@robinhill.me.uk \
    --cc=linux-raid@vger.kernel.org \
    --cc=pkix@inbox.lv \
    --cc=swmike@swm.pp.se \
    /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;
as well as URLs for NNTP newsgroup(s).