ATA RAID with Promise FatTrack (WAS: Re: [Techtalk] Hello - intro)

Scott Sandeman-Allen (RSCorp) scott at rscorp.ab.ca
Sun Feb 16 11:05:45 EST 2003


Hello Jessica,

> IDE RAID (Promise FastTrack). 

This is a form of software RAID, the card or embedded
controller is almost identical to the 2-port IDE controllers
Promise make, with the exception of board BIOS and an
additional diode.

The Promise driver requires the use of a specific kernel
which also limits your future ability to update the system
etc.

You are much better off to use the Linux software RAID. It
is faster, more flexible and has less overhead and problems.

> system has 2 x 40GB Quantum Fireball 7200RPM drives in it
> (currently on separate IDE channels).

Yes, this is the correct way to configured the hardware.

For larger systems, I've used a smaller drive (yeah, try and
find new, smaller drives these days ;-) as the system drive.
Then mirror a series of larger drives as /var or /home.

> When I did the initial RH install I played around with
> trying to get the RAID support working, but with no luck.
> I used the ATA-RAID HOWTO and a couple of other
> installation "guides" that I found on the net as
> references.

The trick on both RH and 'drake (during install) is to
configure the partitions on both drives identically as Linux
RAID. Then add the matched partitions to the RAID and
finally assign the mount points.

I've found the Knoppix CD distribution an excellent tool for
partitioning disks prior to installation with RAID. Booting
from Knoppix, I then use a root console to fdisk my
partitions at the block level (much easier once you specify
the same drive geometry). The problem with the graphical
installers is they make it difficult to match partition
sizes and to spec smaller than 256 mb /boot partitions for
example.

There are tools to help with the management of RAID. I don't
remember the name for RH, mdadmin I think it is but it could
be  raidtools. I've not run them yet, but I understand it
makes monitoring etc. much nicer.

> If anyone has experience with getting IDE RAID working on
> this mainboard in particular, or a similar system, or is
> just an IDE RAID guru, I'd love to hear about it.  :-) 

A little, though I'm still learning 8-)

> I'd still like to get RAID going instead of just doing
> the scripted backup to 2nd disk that I'm using at the
> moment. The system is already in production as a web
> hosting server, which makes migration a little trickier
> too.

You can post-configure the RAID on your system. It is a
little trickier. The RAID howto and some other resources on
the net describe the process in detail better than I ever
could. A magazine did two articles recently as well but off
the top I don't remember. I'll dig them out and post if
no-one else offers them up first.

It goes something like this, but please don't follow this
exactly, follow the howto or magazine articles.

At present you are booting from the master of the primary
IDE (hda). Your mirror drive is the master of the secondary
IDE (hdc). Lets say you have a separate partition on hda for
/var and it is 10gb for simplicity. Lets say it is at hda7 

You would then make an identically sized partition on hdc
(usually at the same location on the drive too). Lets say
we've mirrored the partition scheme and it is hdc7

in /etc, you need to edit the raidtab to add both partitions
and assign it a drive i.e. md2. The essential key is to mark
the hda7 partition as failed. This is very important if you
don't want to lose anything.

You then execute mkraid for md2 and the system builds the
RAID, but it only builds in the one drive. Following that
you 'format' using something like mke2fs -j for ext3. You
can watch the status by cat /proc/mdstat. Notice that one
drive is listed as failed by [_U] whereas a properly working
RAID shows [UU].

Now, manually mount the md2 somewhere like /mnt or /mnt/raid
(you would have to previously add the directory to mount
to). 

Next is to copy everything from /var to /mnt/raid,
preserving permissions etc. I think cp -a did the trick for
me. Now, you have everything on the 'failed' RAID.

In single-user mode (I think it is 'init 1') you can unmount
/var, change the fstab to point to md2 for /var instead of
hda7 and then reboot.

If all goes well and /var is working properly, you can then
change the partition type of hda7 to Linux RAID 'fd' using
fdisk. 

Next you edit /etc/raidtab again and unmark hda7 as failed
and execute raidhotadd pointing it to md2 and hda7 (you may
have to force this, be sure to read the cautionary note that
comes up).

Depending on processor, partition size and type of RAID, it
will take some time for this last step. the 180 gb partition
we build a few months ago took a couple hours ;-)

A final check of /proc/mdstat shows that everything is okay.

This looks daunting but once you've done it a couple times
it is fairly easy. Take your time, be patient and cautious
(make backups to other partitions etc.) and have fun.

In review, the steps are
    partition mirror drive
    make raidtab entry with failed disk
    makeraid
    make filesystem (format)
    mount 'failed' RAID
    copy data
    change fstab
    reboot & test
    change original partition to RAID type
    repair 'failed' RAID
    enjoy

Think of it as a digital game of shells or ping-pong 8-)

I hope this helps a little,

Scott

PS. The Tyan board you have. Does it have three or four IDE
channels (pairs of primary & master)?



More information about the Techtalk mailing list