[ Sent to www@gentoo.org by nico@rakar.com ] I've just finished installing Gentoo on a Software Raid1 setup (SCSI) as described in: http://www.gentoo.org/doc/en/gentoo-x86-tipsntricks.xml#software-raid I booted smp (2.6) kernel for the installation. I run across a couple of problems and it took me quite a while to find the answers on the gentoo-user archives. 1) The document says: "When you partition your disks, make sure that your partitions use fd (Linux raid autodetect) as Partition Type instead of 83 (Linux native). " It's not clear if the swap partition on each disk needs to be type 82 (swap) or fd (raid autodetect). I used type 82 and it's working ok, but still don't know if that is the right thing to do. 2) When I reached part 9 (Configuring the Bootloader) on the handbook I emerged grub, run it and when I got to "Code Listing 3: Installing GRUB in the MBR" I typed "root (" + TAB and it didn't work as expected - my drives where not listed. This was the begining of the problem. I tried different things, even tried to use LILO, but I got errors refered to my /dev/md0 device. I looked into /dev/ and there were no md0, md1 or md2 devices. I finally came across this posting from the gentoo-user list Subject: [gentoo-user] Re: Booting Software RAID0 (SCSI disks) using LILO (or even GRUB) ? From: Javier Marcet <http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&q=author:lists%40marcet.info+> (lists@marcet.info <mailto:lists%40marcet.info>) Date: 2004-03-04 15:10:10 PST [...] "In addition to the kernel support, you either have to be running devfs, or, if you're using a 2.6.x kernel udev. In the former case, devfs will be running outside the chroot, thus remember to bind mount the /dev from outside the chroot over the /dev within it. In the latter case, since you're still on the chroot, you might as well create the nodes for the md manually. 'mknod /dev/md0 b 9 0' `mknod /dev/md1 b 9 1' and so on. You can also create them as 0, 1, ... within a /dev/md subdir, and make links. I allready suspected that the problem was that the md0 device was not present in my chroot, and as I had booted kernel 2.6 I tried this mknod /dev/md0 b 9 1 mknod /dev/md1 b 9 1 mknod /dev/md2 b 9 1 (all my raid devices) Run grub again and "root (" + TAB returned hd0 and hd1 "root(hd0," + TAB returned the correct partition table for /dev/sda and hd1 for sdb. I run grub> root (hd0,0) grub> setup (hd0) and then did the same for hd1, as the Software raid Tips documents says: "When configuring your bootloader, make sure it gets installed in the MBR of both disks if you use mirroring" I configured my grub.conf as follows: default 0 timeout 30 splashimage=(hd0,0)/grub/splash.xpm.gz title=Gentoo Linux 2.6.5 root (hd0,0) kernel /kernel-2.6.5-gentoo-r1 root=/dev/md2 Now everything is working ok. Showing what a complete working grub.conf file for the raid would look like would be nice. I hope this information is enough for you to be able to update the gentoo-x86-tipsntricks.xml doc so other people don't need to go through all this hassle. Let me know if I can help any further.
mknod /dev/md0 b 9 1 mknod /dev/md1 b 9 1 mknod /dev/md2 b 9 1 should be: mknod /dev/md0 b 9 0 mknod /dev/md1 b 9 1 mknod /dev/md2 b 9 2
About 1), this depends on what you want to achieve. If you want your swap RAID'ed, you need to set it to fd. If you don't want your swap RAID'ed, keep it 82. Concerning 2), due to my brains being dead after a whole month of studying: is it sufficient to say """ If grub fails to find your RAID partitions, create the necessary nodes with the following commands and try again: (...) """ ?
**timeout**