documentation index

plugscript home page

KNOPPIX ATA-RAID Howto

How to use KNOPPIX with ATA-RAID Controllers. A description of the topic and an easy and quick solution without unpacking the compressed KNOPPIX filesystem.

Content

What is ATA-RAID

ATA-RAID controllers have become quite popular these days. Many advanced motherboards already include IDE-RAID Chips by Promise or Highpoint.

ATA-RAID (or IDE-Raid)-controllers are a cheap way to get RAID (a way to let multiple hard disks look like a single disk) on a PC. Note: the Linux kernel also has a software RAID feature, for free of course! Even Windows NT/2000/XP ships usually with the 'stripe set feature'. However Linux' and Windows' software RAID are not compatible with each other. Windows 9x/ME does not have native RAID support at all. If you have multiple operating systems on your machine an ATA-Raid-adapter may be a good choice. You should also be aware of the down-side of hardware raid; should your controller fail you may, depending on the type of RAID you use, have to obtain a compatible controller to read your disks.

ATA-RAID controllers are normal IDE controllers, the RAID is done by special drivers. Thus they are a kind of software RAID, which works only with that specific hardware. ('software' means: the computers main processor has to do the work) . The difference between the ATA-RAID controllers and normal IDE-controllers is mainly (beside the some bios), that ATA-RAID controllers tell the system, they are SCSI controllers. This is done, because Windows easily accepts 3rd party drivers for SCSI adapters (even during the first stages of setup) but it usually assumes, that IDE disks can be accessed by native Windows drivers (which don't know RAID).

Linux and ATA-RAID devices

Current Linux kernels nicely support at least some of the ATA-RAID controllers. (I use an onboard Promise Fastrack 100 lite, which works well. Thus all the following explanations are true for Promise Fastrack 100, but they should work with many other products.)

Often, the ATA-RAID controller is just the second IDE-controller installed on a system, since usually the motherboard chipset already contains an IDE-controller. In that case the four disks you can have connected to the first IDE-controller appear under the device names /dev/hda ... /dev/hdd, but disks on the IDE-RAID Controller appear instead as /dev/hde ... /dev/hdh. However, these device names mean physical disks. The goal of a RAID-Controller is to let multiple physical disks appear to be a single disk. Thus, once you have configured a raid array, you should never again access the disks at hde...hdh. The information read from these devices will not be meaningful, and any attempt to write to them will likely destroy the whole array!

If the Linux kernel recognizes an ATA-RAID array it will provide access to the first 'virtual' disk at /dev/ataraid/d0 . The second disk is /dev/ataraid/d1 (goes up to 15). The first partition on the first disk is: /dev/ataraid/d0p1 . That's it: access to the virtual raid devices is otherwise exactly the same as with ordinary hard disks.

Today, the only problem with these controllers is that some of the partitioning tools and most of the KNOPPIX-scripts related to disk partitions don't expect hard disks with the device names of ataraid disks.

This document shows how to correct this in the most important scripts.

Script authors and ATA-RAID devices

I contacted already some authors of such shell scripts, and even offered ataraid enhanced versions. However most of them seem not to be interested, some really dislike ataraid, others claim it to be unsafe, and no one seems to have ever tried it. Thus at the time of this writing there is not much hope of getting better scripts soon. We must help ourselves.

If you are successful in using ATARAID as described here you may wish to let these authors know that it works.

If you experience any problems, especially data loss, please let me know and I will update this documentation.

Warning

As mentioned above, some claim ataraid unsafe. My Promise Fasttrack controller has already worked nicely for two years with different kinds of Linux, one year of it in RAID-mode. I never had any problems with it (except, that sometimes it requires such additional work...). I think it should be quite safe now. However: I don't give you any guarantee for this! In doubt, don't put important data on the array and make backups regularly.

If you have your hard disk connected to an ataraid adapter and you see disks and partitions of the type '/dev/hde' ... never touch them, if you value your data.

How to install ATA-Raid support for KNOPPIX

Note: casual floppy access may be extremely slow in KNOPPIX, because of the auto mounter. If you work a lot with a single floppy you can open a second terminal window and enter cd /mnt/floppy. This will keep the floppy mounted until that window is closed! But you must close this window, as well as all programs accessing files or directories of the floppy, before you remove the floppy! (Find such programs with:sudo lsof -D /mnt/floppy and ps ax --forest.) Otherwise you risk data loss, and the floppy drive may be inaccessible until reboot.

Using persistent_home with ataraid adapters

persistent_home is a part of the persistent_home package from Matthias Schwarze <m_schwarz@et-online.de> . It can save your home directory as a (loopback-image-) file on your hard disk, so that rebooting does not erase your entire home directory. This is similiar to the boot option knoppix home=... which was introduced in KNOPPIX 3.2 . The original persistent_home and a description you will find in the archive knx_persistent_home_XXX.zip in the 3rd_party folder of the plugscript home page .

Note, that any method to make the home directory persistent requires at least one Linux writable disk partition on the ataraid array. An ntfs partition (the Windows NT/2000/XP filesystem), is not safely writable by Linux and thus will not work.

The original persistent_home by Matthias Schwarze as well as the knoppix home=.. feature also belong to that category of scripts, which currently don't know about ataraid adapters. (Thus, when scanning the harddisk partitions for a the loopback-file conaining your home, ataraid partitions will be skipped.) However, the version of persistent_home shipped with the plugconf package handles ataraid correctly.

Now, mount the partition on which you want to store your home directory, e.g. by clicking on the matching icon on your Desktop. Note that you cannot use a partition containing a ntfs filesystem (the format which comes with Windows NT/2000/XP) since writing to such partitions is very unsafe under Linux. You will probably lose all data on that partition if you try!!! If you only have a single big partition with NTFS you may either buy another hard disk or use one of the partitioning tools (only available from commercial suppliers, e.g. PartitionMagic from powerquest or AcronisOSselector) which can safely resize NTFS. Make the NTFS partition smaller, and add another partition, e.g. of the ext2 or FAT32 type.

If your destination partition is mounted correctly run the knx_persistent_home program (or just click on the icon 'Make your HOME directory persistent'.) This program will assist you in creating an image file, in which your home directory is stored. If you are ready, you can reboot again and everything should work. However, you always must enter 'knoppix floppyconfig' at the 'boot:' prompt.

Booting without a floppy

If everything works fine you may want to get rid of that 'knoppix floppyconfig', along with it's attendant floppy. You can record the contents of the floppy directly to your KNOPPIX CD-ROM. For that, go to the plugconf/tools folder on the floppy and run mmkcdrom. Always select 'Next' or type 'Enter' and you should get a working CD-ROM.

Still questions ?

If you have comments, if something is not clear, or seems not to work, feel free to write a mail to holzhey@iapp.de .

Thanks

This page was created with the help and many ideas of Karl O. Pinc.

documentation index

plugscript home page