I'm trying to set up gentoo with a kernel raid. I'd like to set up a raid0 swap and root partition and a raid1 boot and backup partition. I noticed the gentoo install cd has raidtools installed so I partition out the drives using fdisk. I then create /etc/raidtab:

I have run into a problem with /dev/md0.
Something must have broken in /dev, because at first my /dev/md0 worked just fine, raiddisk became active during boot and was exported over nfs. Currently, I've had to disable raidstart during boot, because it would hang the boot into an error message. The error "cannot determine md version: 25." comes up when trying to use any raidtool. The odd thing is, that if I go and rm /dev/md0 and create it again, the device works properly. (Or most probably I'm creating the file in the wrong way)

Yes the /dev/md/0 is the device and making /dev/md0 a symbolic link pointing to it solves the problem for as long as the computer is running. But if the system reboots, /dev/md0 is botched and I have to manually recreate the link.

I'm searching a solution which would make /dev/md0 to work correctly at boottime. (All other /dev/md? devices work properly at boot.)

Use the new mdadm (multi-disk administrator) package and its mdadm.conf instead of the old raidtools and raidtab. Your life will be much easier. You can Google mdadm to read how it works and its advantages over raidtools. For setting up your system with mdadm you can see the software RAID howto supplement to Gentoo installation here: http://www.gentoo.org/doc/en/gentoo-x86-tipsntricks.xml#software-raid. Lastly on this subject, you can interchange between mdadm and raidtools since they're just the userland utilities and both use the kernel's md driver! So no need to redefine your arrays and reformat! Just emerge mdadm, create your mdadm.conf (can be done automatically; read the previous link), unmerge raidtools, reboot! (Maybe there's more, but that's all I think I did...)

This has been covered before, but since this thread is sticky for the moment, I may as well say again: there really is no point in striping (RAID0) your swap! The kernel swap daemon automagically stripes/balances multiple swaps if you specify all of them in your /etc/fstab! Neato, right? Occam's Razor and all that jazz. (Finally, realize that if you were doing a mirrored array [RAID1] for the root filesystem there would be a good reason to mirror your swap... if one of the disks were to fail, you'd likely still keep serving up that database or whatever... with striping swap, if you lose a disk it's like pulling a RAM chip out of the system while running, hehe.)

Will you help me, please. And if you are so kind please explain me how is it possible that my two identical hhds have different geometries ????
64 heads, 32 sectors/track, 35003 cylinders
255 heads, 63 sectors/track, 4462 cylinders

Use the new mdadm (multi-disk administrator) package and its mdadm.conf instead of the old raidtools and raidtab. Your life will be much easier. You can Google mdadm to read how it works and its advantages over raidtools. For setting up your system with mdadm you can see the software RAID howto supplement to Gentoo installation here: http://www.gentoo.org/doc/en/gentoo-x86-tipsntricks.xml#software-raid. Lastly on this subject, you can interchange between mdadm and raidtools since they're just the userland utilities and both use the kernel's md driver! So no need to redefine your arrays and reformat! Just emerge mdadm, create your mdadm.conf (can be done automatically; read the previous link), unmerge raidtools, reboot! (Maybe there's more, but that's all I think I did...)

This has been covered before, but since this thread is sticky for the moment, I may as well say again: there really is no point in striping (RAID0) your swap! The kernel swap daemon automagically stripes/balances multiple swaps if you specify all of them in your /etc/fstab! Neato, right? Occam's Razor and all that jazz. (Finally, realize that if you were doing a mirrored array [RAID1] for the root filesystem there would be a good reason to mirror your swap... if one of the disks were to fail, you'd likely still keep serving up that database or whatever... with striping swap, if you lose a disk it's like pulling a RAM chip out of the system while running, hehe.)

J

Must agree with yottabit on using mdadm. The best i can recall raidtools and friends have been depreciated in 2.6 linux kernels for some time favoring mdadm. raidtools may work but it's more than liklely only usable for long term support and compatibility to allow systems admins time to rebuild software raid arrays._________________Compiling Gentoo since version 1.4
Thousands of Gentoo Installs Completed
Emerged on every continent but Antarctica
Compile long and Prosper!