7

I have an ubuntu desktop 10.4 "server" with 5 hardrives. 1 of the hardrives had 3 OS's on it (Windows Vista, Windows XP, and Ubuntu 10.4). I primarily used the ubuntu OS so that I could use mdadm and boxee.

The other 4 hard drives were configured using mdadm in a Raid5 partition.

As far as I know, those 4 hard drives are fine...

But my main OS hard drive has completely died. The computer won't boot up, obviously, without a drive with an operating system.

My goal is to somehow reload an operating system onto a new hard drive that I just received from newegg.com, or to load a live cd...and then retrieve or reassemble my mdadm raid 5 partition so I can at least get my rather huge music collection off the machine and onto an external hard drive.

What [detailed] steps do I need to take in order to achieve this?

2 Answers 2

15

Amazingly enough, your RAID should actually be autodetected by Linux simply by the virtue of being made up of "Linux RAID Autodetect" partitions. So, after you install on the OS drive, after first boot, you should have an MD device here:

cat /proc/mdstat

To manage it, you'll want to make sure you have mdadm installed:

apt-get install mdadm

Just installing mdadm will actually try to auto-detect your arrays so check /proc/mdstat again. If they're still not there, you can assemble by running something like:

mdadm --assemble /dev/md0 /dev/sdXX /dev/sdYY ....

You'll want to save the configuration if you have to do that manually:

/usr/share/mdadm/mkconf

And then update the initramfs for your system:

update-initramfs -u        
2
  • This also works from a livecd environment.
    – Oli
    Nov 4, 2010 at 7:38
  • I forgot to say Thanks for this answer...it contributed (heavily) to me sorting out he problem. Much appreciated.
    – Doomd
    Sep 3, 2013 at 18:37
4

Wow. Linux really does kick ass. Here's what I did:

  1. Because my old Boot/OS drive failed, I installed Ubuntu (10.10) onto a brand new hard drive. (I made sure not to reformat or install over the other 4 RAID drives which did not fail).
  2. After Ubuntu installed and booted up for the first time, I then installed mdadm with "sudo apt-get install mdadm"
  3. Now I wanted to see if my RAID was recognized by the system. Inside the disk utility, the raid array was listed, but it said "Not running, not enough components to start."
  4. I checked on an Ubuntu forum about this problem...and the solution was rebooting the system. I rebooted...and the RAID array is now fully functioning again (listed inside the disk utility, and mounted in the filesystem under "Places").

That's all I had to do!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .