Penguin
Note: You are viewing an old revision of this page. View the current version.

Yeah, well, it was easy enough to get RAID working. Sort of. Here's the compressed notes; they'll be opaquish if you don't have some experience with Linux, but these are the 350 words I wish I'd read before starting. It might have taken me a minute to read and saved me about an hour.

http://www.linuxhomenetworking.com/linux-adv/raid.htm gave me the basics: cfdisk /dev/hdb and /dev/hde to one big partition of type 'FD', copy a sample config from /usr/share/doc/raidtools* into /etc/raidtab and edit it, mkraid /dev/md0, look at /proc/mdstat to make sure RAID was active, mkfs /dev/md0, go eat dinner, remember raidstart and raidstop commands for future reference, put /dev/md0 in /etc/fstab, and mount -a. Now I had RAID. But it was resyncing very slowly! After bringing up the RAID for the first time, it will spend a few hours resyncing, which will throw off disk transfer rate measurements; you can umount /dev/md0 and use raidstop to stop it and look at /proc/mdstat.

hdparm -i showed me that one of the disks was in mdma2 mode, which was painfully slow (as shown by hdparm -t after a raidstop.) Also a little inspection showed that I did actually have a third IDE channel (praise be unto server-class motherboards). hdparm -d 1 -X udma2 /dev/hdc (it was hdc after I moved it to the new channel) helped a lot.

Very painful lesson: make sure you set AUTOSTART="true" in /etc/default/raid2 on Debian-like systems, at least if you want your RAID to be mounted at boot time. (Otherwise maybe use noauto in /etc/fstab.) Also you might want to make sure /etc/init.d/raid2 is linked into the appropriate S28 slot in /etc/rcS.d (and maybe K51 in /etc/rc6.d and /etc/rc0.d? Dunno if that matters.)

80-pin IDE cables have smaller wires than floppy-disk cables, and are less prone to noise; they should be used with higher UDMA modes to reduce the risk of data corruption. udma2 is 30MB/sec and is all I can get safely on my machine; higher rates lose data.