I'd like to setup RAID 1 with two drives in linux. I don't have a hardware RAID controller and don't want to buy one, so what is the best software RAID option for linux?
Note: If it makes a difference, I'm running Gentoo.
Use mdadm, check the manpage. However, I will list one gotcha here. If you do this and really want reliability, you should make sure your master boot record is copied to both drives. By default it will likely only get copied to one drive. If that drive dies, you cannot boot from the other drive, even though all your data is safe.
To copy the mbr to both drives, use something like dd to copy the first 446 bytes of one drive to the other.
dd if=/dev/sda of=/dev/sdb bs=446 count=1
If you're building the RAID on top of the devices (/dev/sda) rather than on top of partions on the devices (/dev/sda1), then you probably shouldn't do what I am suggesting because you're writing data directly to the device underneath the md driver. At least, I've never tried it that way.
You can use mdadm to manage software raid on linux.
livecd ~ $ mdadm --create /dev/md1 --level=1 --raid-devices=2 --metadata=0.90 /dev/sda1 /dev/sdb1
mdadm: array /dev/md1 started.