ARECA (ARC11XX/ARC12XX/ARC13XX/ARC16XX) SATA/SAS RAID CONTROLLER RedHat Enterprise Linux AS release 4 update 2 x86_64 and i686(kernel 2.6.9-22.EL) Driver User's Guide ====================================================================== ====================================================================== Linux SCSI driver technical support mail address: support@areca.com.tw Tel: 886-2-8797-4060 Fax: 886-2-8797-5970 Web site: www.areca.com.tw ====================================================================== ====================================================================== ********************************************************************** ** 1. Contents ** ********************************************************************** readme.txt - the readme file for ARC11XX/ARC12XX/ARC13XX/ARC16XX driver RedHat Linux SATA/SAS RAID Controller driver arcmsr.1.20.0x.13.zip - source code(Kconfig.arcmsr, arcmsr.c, arcmsr.h, Makefile) install.zip - ziped ARECA RAID driver disk for system install (driver.img) ********************************************************************** ** 2. First installation ** ********************************************************************** A. Before Installation - Under DOS/Windows environment a. Unzip driver disk X:\PATH\pkunzip.exe install.zip =>> driver.img b. Dump it into a floppy disk. X:\PATH\rawrite.exe driver.img A: Tips: You can get rawrite.exe from RedHat installation CD #1 "\dosutils" directory. - Under Unix enviroment a. # unzip install.zip b. # dd if=driver.img of=/dev/fd0 B. Installation a. Booting from Installation CDROM #1 b. On "Welcome to Red Hat Enterprise Linux" installation screen, a prompted lable "boot:" will appear at the bottom of the screen. According to the prompt, type in "text(or linux) dd" to tell linux we have a driver disk. c. You will be asked "Do you have a driver disk?", select "Yes". d. When prompted "Insert your driver disk into /dev/fd0 and press OK to continue", insert the driver diskette in the floppy drive and then select "OK". e. Driver of arcmsr should be automaticlly loaded into kernel. The kernel will find RAID Volume connected to you raid card, and continue installing your system... ********************************************************************** ** 3. Installing raid driver on an Existing System. ** ********************************************************************** CASE 1: if you do not attempt to compile driver source $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$ extract arcmsr.ko from install.zip $$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ # mkdir /root/tmp # unzip install.zip # dd if=driver.img of=/dev/fd0 # mount /dev/fd0 /mnt # cp /mnt/modules.cgz /root/tmp # cd /root/tmp # gzip -cd modules.cgz > modules.cpio # cat modules.cpio | cpio -i ; you can get arcmsr.ko from 2.6.9-22.EL ,2.6.9-22.ELsmp CASE 2: if you need to compile linux kernel drivers source $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$ Method for RedHat official source kernel pack $$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ Red Hat Enterprise Linux 5 no longer includes the kernel-source package. To create an exploded source tree from kernel-.src.rpm, users that require access to the kernel sources can find them through Google search or take the following steps: (note that refers to the version for your currently-running kernel): A:Obtain the kernel-.src.rpm file from one of the following sources: @@ The redhat directory on the appropriate CD iso image @@ The FTP site where you got the kernel package By running the following command: #up2date --get-source kernel B:Install kernel-.src.rpm #rpm -i kernel-.src.rpm (the files this package contains will be written to /usr/src/) /usr/src/kernels/2.6.9-22.EL-x86_64 /usr/src/kernels/2.6.9-22.EL-smp-x86_64 C:In resulting tree, the configurations for the specific kernels shipped in Red Hat Enterprise Linux 4 are /usr/src/kernels/kernel--x86_64/.config D:Issue the following command: example: (Assume you are working at "2.6.9-22.EL-x86_64" kernel) # cd /usr/src/kernels/2.6.9-22.EL-x86_64 # make oldconfig or menuconfig You can then proceed as usual. Note: An arcmsr source tree is not required to build kernel modules against the currently in-use kernel. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% to build the arcmsr.ko module individually: %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% # cd /root/ # unzip arcmsr.redhat.1.20.0x.13.zip ;you can get a arcmsr source code folder at /root # cd arcmsr/ # make ;arcmsr.ko will present You can use insmod to install ARECA RAID driver arcmsr.ko manually # insmod ./arcmsr.ko # copy arcmsr.ko to /lib/modules/2.6.9-22.EL/kernel/drivers/scsi/ # make new initrd image An initrd image is needed for loading your SCSI module at boot time. So you need update your initrd image..... Insert and add this context description into /etc/modprobe.conf Example: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ ...... @ alias scsi_hostadapter arcmsr <----add this entry @ ...... @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Build up a new initrd image. we assum your kernel version is 2.6.9-22.EL. # mkinitrd -f -v /boot/initrd-2.6.9-22.EL.custom.img 2.6.9-22.EL Insert and add this context description into /boot/grub/grub.conf Example: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ ...... @ title Red Hat Linux (2.6.9-22.EL) @ root (hd0,0) @ kernel /vmlinuz-2.6.9-22.EL ro root=/dev/hda2 <---- This depends on your root partition @ initrd /initrd-2.6.9-22.ELimg @ @ title Red Hat Linux (2.6.9-22.EL)custom <---- add this entry @ root (hd0,0) <---- add this entry @ kernel /vmlinuz-2.6.9-22.EL ro root=/dev/hda2 <---- add this entry and it depends on your root partition @ initrd /initrd-2.6.9-22.EL.custom.img <---- add this entry @ ...... @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ E.#reboot $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ $$ Method for linux.org standard source kernel pack $$ $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ A. Prepare for make new kernel and drivers a. create a symbolic link 'linux' in /usr/src directory first. #ln -s linux-2.6.x linux b. unzip arcmsr.1.20.0x.13.zip c. copy this folder (arcmsr) to /usr/src/linux/drivers/scsi B. Modify make and config files In /usr/src/linux/drivers/scsi/Makefile @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ ... @ .... @ obj-$(CONFIG_SCSI_ARCMSR) += arcmsr/ @ ... @ .. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ In /usr/src/linux/drivers/scsi/Kconfig @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ ... @ .... @config SCSI_ARCMSR @ tristate "ARECA (ARC11xx/12xx/13xx/16xx) SATA/SAS RAID Host Adapter" @ depends on PCI && SCSI @ help @ This driver supports all of ARECA's SATA/SAS RAID controllers cards. @ This is an ARECA maintained driver by Erich Chen. @ . @ @ To compile this driver as a module, choose M here: the @ module will be called arcmsr (modprobe arcmsr). @config SCSI_ARCMSR_AER @ bool "Enable AER_Aware & Error Recovery Capability in Areca Driver(ARCMSR)" @ depends on SCSI_ARCMSR && PCIEAER @ default n @ help @ The support for advanced error reporting(AER) capability is "NOT" provided by @ ARC1200/1201/1202 SATA RAID controllers cards. @ If your card is one of ARC1200/1201/1202, please use the default setting, n. @ If your card is other models, you could pick it @ on condition that the kernel version is greater than 2.6.19. @ This function is maintained driver by Nick Cheng. If you have any @ problems or suggestion, you are welcome to contact with . @ @ To enable this function, choose Y here. @.... @... @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ C. Make new kernel # cd /usr/src/linux # make mrproper # make config (or make xconfig ,make gconfig ,make menuconfig) Tips: Say "M" means configure this driver as a module. ;You can load default config from /usr/src/linux/arch/x86_64/defconfig .... ;When prompt for "SCSI support" say "Y" or "M". ;When prompt for "SCSI disk support" say "Y" or "M". ;When prompt for "SCSI tape support" say "Y" or "M". ;When prompt for "SCSI CD-ROM support" say "Y" or "M". ;When prompt for "SCSI generic support" say "Y" or "M". ;When prompt for "ARECA ARC11X0[PCI-X]/ARC12X0[PCI-EXPRESS] SATA-RAID support" say "Y" or "M" Tips: If you need the PCI error recovery support, please pick "Enable AER_Aware & Error Recovery Capability in Areca Driver(ARCMSR)". # make # make modules_install # cp ./arch/x86_64/boot/bzImage /boot D. Modify boot loader configuration files. a. Modify /boot/grub/grub.conf Example: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ ...... @title Red Hat Linux (2.6.x) @ root (hd0,0) @ kernel /vmlinuz-2.6.xxxxx ro root=/dev/hda2 <---- This depends on your root partition @ initrd /initrd-2.6.xxxxx.img @ @title Red Hat Linux (2.6.x)custom <---- add this entry @ root (hd0,0) <---- add this entry and it depends on your root partition @ kernel /bzImage ro root=/dev/hda2 <---- add this entry @ ...... @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ b. Make an initrd image NOTICE: If your low-level drivers are module, go through, otherwise, skip. An initrd image is needed for loading your SCSI module at boot time. So you need make your own initrd image..... Insert a add this context description into /etc/modprobe.conf Example: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ ...... @ alias scsi_hostadapter arcmsr <---- add this entry @ ...... @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Build up a new initrd image. we assum your kernel version is 2.6.x.custom. # mkinitrd -f -v /boot/initrd-2.6.x.custom.raid.img 2.6.x.custom Insert a add this context description into /boot/grub/grub.conf Example: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ ...... @ title Red Hat Linux (2.6.x) @ root (hd0,0) @ kernel /vmlinuz-2.6.xxxxx ro root=/dev/hda2 <---- This depends on your root partition @ initrd /initrd-2.6.xxxxx.img @ @ title Red Hat Linux (2.6.x)custom <---- add this entry @ root (hd0,0) <---- add this entry @ kernel /bzImage ro root=/dev/hda2 <---- add this entry and it depends on your root partition @ initrd /initrd-2.6.x.custom.raid.img <---- add this entry @ ...... @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ E. #reboot P.S. ====================================================================== There is particularly useful method if you are running a stock kernel supplied by your Linux distributor, or for other reason do not want to perform a full kernel build. Please note that this way you will only be able to build a module version of the arcmsr driver; also note that you will need at least the headers and configuration file your current kernel was built with. Provided that you meet all the above prerequisites, building the arcmsr driver module is done with the following command: # cd /usr/src/linux/drivers/scsi/arcmsr (suppose /usr/src/linux is the soft-link for /usr/src/kernel/2.6.9-22.EL) # make -C /lib/modules/`uname -r`/build CONFIG_SCSI_ARCMSR=m SUBDIRS=$PWD modules # insmod arcmsr.ko