You are not logged in.

#1 2011-07-06 19:00:43

xvalentinex
Member
Registered: 2008-05-31
Posts: 22

[Solved] Motherboard swap - recover RAID

Hey all,

My motherboard fried recently.  I replaced it with a different model.  GRUB loads fine and sees my boot kernel, during init the boot process halts because it can't find root parition, which is a raid.

I have my HDD's partitioned in several types of arrays.  Which unfortunately is a guess right now (installed several years ago).

I believe:
/dev/sda1 /dev/sdb1 = /dev/md0 (/boot) RAID 1
/dev/sda2 /dev/sdb2 = SWAP
/dev/sda3 /dev/sdb3 = /dev/md1 (/) RAID 0
/dev/sda4 /dev/sdb4 = /dev/md2 (/home) RAID 1
/dev/sda5 /dev/sdb5 = /dev/md3 (/storage) RAID 0

I haven't had a chance to delve into it yet, but am going to tonight.  I plan to boot a livecd and do some poking around with fdisk and mdadm.  I'm not super familiar with mdadm however.

I'm wondering if anyone has done something similar and remembers what they did, or if anyone familiar with mdadm could point me to some commands they would do to discover/restore the raid setup?

Last edited by xvalentinex (2011-07-07 05:54:30)

Offline

#2 2011-07-06 19:40:09

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: [Solved] Motherboard swap - recover RAID

Perhaps reading the wiki for mdadm will aid in your LiveCD search and fix.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#3 2011-07-07 05:54:05

xvalentinex
Member
Registered: 2008-05-31
Posts: 22

Re: [Solved] Motherboard swap - recover RAID

Okay so anyone seeing this that has the same issue, here are the steps.

Technically raid wasn't the issue, but my motherboard had all new chipsets and I had to rebuild the kernel image.

First I assembled the arrays to find my / directory (there may be a more automated way to discover these device, probably something like mdadm -A --config partitions --scan)
mdadm -A /dev/md1 /dev/sda2 /dev/sdb2

Then mount the raid array
mkdir /mnt/md1
mount /dev/md1 /mnt/md1

Copy the /etc/mdadm.conf to your livecd.
cp /mnt/md1/etc/mdadm.conf /etc/mdadm.conf

Stop any assembled arrays
mdadm --scan --stop

Have mdadm assemble all arrays from the config
mdadm -A --scan

Follow the wiki on chrooting:
https://wiki.archlinux.org/index.php/Change_Root

Modify /etc/mkinitcpio.conf if neccesary, then build kernel
mkinitcpio -p kernel26

Exit chroot, stop all md devices again, and reboot.


PS
On a side note I think members may be giving the "Check the wiki" response way too often.  Had a question on mkinitcpio.conf, asked in the IRC, and got that response as well.  I would hope and imagine most people have _checked_ the wiki, referring them back to it isn't helping.

Last edited by xvalentinex (2011-07-07 05:55:26)

Offline

Board footer

Powered by FluxBB