Re: grow problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday May 11, johnm@xxxxxxxxxxx wrote:
> 
> Probably unrelated but I'll pass it on just in case it's useful.
> 
> Added to md0 with no problem.
> When added to md1 got a kernel panic.
> Happened to have serial console logging to this is what is says:

Thanks.  I'm pretty sure I know what happened here:

raid1 maintains a concept of the "last_used" drive and it starts
search from there.
The Oops happened in sync_request at:
	disk = conf->last_used;
	/* make sure disk is operational */

	while (conf->mirrors[disk].rdev == NULL ||
	       !conf->mirrors[disk].rdev->in_sync) {
		if (disk <= 0)
			disk = conf->raid_disks;
		disk--;
		if (disk == conf->last_used)
			break;
	}

'rdev' is not NULL, it is 0xFFFF, do dereferencing ->in_sync from
there caused the oops.
last_used must have been '2', but you just reduced the size of the
array to only have 2 devices, so only '0' and '1' are valid.  '2' fell
off the end of the array.

I'll fix it in the next patchset.

Thanks again,
NeilBrown
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux