You really kinda need the original mdadm.conf file. But, as you don't have it, you'll have to recreate it. First, before doing anything, read up on mdadm via its manual page. Why chance losing your data to a situation or command that you didn't have a grasp on?
That being said, this advice is at your own risk. You can easily lose all your data with the wrong commands. Before you run anything, double-check the ramifications of the command. I cannot be held responsible for data loss or other issues related to any actions you take - so double check everything.
You can try this:
mdadm --assemble --scan --verbose /dev/md{number} /dev/{disk1} /dev/{disk2} /dev/{disk3} /dev/{disk4}
This should give you some info to start working with, along with the ID. It will also create a new array device /dev/md{number}, from there you should be able to find any mounts. Do not use the --auto
option, the man page verbiage implies that under certain circumstances this may cause an overwrite of your array settings on the drives. This is probably not the case, and the page probably needs to be re-written for clarity, but why chance it?
If the array assembles correctly and everything is "normal", be sure to get your mdadm.conf written and stored in /etc
, so you'll have it at boot time. Include the new ID from the array in the file to help it along.
Have you tried to assemble the drive by explicitly specifying all (or as much as possible) parameters?
I'd try mdadm --assemble /dev/md0 /dev/sda4 /dev/sdb4 - If that doesn't work, specify the level and blocksize, or try by uuid instead of by components.
You could try mdadm -E /dev/sda4 and /dev/sdb4 as well, to see how much info is still there.
I think the create assume-clean only works in very specific situations; please try the above with the original images (without create)
Best Answer
The way you're doing it (one large partition that you create the mdadm array from) there's no major difference, but since you're effectively using the whole disk anyway I'd do as Antonius Bloch suggested and use the whole disk device rather than creating a partition -- it just seems more correct to me to create your RAID using the full physical device rather than a chunk of it.
If you are creating multiple partitions and setting up mdadm volumes across those you may actually experience a performance decrease (if you split your disks in half and one array is the first half of a set of disks and the other array is the second half your drives will have to seek back and forth when reading/writing on both disks -- head travel time will kill your performance), but the solution there is not to do that :-)