Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I was running ubuntu 11.04 and my boot drive has become corrupt. This has stopped me from accessing my raid5 array.

The array was set up in MDADM and called MD0 i think. Can I install ubuntu 11.04 on a new os drive and pull back my array? If so what would I need to do?

Are there any important config files on the old drive? I think part of the VAR directory is unreadable.

share|improve this question
    
Can you get access to your original /etc/mdadm/mdadm.conf file? –  Nerdfest Jun 4 '11 at 20:19
add comment

1 Answer

I'm a little shaky on doing this, and I can't guarantee that it won't destroy anything. I did go through the same situation and managed to get mine back. I don't remember exactly what I did as it was quite some ago. I think once I had my .conf file restored, I could use 'mdadm --assemble --scan', and it this doesn't work, you can re-assemble the drive (assuming you know the partitions) using something similar to 'mdadm --assemble /dev/md0 /dev/sda1 /dev/sdb1' where md0 is your raid partition and sdb1 and sdb2 are the component partitions.

share|improve this answer
    
Thanks for that. –  Warren Jun 4 '11 at 22:14
    
The array is made of 4 WD10EARS 1 TB drives. Its a 3TB raid 5 array. Im not sure of the order on the drives, is there anyway to find this out, or can I assemble the array with it automatically recognising the order. The drives are single partitions made using MDADM so things like gparted see them as unformatted. –  Warren Jun 4 '11 at 22:15
    
I think you should be safe trying the --scan. I had a question above asking if you can get access to the original mdadm.conf file (/etc/mdadm/mdadm.conf). I think this will have useful information in it if you can still access it. –  Nerdfest Jun 5 '11 at 3:00
    
Hh, Ive installed a new os drive, and a fresh copy of ubuntu 11.04. I have installed MDADM and run the MDADM -assemble --scan command, nand it comes back with /dev/md0 assembled from 2 drives - not enough to start the array .... the array had 4 drives using 3, so why isnt it picking them up? I really dont want to loose the data on it. –  Warren Jun 5 '11 at 20:07
    
Not sure ... you could try assembling manually (mdadm --assemble /dev/md0 /dev/sda1 ... etc, adding all 4 parts). –  Nerdfest Jun 6 '11 at 2:19
show 4 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.