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

Neil Brown
2002-11-05T19:30:33Z

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);