******************************************************************************* DISCLAIMER: Any use of the BETA FastTrak Linux driver is made at the user's own risk since the driver has not been fully tested nor is it an official final release. Your use of the beta driver constitutes your acceptance of this risk and your agreement to hold Promise Technology, Inc. harmless in the unlikely case that you lose data from its usage. We do appreciate any comments based on your use of the driver that you may have for use by our engineering team in completing the drivers. Thank you for supporting Promise products. Please Email your comments to linuxcomments@promise.com. ******************************************************************************* FastTrak 66/100 (tm) IDE RAID Solutions For Linux (c)2000 Promise Technology, Inc All Rights Reserved Documentation (rev 1.10) CONTENTS 1. Overview 1.1 The FastTrak Loadable Module 1.2 Types of Installations 2. Installation as a Second Drive 3. Installation as a Boot Drive 4. Features 4.1 Striping (RAID 0) 4.2 Mirroring and Fault Tolerance (RAID 1) 4.3 Event Logging 1. Overview Promise Technology aims to provide users of Linux with a reliable, affordable and easy IDE RAID solution. While support for third party drivers under linux varies from distribution to distribution we are attempting to make the installation process as simple and straight forward as possible for all users of Linux. Installation of additional drivers to the Linux Kernel is traditionally an advanced procedure and is reccommended only for experienced users of Linux. 1.1 The FastTrak Loadable Module The FastTrak Driver is distributed as SCSI loadable module. The FastTrak controller is an IDE disk controller and the disks attached to it must be IDE disks. The reason the driver is a SCSI loadable module is because the IDE subsystem of Linux does not have the ability to dynamically load drivers. The arrays of disks under the FastTrak will appear as scsi devices to the Linux operating system. 1.2 Types of Installations There are two main ways to install your RAID array under Linux. One is as an additional drive mounted from your currently installed Linus system. The other is to install the RAID array as the main drive you boot to containing Linux. The easiest method of installation is as an additional drive to an existing system. However the need for a completely fault tolerant solution for your Linux boot drive may neccessitate the need to install directly onto the FastTrak controller. 2. Installation as a second controller STEP #1: CREATE THE RAID ARRAY To create a RAID array on the FastTrak you must use the FastTrak BIOS by entering when asked by the BIOS during the system start up. Then use the menu to create either a stripe or mirrored array. Please consult the FastTrak manual for more information regarding RAID types and configuration. STEP #2: BOOT INTO LINUX If you already have your Linux system installed, please log into it as root. Otherwise install your distribution onto a drive other than the FastTrak (presumably the on board IDE drive) and log in as root. STEP #3: OBTAIN THE FASTTRAK LOADABLE MODULE Now copy the FastTrak loadable module (ft.o) into your working directory. This can be done by mounting a floppy diskette containing the driver or by downloading if from the Promise website at http://www.promise.com To mount an MSDOS diskette: mount -t msdos /dev/fd0 /mnt/floppy To mount a Linux diskette: mount /dev/fd0 /mnt/floppy (You may then access the contents of the floppy by accessing the /mnt/floppy directory) If the loadable module was distributed as a tarball (extention "tar.gz" or ".tgz") then you can extract it into the current directory by issuing the command : tar -zxvf filename.tar.gz STEP #4: TEST THE MODULE You can test out the FastTrak module to ensure that it works for your system by typing "insmod ft.o" If you have a different kernel version than the one the module was compiled for insmod will refuse to load it. You can force the installation by typing "insmod -f ft.o". This is generally a safe procedure if the kernel versions are not too far apart because the scsi system calls do not change much from kernel version to kernel version. However correct operation cannot be gauranteed. Sometimes insmod will report "unresolved symbols" when you attempt to load the module. This can be caused by two ways. 1. If you recompiled the kernel and did not include scsi support. 2. If you recompiled the kernel with scsi support and you still receive the "unresolved symbols" error the Makefile did not install the symbol versioning correctly. To correct it recompile the kernel using the "mrproper" command: mv .config make mrproper mv ./.config make oldconfig dep clean Then compile and install kernel/modules If the module loaded successfully you should see the FastTrak banner and a display of the attached drives. You can access the drives as a scsi device (most likely /dev/sda if you have no other scsi devices installed) STEP #5: INSTALL THE MODULE You will most likely not want to type "insmod ft.o" everytime you boot up the system. Therefore you must install the module and tell the system about it. To install the module type the following commands: install -d /lib/modules/VER/scsi /lib/modules/scsi install -c ft.o /lib/modules/VER/scsi install -c ft.o /lib/modules/scsi (VER = kernel version and can be found by typing "ls -al /lib/modules" or viewing /usr/src/linux/include/linux/version.h) Now to inform the system when to load the module edit the file "/etc/conf.modules" and add the following line: alias block-major-8 ft this tells the kernel to try loading the FastTrak module whenever it tries to access a scsi device /dev/sd[a-z]. STEP #6: MODIFY /ETC/FSTAB (OPTIONAL) To automatically mount the device upon startup, first reboot the system and partition the array by typing "fdisk /dev/sda". The kernel should automatically load the FastTrak driver. Now partition your drive and make a file system by typing "mke2fs /dev/sda1" after you have run fdisk. Make the directory you want to mount the FastTrak array under such as "/mnt/fasttrak/" Now you can inform the system to automatically mount the FastTrak array by adding the following line to /etc/fstab: /dev/sda1 /mnt/fasttrak ext2 noauto, owner 0 0 3. Installation as a Boot Drive In order to install Linux directly onto the FastTrak it is necessary to load the module from the boot diskette. Because of the many differences between various distribution's boot diskettes and the general lack of support for third party loadable modules in boot diskettes, if you choose this method of installation you will need to create your own boot diskette. Information on doing so can be found from: http://www.ibiblio.org/pub/Linux/docs/HOWTO/Bootdisk-HOWTO http://www.redhat.com/mirrors/LDP/HOWTO/KickStart-HOWTO-9.html or from your distributions documentation. However this is a difficult undertaking and is not recommended. You can check periodically at http://www.promise.com to see if any premade boot diskettes for your distribution are available. An alternative exists for creating a mirrored boot drive on the FastTrak. This method provides the fault tolerance many systems require and is relatively straight forward. It will not work for striped arrays, but will work for most any Linux distribution. STEP #1: INSTALL LINUX ONTO ONE IDE DRIVE Using one of the IDE drives you will use in your Mirrored Array install Linux onto it by attaching the empty drive onto your system's on board ide controller. IT IS A GOOD IDEA TO MAKE A BOOT DISKETTE IF GIVEN THE OPTION IN CASE YOU MAKE ANY MISTAKES DURING STEP #5 OF THIS PROCEDURE. NOTE: When you partition your drive as part of the installation procedure use fdisk if available and leave the LAST TWO cylinders of the drive unpartitioned. The FastTrak uses this area of the drive to store information regarding the array. If your partition uses this area it is possible to overwrite this area and you may destroy the array! STEP #2: LOG INTO THE NEW SYSTEM Reboot using the same setup and log in as root. STEP #3: OBTAIN THE FASTTRAK LOADABLE MODULE Now copy the FastTrak loadable module (ft.o) into your working directory. This can be done by mounting a floppy diskette containing the driver or by downloading if from the Promise website at http://www.promise.com To mount an MSDOS diskette: mount -t msdos /dev/fd0 /mnt/floppy To mount a Linux diskette: mount /dev/fd0 /mnt/floppy (You may then access the contents of the floppy by accessing the /mnt/floppy directory) If the loadable module was distributed as a tarball (extention "tar.gz" or ".tgz") then you can extract it into the current directory by issuing the command : tar -zxvf filename.tar.gz STEP #4: TEST THE MODULE You can test out the FastTrak module to ensure that it works for your system by typing "insmod ft.o" If you have a different kernel version than the one the module was compiled for insmod will refuse to load it. You can force the installation by typing "insmod -f ft.o". This is generally a safe procedure if the kernel versions are not too far apart because the scsi system calls do not change much from kernel version to kernel version. However correct operation cannot be gauranteed. Sometimes insmod will report "unresolved symbols" when you attempt to load the module. This can be caused by two ways. 1. If you recompiled the kernel and did not include scsi support. 2. If you recompiled the kernel with scsi support and you still receive the "unresolved symbols" error the Makefile did not install the symbol versioning correctly. To correct it recompile the kernel using the "mrproper" command: mv .config make mrproper mv ./.config make oldconfig dep clean Then compile and install kernel/modules If the module loaded successfully you should see the FastTrak banner and a display of the attached drives. You can access the drives as a scsi device (most likely /dev/sda if you have no other scsi devices installed) STEP #5: INSTALL THE MODULE You will most likely not want to type "insmod ft.o" everytime you boot up the system. Therefore you must install the module and tell the system about it. To install the module type the following commands: install -d /lib/modules/VER/scsi /lib/modules/scsi install -c ft.o /lib/modules/VER/scsi install -c ft.o /lib/modules/scsi (VER = kernel version and can be found by typing "ls -al /lib/modules" or viewing /usr/src/linux/include/linux/version.h) STEP #6: MODIFY THE SYSTEM Now we will modify the system to boot from the FastTrak. Make sure you have a boot disk available to recover from if you make a mistake, otherwise you will have start over from scratch. STEP #7: MAKE INITRD First we must make an initial ram disk that contains the FastTrak driver. The easiest way to do this is to obtain the mkinitrd script provided by redhat and other distributions. To use mkinitrd for Red Hat 6.2 kernel version 2.2.14-5.0 use the following command: mkinitrd --preload ft /boot/initrd-ft.img 2.2.14-5.0 STEP #8: MODIFY LILO Now you must modify lilo to write the new information to the master boot record of the drive. Add the following lines to /etc/lilo.conf: boot=/dev/hda #overwite MBR of hda or which ever drive you are currently using disk=/dev/sda #this is what the current drive will be seen as when it is #put on the fasttrak bios=0x80 #This is the BIOS drive number the fasttrak array will be #seen as. It will always be 0x80 unless you have additional #drives on your system in which case it may change initrd=/boot/initrd-ft.img #add this after your "image=" statement root=/dev/sda1 #tell where to find root partitoon Your final /etc/lilo.conf should look something like this: boot=/dev/hda disk=/dev/sda bios=0x80 map=/boot/map install=/boot/boot.b prompt timeout=50 linear default=linux image=/boot/vmlinuz-2.2.14-5.0 initrd=/boot/initrd-ft.img label=linux read-only root=/dev/sda1 Be sure to type "lilo" to commit the changes to the MBR! STEP #9: MODIFY FSTAB Now modify /etc/fstab to mount your root partion as: /dev/sda1 / ext defaults 1 1 don't forget your swap partition too! /dev/sda2 swap swap defaults 0 0 STEP #10: SHUT DOWN AND BUILD MIRROR Now shut down the machine and remove the drive from the onboard ide port and attach it and a blank drive to the FastTrak controller. Create a Mirrored array using the two drives and copy the contents of the Linux drive to the blank drive. STEP #11: Reboot your Linux system it is now protected by a powerful IDE RAID soultion! 4. Features 4.1 Striping (RAID 0) Striping offers performance increase, but no data protection. 4.2 Mirroring and Fault Tolerance (RAID 1) Mirroring offers performance increase for reads, and complete data protection. 4.3 Event Logging The following events are logged to the syslog as level 3 KERN_ERRs 4103: Disk Rebuild Started 4123: Disk Offline 4126: Array Rebuild Completed 4128: Rebuild Aborted 4133: Disk Error