Ok, you have your 2 shiny brand new sata harddrives and want to set them up in a raid 1 (mirror) configuration?
# fdisk -l
This will list all the drives and partitions. The 2 new drives should appear as new disks with 0 partitions on them. In my case, the drives are /dev/sdc and /dev/sdd.
# mdadm –create –verbose /dev/md0 –level=1 –raid-devices=2 /dev/sdc /dev/sdd
Running that command will start the sync process and create the raid device, /dev/md0
# cat /proc/mdstat
Run the above command to view the status of the resync. It will show a little progress bar, a percentage complete, and an estimated finish time. On my box, it takes about 45 minutes to mirror 320Gb drives.
You can format, and start using the /dev/md0 device right away, even while it’s syncing. The syncing goes on in the background all the time so you might as well get started.
That should be it.