Bug 71637

Summary: mkraid attempts to make the wrong raid device
Product: [Fedora] Fedora Reporter: Ben LaHaise <bcrl>
Component: raidtoolsAssignee: Arjan van de Ven <arjanv>
Status: CLOSED WONTFIX QA Contact: David Lawrence <dkl>
Severity: high Docs Contact:
Priority: high    
Version: rawhideCC: mcousin, oliva, w.henney
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-05 16:35:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
/etc/raidtab none

Description Ben LaHaise 2002-08-15 23:37:12 UTC
With the attached /etc/raidtab, mkraid /dev/md2 fails incorrectly:

[root@toforia root]# 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.)
[root@toforia root]# 

In otherwords, attempting to make the /dev/md2 device attempts to access
/dev/md0, which is frighteningly wrong.

Comment 1 Ben LaHaise 2002-08-15 23:39:06 UTC
Created attachment 70984 [details]
/etc/raidtab

Comment 2 Marc Cousin 2003-05-27 13:16:35 UTC
Just got bitten by the same problem 
 
shouldn't 
        for (p = cfg_head; p; p = p->next) { 
            if (strcmp(p->md_name, *args)) continue; 
            if (check_active(cfg)) 
                goto abort; 
            if (force_flag) { 
                fprintf(stderr, "DESTROYING the contents of %s in 5 seconds, 
Ctrl-C if unsure!\n", *args); 
 
become 
 
        for (p = cfg_head; p; p = p->next) { 
            if (strcmp(p->md_name, *args)) continue; 
            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); 
 
in mkraid.c ? 
 
It seems we're checking if the last of the list is up, every time (got the 
same problem with md2 here, which was at the end of the list too) 

Comment 3 Marc Cousin 2003-05-27 13:18:35 UTC
ok, should have checked a little bit further in bugzilla, it's a duplicate of 
73365 

Comment 4 Doug Ledford 2003-08-22 22:47:13 UTC
*** Bug 98609 has been marked as a duplicate of this bug. ***

Comment 5 Doug Ledford 2003-08-22 22:56:22 UTC
This looks obviously correct and has been committed to the upstream raidtools
sources.  The Red Hat raidtools package will have to be updated as well.  I've
added the fix to the current Red Hat raidtools package.  All versions after
1.00.3-6 and later have this fix in it.

Comment 6 Alexandre Oliva 2003-10-18 17:54:28 UTC
The bug is still present in Fedora Core test3, with raidtools-1.00.3-6.

Comment 7 Alexandre Oliva 2004-10-05 16:35:30 UTC
raidtools is gone from FC.  This appears to be fixed in RHEL3.