Public bug reported:

Binary package hint: mdadm

Attempting to assemble an array using the command:

    mdadm -A /dev/md0 /dev/mapper/raid5a /dev/mapper/raid5b
/dev/mapper/raid5c

produces the error message:

    madam: no devices found for /dev/md0

The problem is that the Assemble routine in Assemble.c silently ignores
all devices for which "used" is nonzero.  The "used" field is not
initialized, so whether or not the used field is non-zero depends on
what happens to be in memory.  The above error message appears when the
"used" fields for all of the arguments are nonzero.

The patch below set the "used" fields to zero before the main loop is
entered for the first time, which appears to fix the problem.

*** Assemble.c-orig     2009-07-18 16:09:55.000000000 -0400
--- Assemble.c  2009-07-18 16:31:27.000000000 -0400
***************
*** 184,189 ****
--- 184,198 ----
        else if (mdfd >= 0)
                inargv = 1;
  
+       /*
+        * Initially mark all devices as not used.
+        */
+       for (tmpdev = devlist;
+            tmpdev;
+            tmpdev = tmpdev->next) {
+               tmpdev->used = 0;
+       }
+ 
   try_again:
  
        tmpdev = devlist; num_devs = 0;

ProblemType: Bug
Architecture: amd64
Dependencies:
 
DistroRelease: Ubuntu 9.04
NonfreeKernelModules: nvidia
Package: mdadm None [modified: /var/lib/dpkg/info/mdadm.list]
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: mdadm
Uname: Linux 2.6.28.9 x86_64
UnreportableReason: This is not a genuine Ubuntu package

** Affects: mdadm (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug

-- 
"mdadm -A device..." fails
https://bugs.launchpad.net/bugs/403767
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to