If you didn't notice in Section 4, Roadrunner now has (7) hard drives and (2) CD-ROMS running on it now. Four IDE HDs are in the main system case and the other (3) SCSI HDs and (1) tape drive is in a secondary AT computer case.
To pull this off, I ordered a cable that has (2)external HD50pin SCSI-2-Fast connectors with 8 internal SCSI 50-pin internal ribbon cable connectors. I bought this from http://www.corpsys.com [part num: SCSI28] for ~$59. I then used one of my old AT-style cases with its power supply. With all this, I now have a external RAID box! Cool huh? Anyway, the following section will tell you how to implement RAID 0 (Striping) in software. Changing the configs to Linear, Raid1, or Raid5 won't be hard as long as you can afford the lost capacity or afford the extra disks.
--
- Download ALL the various version of the RaidTools from the URL in Section 5
The reason to download ALL of the available versions is that I've noticed that some of the newer versions would NOT compile. Other versions didn't have all the docs, etc. Raidtools is in a sad state right now but it DOES work once you put together a working hodge-podge.
NOTE: You will notice that there is a Software-RAID HOWTO on the various Linux mirrors and in the RaidTools's archive itself. Though its a strong doc on what is RAID, how do the different levels differ, how to recover from various failures, etc.. it's NOT a HOWTO. Its much more like a FAQ.. and personally.. I found it extreamly difficult to read and follow.
Anyway, from here on out, assume I'm using Raidtools-0.50
- download and install the newest available kernel (2.0.35) into /usr/src/linux
- run "make config" (if you haven't already done this as shown in Section 11)
- Configure the kernel as you normally would but, in the HD hardware support section, enable the following:
Multiple devices driver support (CONFIG_BLK_DEV_MD) [Y/n/?] Linear (append) mode (CONFIG_MD_LINEAR) [Y/m/n/?] RAID-0 (striping) mode (CONFIG_MD_STRIPED) [Y/m/n/?] RAID-1 (mirroring) mode (CONFIG_MD_MIRRORING) [Y/m/n/?] RAID-4/RAID-5 mode (CONFIG_MD_RAID5) [Y/m/n/?]
- Now run "make dep; make clean; make bzImage; make modules;
make modules_install" and compile up the kernel.
- Now, install the kernel into lilo, LOADLIN, etc. and reboot (shown in Section 13 & [Section 14]).
- Once the box has rebooted, decompress raidtools-0.50 (tar -xzvf)
- Run "./configure"
- Run "make all"
- run "make install"
- Now you need to edit your init files to properly bring up the md0 service.
!!!NOTE!!! These configs ASSUME that the partitions to be raided are /dev/hdb1, /dev/hdd1, /dev/sdc1, and /dev/sdd1. Modify your configs to reflect your own environment!!!
- Create the following file:
/etc/rc.d/rc.raid -- #!/bin/sh # See how we were called. case "$1" in start) /sbin/mdadd /dev/md0 /dev/hdd1 /dev/sdb1 /dev/sdc1 echo "Disks added" /sbin/mdrun -p0 /dev/md0 echo "Raid -RAID0- started on /dev/md0" ;; manual) /sbin/mdadd /dev/md0 /dev/hdd1 /dev/sdb1 /dev/sdc1 echo "Disks added to /dev/md0" /sbin/mdrun -p0 /dev/md0 echo "Raid RAID0 started on /dev/md0" /bin/mount -t ext2 /dev/md0 /home/hpe/RAID0 ;; stop) echo "/dev/md0 umounted" /bin/umount /dev/md0 echo "/dev/md0 stopped" /sbin/mdstop /dev/md0 ;; *) echo "Usage: rc.raid {start|stop}" exit 1 esac exit 0 --
Once you have created this script file, make it executable by running "chmod 700 rc.raid"
+++ Redhat users, edit /etc/rc.d/rc.sysinit (find the following lines and insert the following lines (around line 159):
/etc/rc.d/rc.sysinit -- if [ -x /sbin/kerneld -a -n "$USEMODULES" ]; then if [ -f /proc/sys/kernel/modprobe ]; then # /proc/sys/kernel/modprobe indicates built-in kmod instead echo "/sbin/modprobe" > /proc/sys/kernel/modprobe else /sbin/kerneld KERNELD=yes fi fi # Start the initialization of the MD0 RAID service /etc/rc.d/rc.raid start # Check filesystems if [ ! -f /fastboot ]; then echo "Checking filesystems." fsck -R -A -V -a $fsckoptions . . . --
+++ Slackware users, edit the /etc/rc.d/rc.S file, find the following text and append the following:
/etc/rc.d/rc.S -- # remove /etc/mtab* so that mount will create it with a root entry /bin/rm -f /etc/mtab* /etc/nologin /var/run/utmp \ /etc/shutdownpid /var/run/*.pid # Start the initialization of the MD0 RAID service /etc/rc.d/rc.raid start --
All Distributionss: edit the /etc/fstab file and append the following line to somewhere in the main body)
-- /dev/md0 /home/hpe/RAID0 ext2 defaults 1 2 --
- Ok, that's the meat of it. So now lets get this setup and formatted
- Go ahead and type in "/etc/rc.d/rc.raid start"
- If you get any errors about /dev/md0 not existing, run the command "/dev/MAKEDEV md0" and the run the script again. Yes.. use the CAPs.
- Now format the drive by typing in "mke2fs /dev/md0.
NOTE: There is a LOT of room in some of these commands to increase performance, etc (stripe size, Inodes..). For now.. I'm just shooting for functionality.
- Ok, mount it! "mount -a"