Re: md: bug in file raid5.c, line 540 was: Re: Linux 2.4.22-rc1

From: Neil Brown
Date: Fri Aug 22 2003 - 00:31:26 EST


On Tuesday August 19, mfedyk@xxxxxxxxxxxxx wrote:
> On Tue, Aug 19, 2003 at 01:26:29PM -0700, Mike Fedyk wrote:
> > Details in dmesg output...
> >
>
> This didn't make it to the list because it was too big.
>
> compressing dmesg output, and here's an excerpt:
>
> At this point md0 had:
>
> md0 : active raid5 hda3[3] hdg3[1] hde3[0]
> 319388032 blocks level 5, 64k chunk, algorithm 0 [3/3] [UU_]
>
> Aug 18 18:29:29 srv-lr2600 kernel: md: trying to hot-add hda3 to md0 ...
> Aug 18 18:29:42 srv-lr2600 kernel: md: trying to hot-add hde3 to md0 ...
> Aug 18 18:29:44 srv-lr2600 kernel: md: trying to hot-add hdg3 to md0 ...
> Aug 18 18:36:25 srv-lr2600 kernel: md: trying to remove hda3 from md0 ...
>
> I thought I did a fail before the remove...
>
> Aug 18 18:36:25 srv-lr2600 kernel: md: cannot remove active disk hda3 from md0 ...
> Aug 18 18:36:34 srv-lr2600 kernel: md: bug in file raid5.c, line 540
> Aug 18 18:36:34 srv-lr2600 kernel:
>
> But why am I getting a bug message?

This bug could happen if you try to fail a device that is not active.
i.e. you do
"mdadm -f /dev/md0 /dev/hda3"
or "raidsetfaulty /dev/md0 /dev/hda3"
when /dev/hda3 is an idle spare or a failed drive that has been
replaced by a spare.
The BUG call can just be removed from that line.

NeilBRown
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/