[arch-general] Why Is My RAID Installing Failing?

Carlos Williams carloswill at gmail.com
Mon Jan 11 12:52:57 EST 2010


OK - I am once again attempting to use Arch install for 2010 on my
system which has two identical hard drives and I simply want to mirror
both drives in a RAID1 array. I have read the Wiki so much at this
point it has become memorized. I am NOT using LVM or anything, just a
Arch user who wants RAID1, very simple, right? Well wait, it gets
easier. I am not even attempting to add my MBR /dev/sda1 (/boot) to
the RAID1 array. Crazy simple, huh? You might even ask well why am I
even asking for help then...well because I hate the Arch installer and
not because its CLI only. No, I love the simplicity of the installer
and not being graphical but the RAID configuration is a complete mess.

I am booting from a fresh 2009.08 Netinstall ISO disk. I select the
1st option and login as root (requires no password). Before I just
junp into the installer (/arch/setup), I need to configure a few
things:

1 - I use 'cfdisk' to configure /dev/sda & /dev/sdb.

- /dev/sda1 = 4096 MB (bootable) 83
- /dev/sda2 = The rest of the disk (selecting 'fd' type)

- /dev/sdb1 = 4096 MB (SWAP) 82
- /dev/sdb2 = The rest of the disk (selecting 'fd' type)

2. I need to load my RAID1 modules using the following command:

#modprobe raid1

3. Now I need to create my RAID1 mirror using the following command:

#mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda2 /dev/sdb2

4. Check to make sure the RAID is rebuilding and both devices show [UU]

#cat /proc/mdstat

So now everything is working fine and going as it should be via the
Wiki. Now the Wiki in my opinion is way too bloated and tries to do
too much so I am cutting and pasting what I feel applies to me. Which
is why I am showing you everything I am doing here in this email to
see why I am failing.

Now I need to update the /etc/mdadm.conf file with my new RAID1 I
created with the following command:

#mdadm -D --scan >> /etc/mdadm.conf

And I also verify that my info was correctly populated into the
/etc/mdadm.conf file using the following command:

#cat /etc/mdadm.com

So now I am ready to run the /arch/setup command from the CLI to
begine configuring the install / my new system.

1 - Select Source = I configure my install method and all my network variables
2 - Set Clock = I configure my Time Zone and stuff
3 - Prepare Hard Drive(s) = Here I can skip to section sub menu 3
since I already did most of this above. I simply now just select mount
points for my existing partitions:

sda1 = /boot (ext3)
sdb2 = swap (swap)
md0 = /         (ext4)

4 - Select Packages = I select the base packages and what I feel is
required for my setup.
5 - Install packages = I let the system download and install the
packages from my mirror.
6 - Configure System = This is where I feel my confusion comes into
play. Perhaps I am missing something:

*/etc/rc/conf = I simply add the changes below:
- In 'Hardware' section add "MODULES=(md_mod raid)
- HOSTNAME="mypc"
- "sshd" added to the "DAEMONS" line

*/etc/mkinitcpio.conf
- add 'mdadm' on the 'HOOKS' line after "sata" & before "filesystems"
as noted in the Wiki.

*/etc/resolv.conf
- Check to make sure DNS looks good...it does.

*/etc/hosts
- Add my FQDN here as follows:
127.0.0.1      mypc.mydomain.tld    mypc

*Root-Password
- Create a secure root password.

Now that is it. I select 'Done' and let it build 'initcpio' images.

7 - Install Bootloader = Here I select "Grub" and then review the
default menu.lst it produces. I then select /dev/sda to install Grub
on.
"Grub was successfully installed"

Now I am done and back at the bash shell logged in as root.

I then run the following command:

#cp -a /etc/mdadm.conf /mnt/etc/mdadm.conf to make sure when the
system boots, it is aware of my RAID1 mirror.

Now I reboot because I assume I am done.

Here is my error:

::Running Hook [mdadm]
Waiting 10 seconds for device /dev/md0

Root device '/dev/md0' doesn't exist, attempting to create it
ERROR: Failed to parse block device for ids for /dev/md0
ERROR: Unable to detect or create root device /dev/md0
You are being dropped into a recovery shell
Type reboot to reboot
Type exit to try and continue booting

If the device /dev/md0 gets created while you are here, try adding
'rootdelay=10 or higher to the kernel command line.
ramfs$ _


More information about the arch-general mailing list