From: Neil Brown <neilb@suse.de>
To: Nagilum <nagilum@nagilum.org>
Cc: linux-raid@vger.kernel.org
Subject: Re: Help RAID5 reshape Oops / backup-file
Date: Tue, 16 Oct 2007 11:16:19 +1000 [thread overview]
Message-ID: <18196.4323.854776.966812@notabene.brown> (raw)
In-Reply-To: message from Nagilum on Monday October 15
Thanks for the extra details.
I still cannot manage to reproduce it which is frustrating, but I
think I can fix your array for you.
Get the source for mdadm 2.6.3, apply the following patch, then use
mdadm -A /dev/md0 --update=this /dev/sd[abcde]
that should re-write the part of the superblocks that is wrong, then
assemble the array.
Please let me know how it goes.
Also, if you could show me "mdadm.conf" and "mdrun.conf" from the
initrd, that might help.
Thanks,
NeilBrown
diff --git a/Grow.c b/Grow.c
index 825747e..8ad1537 100644
--- a/Grow.c
+++ b/Grow.c
@@ -978,5 +978,5 @@ int Grow_restart(struct supertype *st, struct mdinfo *info, int *fdlist, int cnt
/* And we are done! */
return 0;
}
- return 1;
+ return 0;
}
diff --git a/mdadm.c b/mdadm.c
index 40fdccf..7e7e803 100644
--- a/mdadm.c
+++ b/mdadm.c
@@ -584,6 +584,8 @@ int main(int argc, char *argv[])
exit(2);
}
update = optarg;
+ if (strcmp(update, "this")==0)
+ continue;
if (strcmp(update, "sparc2.2")==0)
continue;
if (strcmp(update, "super-minor") == 0)
diff --git a/super0.c b/super0.c
index 0396c2c..e33e623 100644
--- a/super0.c
+++ b/super0.c
@@ -394,6 +394,21 @@ static int update_super0(struct mdinfo *info, void *sbv, char *update,
fprintf (stderr, Name ": adjusting superblock of %s for 2.2/sparc compatability.\n",
devname);
}
+ if (strcmp(update, "this") == 0) {
+ /* to fix a particular corrupt superblock.
+ */
+ int i;
+ for (i=0; i<10; i++)
+ if (sb->disks[i].major == sb->this_disk.major &&
+ sb->disks[i].minor == sb->this_disk.minor) {
+ if (sb->this_disk.number == sb->disks[i].number)
+ break;
+ fprintf(stderr, Name ": Setting this disk from %d to %d\n",
+ sb->this_disk.number, sb->disks[i].number);
+ sb->this_disk = sb->disks[i];
+ break;
+ }
+ }
if (strcmp(update, "super-minor") ==0) {
sb->md_minor = info->array.md_minor;
if (verbose > 0)
next prev parent reply other threads:[~2007-10-16 1:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-11 12:25 Help RAID5 reshape Oops / backup-file Nagilum
2007-10-11 23:51 ` Neil Brown
2007-10-12 6:43 ` Nagilum
2007-10-14 16:55 ` Nagilum
2007-10-14 23:31 ` Neil Brown
2007-10-15 11:55 ` Nagilum
2007-10-15 12:08 ` Nagilum
2007-10-16 1:16 ` Neil Brown [this message]
2007-10-16 12:50 ` Nagilum
2007-10-17 13:13 ` Nagilum
-- strict thread matches above, loose matches on Subject: below --
2007-10-09 18:58 Nagilum
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=18196.4323.854776.966812@notabene.brown \
--to=neilb@suse.de \
--cc=linux-raid@vger.kernel.org \
--cc=nagilum@nagilum.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox