linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trevor Cordes <trevor@tecnopolis.ca>
To: Adam Thompson <athompso@athompso.net>
Cc: Continuation of Round Table discussion <roundtable@muug.ca>,
	linux-raid@vger.kernel.org
Subject: Re: [RndTbl] Big-endian RAID5 recovery problem
Date: Tue, 2 May 2017 02:29:26 -0500	[thread overview]
Message-ID: <20170502022926.20938dd5@pog.tecnopolis.ca> (raw)
In-Reply-To: <5c6e6e5d93d4056839e4f370e00a8e08@mail.athompso.net>

On 2017-05-01 Adam Thompson wrote:
> The problem is that the disks use the v0.90 metadata format, and they 
> came from a big-endian system, not a little-endian system.  MD 
> superblocks *since* v0.90 are endian-agnostic, but back in v0.90, the 
> superblock was byte-order specific.

This may sound crazy, but conceivably you could (using the md source
code) find where the superblock lives (just the first copy should be
enough), hex edit the superblock and (again using the source) swap
bytes around to change the endian-ness.  Then make sure any future
mdadm commands are just using the first superblock (which I think is
the default).

If there's some kind of checksum involved, then the endian-ness may
affect it (??), and fudging that may be quite difficult (compared to
finding a big-endian box out there to borrow instead!).

No matter what you do, I would instantly dd each real disk into files
in your own big fs and work on the copies.  No reason to ever write to
the originals, keep them as backups.  I *think* you can use mdadm on
plain files(??) otherwise I guess you could subpartition a big disk.
Ya, it will be cheesy to run RAID5 all off of 1 disk, but in this case
performance won't be critical.

Lastly, I would make sure to start the array in such a way that for
sure it won't resync, so either get all 3 preset perfectly, or leave 1
as missing, or I think there's a command to not start if it would
result in a dirty array.

  parent reply	other threads:[~2017-05-02  7:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-01 21:39 Big-endian RAID5 recovery problem Adam Thompson
2017-05-01 21:59 ` Anthony Youngman
2017-05-01 22:33   ` Adam Thompson
2017-05-02  2:47     ` Phil Turmel
2017-05-02  7:29 ` Trevor Cordes [this message]
2017-05-02  8:59 ` Roman Mamedov
2017-05-05 19:22   ` [RndTbl] " Adam Thompson
2017-05-06  5:57 ` NeilBrown
2017-05-06  6:41   ` [RndTbl] " Trevor Cordes
2017-05-07 23:40     ` [mdadm PATCH] Mention "endian" in documentation for --update=byte-order NeilBrown
2017-05-08 17:42       ` Jes Sorensen

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=20170502022926.20938dd5@pog.tecnopolis.ca \
    --to=trevor@tecnopolis.ca \
    --cc=athompso@athompso.net \
    --cc=linux-raid@vger.kernel.org \
    --cc=roundtable@muug.ca \
    /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).