On Monday 11 January 2010 12:52:57 pm Carlos Williams wrote:
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.
I always wait cat /proc/mdstat until the raid is finished, even though it says you don't have to, I don't want any trouble :)
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
Don't need this
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)
Don't need that, system already got raid by this stage, if it didn't it could read that kernel line or init.
- 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.
Don't think you need that, that is I don't do that on my system. I use grub to "start the array" see below.
*/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
Don't do that do 127.0.0.1 localhost.localdomain localhost 127.0.0.2 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.
Don't need that system already knows about the raid as it has already been assembled, by now. You have marked the partition (FD) as being part of a raid array the kernel can handle it.
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$ _
Try adding this to grub menu.lst kernel vmlinuz26 root=/dev/md0 md=2,/dev/sda2,/dev/sdb2 Works for me, I use raid 5 three drives encrypted filesystems, root and everything else. With an encrypted root filesystem the kernel line is a bit different but what is above will work for you. What does your fstab say about the root filesystem? do you have /dev/md0 / ext4 blah.blah, blah