linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Neil Brown <neilb@suse.de>
To: David Greaves <david@dgreaves.com>
Cc: "Lasse Kärkkäinen" <tronic+owm8@trn.iki.fi>, linux-raid@vger.kernel.org
Subject: Re: Manually hacking superblocks
Date: Fri, 13 Apr 2007 22:17:21 +1000	[thread overview]
Message-ID: <17951.29905.260517.958206@notabene.brown> (raw)
In-Reply-To: message from David Greaves on Friday April 13

On Friday April 13, david@dgreaves.com wrote:
> Lasse Kärkkäinen wrote:
> > 
> > disk 0, o:1, dev:sdc1
> > disk 1, o:1, dev:sde1
> > disk 2, o:1, dev:sdg1
> > disk 3, o:1, dev:sdi1
> > disk 4, o:1, dev:sdh1
> > disk 5, o:1, dev:sdf1
> > disk 6, o:1, dev:sdd1
> > 
> > I gather that I need a way to alter the superblocks of sde and sdd so
> > that they seem to be clean up-to-date disks, with their original disk
> > numbers 1 and 6. A hex editor comes to mind, but are there any better
> > tools for that?
> 
..
> 
> I *THINK* you should try something like (untested):
> mdadm --assemble /dev/md0 --force /dev/sdc1 /dev/sde1 /dev/sdg1 /dev/sdi1
> missing /dev/sdf1 /dev/sdf1
> 
> The order is important and should match the original order.
> There's more you could do by looking at device event counts (--examine)

You will need a --create

--assemble ignores the order in which the devices are given.  It uses
the information on the drives.  Once you do a --add, you lose that
information.
It is good that you know the original order.  You --examine the
confirm the chunk size or any other details you might not be sure of
and recreate the array.  Leave one disk (the least likely to be
uptodate) as 'missing' and then try 'fsck -n' to ensure the data is
ok.

NeilBrown
-
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

  reply	other threads:[~2007-04-13 12:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-13  8:11 Manually hacking superblocks Lasse Kärkkäinen
2007-04-13 10:23 ` David Greaves
2007-04-13 12:17   ` Neil Brown [this message]
2007-04-14 15:17     ` Lasse Kärkkäinen

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=17951.29905.260517.958206@notabene.brown \
    --to=neilb@suse.de \
    --cc=david@dgreaves.com \
    --cc=linux-raid@vger.kernel.org \
    --cc=tronic+owm8@trn.iki.fi \
    /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).