From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux 2.4.2-2 i686; en-US; rv:0.9) Gecko/20010507 Description of problem: I had configured 12 RAID devices on a machine at installation time. I had set up / as /dev/md10 and /l as /dev/md11, and then 10 other RAID/ext2 partitions /l/md[0-9] as /dev/md[0-9]. Installation went fine, except that /l/md1 couldn't be created. After installation, I tried to create it by hand, to no avail. mkraid /dev/md1 would say the raid device was active, but it didn't appear in /proc/mdstat and raidstop wouldn't stop it. As soon as I replaced /dev/md1 with /dev/md12 in /etc/raidtab, I could create the device and everythign was fine. My guess is that the existence of a /dev/md10, started before /dev/md1 because md10 contains the root device, causes /dev/md1 to not work correctly, because md1 is a prefix of md10. How reproducible: Didn't try Steps to Reproduce: 1.Install the root filesystem in /dev/md10 2.Try to set up another RAID device named /dev/md1 Actual Results: mkraid and raidstop won't work. Expected Results: It should work just fine. Additional info:
I have the same problem on a rh6.x system with rh6x raidtools-0.90-13. Temporary workaround is to comment out from /etc/raidtab the device that confuses raidtools. This bug is very similar to bug #10111, which was about parsing of /etc/mtab. For RedHat: if you update the rpm for rh71, will it be compatible, unofficially, for rh6x too (ie: can we rebuild src.rpm and use it)? I see in the changelog "updated to support multipath in 2.4.2 kernel" is this something that may cause problems on rh6x?
This is because mkraid/raidstop pass "md1" to strstr. Call it with "md1 " for an easy fix.
Given that the release in rawhide is raidtools-0.90-23, can you confirm that the behaviour still exists with that version?
This bug exists in the most recent rawhide raidtools-1.00.2-3.3. That means 7.2 through 8.0 is affected including Advanced Server. To reproduce, just create a raidtab with md10 and md1 defined then: mkraid /dev/md10 mkraid /dev/md1 You will get an error telling you to run 'raidstop' on /dev/md1. A simple patch follows: --- raid_io.c.old Wed Aug 28 15:55:15 2002 +++ raid_io.c Wed Aug 28 15:59:20 2002 @@ -523,6 +523,7 @@ if ((ch = strstr(p->md_name, "/md")) == NULL) return 0; strcpy(buffer, ch+1); + strcpy(buffer, strcat(buffer, " ")); if ((fp = fopen("/proc/mdstat", "r")) == NULL) return 0; while (1) {
More bugs in raidtools: We had a system in which check_active was confusing md8 with md11 in our config. There are several errors in the code related to a global variable named 'cfg' that is almost always local to a function. This patch fixes that so it's local everywhere. More importantly, it fixes the call to check_active that wasn't checking the correct metadevice data structure leading to md8 being confused with md11...
Created attachment 74127 [details] Here is the patch to fix references to cfg (this includes the md10 vs md1 fix)
Created attachment 74704 [details] here is better fix to the cfg reference problem (includes md10 vs md1 fix)
I've finally managed to get a system set up in which I could test that the fix does indeed work. Thanks!