Re: How to recreate a dmraid RAID array with mdadm
From: Neil Brown <hidden>
Date: 2010-11-18 03:17:18
On Wed, 17 Nov 2010 22:03:41 -0500 Mike Viau [off-list ref] wrote:
quoted
On Thu, 18 Nov 2010 13:32:47 +1100 [off-list ref] wrote:quoted
./mdadm -Ss mdadm: stopped /dev/md127 ./mdadm -Asvvv mdadm: looking for devices for further assembly mdadm: no RAID superblock on /dev/dm-3 mdadm: /dev/dm-3 has wrong uuid. want UUID-084b969a:0808f5b8:6c784fb7:62659383 Segmentation faultTry this patch instead please.Applied new patch and got: ./mdadm -Ss mdadm: stopped /dev/md127 ./mdadm -Asvvv mdadm: looking for devices for further assembly mdadm: no RAID superblock on /dev/dm-3 mdadm: /dev/dm-3 has wrong uuid. want UUID-084b969a:0808f5b8:6c784fb7:62659383 tst=0x10dd010 sb=(nil) Segmentation fault
Sorry... I guess I should have tested it myself..
The
if (tst) {
Should be
if (tst && content) {
NeilBrown
Again tried various buffer sizes (segfault above was with char buf[200];)
if (ident->uuid_set && (!update || strcmp(update, "uuid")!= 0) &&
(!tst || !tst->sb ||
same_uuid(content->uuid, ident->uuid, tst->ss->swapuuid)==0)) {
if (report_missmatch) {
char buf[1<<16];
fprintf(stderr, Name ": %s has wrong uuid.\n",
devname);
fprintf(stderr, " want %s\n", __fname_from_uuid(ident->uuid, 0, buf, ':'));
fprintf(stderr, " tst=%p sb=%p\n", tst, tst?tst->sb:NULL);
if (tst) {
fprintf(stderr, " have %s\n", __fname_from_uuid(content->uuid, 0, buf, ':'));
fprintf(stderr, " metadata=%s\n", tst->ss->name);
}
}
goto loop;
}
-- 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