Jinn Koriech
v0.1 - April 13, 2002
This HOWTO describes how to set up the PDC-20265 RAID-1 under Linux Mandrake 8.2. It addresses the use of the ATARAID module which is maintained by Arjan van de Ven at http://people.rehat.com/arjanv/pdcraid/ataraidhowto.html. The ATARAID module is included in the late 2.4.x kernels. This module now supports RAID 1 as well as RAID 0. I do not go into any detail about setting up striped RAID in this document - only mirrored RAID.
If you have any questions please see the references at the bottom of this howto.
The reason this HOWTO was written is because none of the documentation I came accross when setting up the PDC-20265 indicated how to use it to provide RAID-1 services. After a few emails on the ataraid mailing list I managed to set up a box with RAID-1 running on Fasttrack(tm) Lite BIOS with the PDC 20265 chipset. These instructions should help for setting up the Highpoint 370 IDE RAID controller, though I have no way of testing.
There is plenty of documentation for hardware and software based RAID so I'm not going into any kind of explanation about it. From my understanding Promise Fasttrack(tm) IDE RAID falls somewhere inbetween the two as it uses a BIOS hack to facilitate RAID, hence requiring some form of OS based support - in this case the ATARAID module. In addition the ATARAID module does not use ide-scsi emulation or any of the Software RAID functionality provied by the linux kernels.
In addition, my understanding is that the PDCRAID module as outlined on the Promise website is not needed to get the ATARAID approach working.
Some of the information in this HOWTO may seem trivial - I myself was new to RAID before I wrote this.
I welcome all feedback, good or bad, on the content of this document. I have done my best to ensure that the instructions and information herein are accurate and reliable, but I don't know everything and I don't keep up on kernel development or RAID. Please let me know if you find errors or omissions. When writing, please indicate the version number of the document you're referencing. Be kind.
My thanks goes out to Murty Rompalli for having written out some instructions for Red Hat 7.2. Without that I would have been here for weeks! You can find his documentation at http://solar.murty.net/~murty.
This HOWTO assumes you are using a late 2.4.x series kernel. You will need two IDE hard drives, and ofcourse, a motherboard with the PDC-20265 chipset.
My approach to setting up RAID-1 may seem a bit long winded. If you know a better way around this please let me know and I will make your notes available with this document.
I used Mandrake 8.2 in this setup, but I expect you can use just about any distro and get it working with this approach.
This is what you need:
Now lets get started.
Because Mandrake doesn't support (out of the box) the peculiar approach that the PDC-20265 chipset uses for RAID I plugged only one of the hard drives in to begin with and installed on that as though it was a normal setup. The only difference was a follows:
Now you should be logged in to your new system.
What you need to do next is build a new kernel with Promise Fasttrack(tm) support compiled in statically. Don't bother trying to use the stock kernel as I spent hours trying without success. Simply download the latest stable version from www.kernel.org
cd /usr/src mv linux linux-2.4.x tar zxvf linux-2.4.18.tar.gz mv linux linux-2.4.18 ln -s linux-2.4.18 linux cd linux make menuconfig
The following was taken from Murty Rompalli's own instructions:
Enable all the following in the kernel statically (NOT as modules):
ATA/IDE/MFM/RLL Support --> <*> ATA/IDE/MFM/RLL Support IDE/ATA/ATAPI Block Devices --> <*> Enhanced ATA/IDE/MFM/RLL disk/cdrom/tape/floppy support <*> Include IDE/ATA-2 Disk Support [*] Use multi-mode by default Include IDE/ATAPI CDROM support [*] Generic PCI IDE chipset support [*] Sharing PCI IDE interrupt support [*] Generic PCI Bus master DMA support [*] Use PCI DMA by default when available [*] Intel PIIXn chipset support [*] PIIXn tuning support [*] Promise PDC202{46|62|65|67|68} support [*] Special UDMA Feature [*] Special FastTrack Feature [*] VIA 82CXXX chipset support <*> Support for IDE RAID controllers <*> Support Promise Software RAID (fasttrack)After you enabled static features as shown above, make any more changes that you would like to make to suit your environment.
Finally, save the kernel configuration. It is saved to .config in the current directory. Please back up this file. If you dont do so, you will regret it later. Copy .config file in a blank floppy or in /root
Before building the kernel make sure you move the current kernel out of the way and adjust /etc/lilo.conf to that effect - that way if your new kernel doesn't boot you have something to fall back on. Believe me this is of utmost importance - I forgot to do this the first time and the kernel wouldn't boot. I had to start from scratch!
Now, build and install the kernel like you normally do, by typing:
make dep ; make clean ; make && make install make modules && make modules_install
According to Murty the new kernel should not need an initrd= line in /etc/lilo.conf. At this point I reboot into the new kernel without moving to the RAID yet just to make sure I've created a working kernel. Once that is successful you can go onto preparing to move to RAID.
Now adjust /etc/lilo.conf and /etc/fstab as follows:
line for the kernel you just built and change this toroot=/dev/hdaX
where X is the partition number as on /dev/hdaX.root=/dev/ataraid/d0pX
/usr/lilo
| Before |
/dev/hda1 / ext3 defaults 1 1 none /dev/pts devpts mode=0620 0 0 none /dev/shm tmpfs defaults 0 0 /dev/hda6 /home reiserfs notail 1 2 /dev/scd0 /mnt/cdrom auto user,iocharset=iso8859-15,exec,codepage=850,ro,noauto 0 0 /dev/fd0 /mnt/floppy auto user,iocharset=iso8859-15,sync,exec,codepage=850,noauto 0 0 none /proc proc defaults 0 0 /dev/hda5 swap swap defaults 0 0 |
| After |
/dev/ataraid/d0p1 / ext3 defaults 1 1 none /dev/pts devpts mode=0620 0 0 none /dev/shm tmpfs defaults 0 0 /dev/ataraid/d0p6 /home reiserfs notail 1 2 /dev/scd0 /mnt/cdrom auto user,iocharset=iso8859-15,exec,codepage=850,ro,noauto 0 0 /dev/fd0 /mnt/floppy auto user,iocharset=iso8859-15,sync,exec,codepage=850,noauto 0 0 none /proc proc defaults 0 0 /dev/ataraid/d0p5 swap swap defaults 0 0 |
Remember to save your changes. Trying to reboot at this point will not work - you can only boot off the RAID now unless you revert to the old fstab.
Alright - we're almost there. Now you're going to move the drives to the RAID channel. To do this as quick as possible I found that it's best to reconfigure the CMOS before unplugging the hard drive.
df -kYou should see references to /dev/ataraid/d0pX instead of /dev/hdaX.
ataraid/d0: ataraid/d0p1 ataraid/d0p2 < ataraid/d0p5 ataraid/d0p6 > EXT3 FS 2.4-0.9.17, 10 Jan 2002 on ataraid(114,1), internal journal