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!)
Hi,
When I had a raid problem, I googled and found loads of stuff about how to recover a disk, so there's loads of info out there - perhaps a confusing amount!
This one may help. http://ubuntuforums.org/showthread.php?t=1950154
From it, you could use
sudo mdadm --examine /dev/sd*
which will tell you details about the disks, including the array uuids with which, you should be able to work out how many raids you had.
If all's well, you could try
mdadm --detail --scan
mdadm --assemble --scan
will try to work out which disks are part of which array, and add them.
If that doesn't work, you may have to manually add the disks to the array using mdadm, but I can't find an example to hand of how to do that.
You'll have to ensure that your mdadm.conf file is up to date too, otherwise this won't mount after a boot.
I don't know if this step is required in all situations, but I had to do
sudo update-initramfs -u
which updates the initial ram file system used when booting the system take the new array into account, but I'm booting from raid disks, so this may not apply to you.
Hope that helps Steve