linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: NeilBrown <neilb@suse.de>
To: Veedar Hokstadt <veedar@gmail.com>
Cc: "linux-raid@vger.kernel.org" <linux-raid@vger.kernel.org>
Subject: Re: Is there a tool to examine raw metadata?
Date: Thu, 21 Nov 2013 14:36:01 +1100	[thread overview]
Message-ID: <20131121143601.02e72a18@notabene.brown> (raw)
In-Reply-To: <CANb3qHfWJp4ana76ap8YBaVJfCfmUS8FUATYS9YrAgJ9JrfLCQ@mail.gmail.com>

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

On Wed, 20 Nov 2013 13:26:10 -0500 Veedar Hokstadt <veedar@gmail.com> wrote:

> Greetings,
> Consider a 3 drive RAID5 where each drive has lost it's partitioning
> info. Running mdadm -E does not find a superblock. But using hexedit
> an mdadm superblock can be found in tact near the end of each drive.
> 
> Is there perhaps a tool I can point at the superblock to decode it? Or
> trick mdadm into reporting the contents of the superblock?
> 
> I know I can look at the superblock format doc and translate it by
> hand but I was hoping for an easier way.   Thanks for any help.  -V
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

If you use losetup to create a device pointing to the original but with an
offset to match where you think the partition was, then run "mdadm -E" on the
loop device.

You could probably do:

 for i in {1..1000}
 do
  losetup -o $i /dev/loop0 /dev/whatever
  echo $i
  mdadm -E /dev/loop0
  mdadm -d /dev/loop0
 done

NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

      reply	other threads:[~2013-11-21  3:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-20 18:26 Is there a tool to examine raw metadata? Veedar Hokstadt
2013-11-21  3:36 ` NeilBrown [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=20131121143601.02e72a18@notabene.brown \
    --to=neilb@suse.de \
    --cc=linux-raid@vger.kernel.org \
    --cc=veedar@gmail.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;
as well as URLs for NNTP newsgroup(s).