All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rolf Eike Beer <eike-kernel@sf-tec.de>
To: Shaohua Li <shli@kernel.org>
Cc: Adam Thompson <athompso@athompso.net>, linux-raid@vger.kernel.org
Subject: Re: Big Endian RAID discovery problem (metadata 1!)
Date: Fri, 30 Jun 2017 12:23:02 +0200	[thread overview]
Message-ID: <5ad440930939d721bf43a8aedb3150d9@sf-tec.de> (raw)
In-Reply-To: <20170629215453.oswihni5xwcsbihq@kernel.org>

Am 2017-06-29 23:54, schrieb Shaohua Li:
> On Wed, Jun 28, 2017 at 10:14:21PM +0200, Rolf Eike Beer wrote:
>> Am Mittwoch, 28. Juni 2017, 13:55:09 schrieb Adam Thompson:
>> > If you search the archives, I had a very similar problem a few months ago.
>> > There is already an option to mdadm to update a v1 superblock in the wrong
>> > byte order.  It just wasn't obvious when looking at the mdadm man page.
>> > Going from memory, search for "byte order" instead of "endian" to find the
>> > option. -Adam
>> 
>> If you refer to --update=byteorder, the documentation says it is only 
>> for
>> v0.90 metadata. Also it's only the super_offset field so far, other 
>> fields like
>> magic are correct.
> 
> There are patches in this side to correctly handle endian:
> 
> 1345921393ba md: fix incorrect use of lexx_to_cpu in 
> does_sb_need_changing
> 3fb632e40d76 md: fix super_offset endianness in 
> super_1_rdev_size_change
> 
> probably we should make these into -stable tree, but I never got 
> reports on
> this side. can you try?

That likely is the problem, it was kernel 4.10.2 that was used when the 
array was expanded. Yes, this should really get backported. And 
something like "byteorder2" for mdadm to make it easier for people with 
such arrays to fix that would be awesome.

After changing the sb_offset and csum fields (and UUID, to avoid bad 
resync from the old member on sda2) and writing the sectors back my 
array now works again.

Eike

      reply	other threads:[~2017-06-30 10:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-28 16:46 Big Endian RAID discovery problem (metadata 1!) Rolf Eike Beer
     [not found] ` <AE3DE84B-9DF9-40DD-8DE2-1DD3D3CE3650@athompso.net>
2017-06-28 20:14   ` Rolf Eike Beer
2017-06-29 21:54     ` Shaohua Li
2017-06-30 10:23       ` Rolf Eike Beer [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=5ad440930939d721bf43a8aedb3150d9@sf-tec.de \
    --to=eike-kernel@sf-tec.de \
    --cc=athompso@athompso.net \
    --cc=linux-raid@vger.kernel.org \
    --cc=shli@kernel.org \
    /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 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.