On 27/11/12 13:37, Mark Rogers wrote:
I have four drives containing mdadm RAID partitions: /dev/sda1 through /dev/sdd1
I believe they were previously set up as RAID5, although it might have been two separate RAID1 arrays or one RAID10 array.
How do I work out what they were, which drive is which, and configure the array on a new PC to access the data? (Obviously I need to do that without losing the data on them!)
Pretty much it should be fairly automatic if you install them on a PC with the mdadm tools and kernel modules or run a live CD.
The magic numbers written to each raid partition will tell mdadm what order to assemble the drives in and what raid level it was. You don't need to match up device names with the old system etc.
Just boot it up cat /proc/mdstat, (if it exists it has already found the array's) if not then then prod it with a 'mdadm -A /dev/md0' and md1 2 etc if you think more than one array existed or just running 'mdadm -A --scan' should assemble all arrays it can find on the attached devices. md will figure out the drive order and the raid level. 'cat /proc/mdstat' to see what is going on.
Some distros run the scan option at boot so you may find the array just magically appears so it is worth checking /proc/mdstat before you start.
Be aware that over the last couple of years there have been some changes in the mdadm metadata format which means that older versions of mdadm cannot assemble arrays created by the later versions. But the new versions are backward compatible...so I would make sure you run a system with a recent mdadm version of 1.2 or higher.