How to use an Adaptec Raid Controller with e-smith Server Vers 4.1.2
(A PDF version of this document is also available.)
- Begin by having a box with an IDE boot drive of at least 1 GB plus either an Adaptec 2100S* (scsi) RAID controller attached to some scsi drives or an Adaptec 2400A (ide) RAID controller attached to some IDE drives. At boot time, hit Ctrl-A to have the Adaptec bios come to life, then set up a RAID array. I used three 9GB drives and set up a SCSI RAID 5 array which has 18GB of storage.
- Install the e-smith Server and Gateway as usual to the IDE boot drive. The next steps require you to have command line access, so press Ctrl-Alt-F2, and login, using “root” instead of “admin” and your usual e-smith admin password.
- Download the appropriate Linux drivers from http://linux.adaptec.com for your particular RAID controller. Be sure to get the Red Hat 7 drivers in rpm format, and copy them to a diskette, then to the e-smith server. I put them in /usr/tmp.
- Now, unpack the drivers using rpm -ivh /usr/tmp/<drivername>.
- Type depmod -a; insmod dpt_i2o and the drivers will activate. The prompts will show the drivers for your kernel version loading and running.
- Type fdisk /dev/sda then “n” to add a partition. Add a primary partition that takes up the entire array (just follow the prompts, it's the default). Now type “p” to ‘print' the partition table to the screen so you can verify what you have done. Finally, type “w” to write the data to the partition table and exit fdisk.
- Type mkfs -t ext2 /dev/sda1 to put a file system on the RAID array. We can now test that all is well so far by mounting the array. Type mkdir /mnt/raid to create a mount point, then type mount /dev/sda1 /mnt/raid. Now type ls -l /mnt/raid and you should see a “lost & found” directory. You may try copying something to this new device if you wish, to assure yourself that it is indeed working.
- Now it is time to make the RAID array drivers load every time the system is rebooted. Adaptec says this is not needed, but I found it was necessary. Run the vi editor like this: vi /etc/rc.d/rc.sysinit. Search through this file by typing /raid <Enter> and you will be taken to a line in the file that says: “# add raid devices”. Cursor down one line. At the beginning of this line, type Esc i to get into insert mode, and insert a line by pressing the <Enter> Key. Now type depmod -a; insmod dpt_i2o, and finally press the Esc key, followed by the command :wq to write the file and quit the editor. If vi is misbehaving, you can always do an Esc :q! to quit without saving and start the whole thing over.
- Let's do the same thing to have the RAID array mount each time the system reboots. Type vi /etc/fstab, cursor to the bottom of the file and hit Esc i as before to enter insert mode. Note that the entries in this file are in columnar form, and you can get to each next column by using the tab key. The first column will be /dev/sda1 followed by /mnt/raid then ext2, then defaults, and finally 1 2, just in line with the rows and columns above. When everything looks right, type Esc :wq to save and exit. It's probably a good idea to reboot at this point to prove that everything is going to load properly.
- Now we're almost there. e-smith is designed is for one hard drive, not two. Since we can't install our e-smith server to the RAID array, the next best thing is to install to the IDE drive, then put our user and network data storage on the RAID array. The data storage is located in /home/e-smith/files and the subdirectories below that. We will need to copy that section of the IDE drive installation over to the raid array by going to the command line again, then typing cp -arf /home/e-smith/files/* /mnt/raid. Once this is done, we can mount the RAID array right into the directory tree of the IDE installation, and e-smith won't be the wiser.
- Once again, use the vi editor on /etc/fstab by typing vi /etc/fstab. Change the mount point in the last line from /mnt/raid to /home/e-smith/files and again use Esc :wq to save and exit. When you reboot, you're done, and all user data and ibays are now on the RAID array. Wasn't that easy?
- The proof of the pudding is in the performance. I tried copying a 422MB image file to and from a Win2K client to the e-smith server, using both the original IDE drive and the RAID array. Here's what I found:
TO E-SMITH SERVER
IDE Drive: 2 minutes, 45 seconds
RAID array 1 minute, 50 seconds
FROM E-SMITH SERVER
IDE Drive: 2 minutes 50 seconds
RAID array 48 seconds
I'll admit the IDE drive isn't the world's fastest, but the results speak for themselves. As usual with raid 5 arrays, reading is lightning-fast; writing is a bit more leisurely. If the RAID controller had more cache on it, the write performance would certainly improve (this board has only the factory-default 32MB).
I hope this helps someone to take advantage of these raid controllers with an e-smith server. It would also be nice if it stimulated someone to take on the challenge of making it possible to install directly to the RAID array from the e-smith CD. The install scripts with RH 7 will allow this; the e-smith install has omitted that function. What is needed is a motivated scripter (scriptor?) to fix that. Are there any out there?
* Also applies to higher-end Adaptec raid controllers 3200s and 3400s