Re: Reconfiguring one SW-RAID when other RAIDs are running

Neil Brown (neilb@cse.unsw.edu.au)
Wed, 6 Nov 2002 06:36:58 +1100


On Monday November 4, hpa@zytor.com wrote:
> Hi all,
>
> I'm trying to re-create a RAID while leaving the other RAIDs --
> including the root filesystem -- running, but mkraid refuses to run:
>
> hera 1 # mkraid /dev/md2
> /dev/md0: array is active -- run raidstop first.
> mkraid: aborted.
> (In addition to the above messages, see the syslog and /proc/mdstat as well
> for potential clues.)

My guess is that the following patch would fix it, but I haven't
tested it.

NeilBrown

--- mkraid.c 2002/11/05 19:34:57 1.1
+++ mkraid.c 2002/11/05 19:35:29
@@ -244,7 +244,7 @@ int main (int argc, char *argv[])
while (*args) {
for (p = cfg_head; p; p = p->next) {
if (strcmp(p->md_name, *args)) continue;
- if (check_active(cfg))
+ if (check_active(p))
goto abort;
if (force_flag) {
fprintf(stderr, "DESTROYING the contents of %s in 5 seconds, Ctrl-C if unsure!\n", *args);

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