Slackware 14 and Adaptech 1420SA Hardware RAID Controller
hi, i have an old machine with intel pentium 3.2ghz, 2gb ram and 500gb hard disk for linux. additionally i have a hardware raid controller, Adaptec 1420SA, with 2 500gb hard disks.
in bios I've already created an array with raid 1 (mirroring) with those 2 hard disks. now somehow I have to mount this array in slackware. I actually don't know how. in /dev I only see my sdaX partitions from primary 500gb hard disk. I looked in dmesg and found something about the hardware / drivers etc. dmesg output (filtered) Quote:
Quote:
Quote:
i don't want to throw away my old machine and my plan is to setup a simple server with some services. hope you guys can help me out with this issue edit: i'm using slackware 14, 32-bit, kernel 3.7.1-smp #2 |
I think what you have is a "Fake Hardware RAID" controller. That means the RAID functions are done by a proprietary driver (from Adaptec) for each operating system. The Adaptec site has drivers for SuSE and Red Hat but those are quite old (2006). I doubt that you will find RAID drivers compatible with any current Linux distro.
Adaptec also has a "SHIM" source code package that could be used to write a driver for modern kernels and possibly Slackware. Adaptec SATA HostRAID SHIM Package Unless you are comfortable modifying or writing kernel drivers, I don't recommend trying this. That was the bad news. Now here is the good news. Most "Fake RAID" controllers are just a "normal" ATA or SATA controller chip with an extra BIOS ROM and special driver software in each OS. Linux usually has "normal" (non-raid) SATA drivers will work with the controller. You can use the controller and disks as normal (non-RAID disks) in Linux. You will have to re-format the disks, so back any existing data first! If you want RAID then you can use the Linux "mdadm" program to create Linux software RAID arrays. Linux software RAID has similar performance to the Fake Hardware RAID. There are a few reasons why you might want to use Fake Hardware RAID instead of the Linux software RAID.
You can use a program called "dmraid" to detect the Fake Hardware RAID arrays and configure Linux to access them. I do that with my older Promise FastTrack RAID controller. Essentially "dmraid" detects the RAID metadata on the "raw" disks and configures the Linux "Device Mapper" with the proper disk array layout. Linux can use the normal SATA drivers to access the disks, and the "Device Mapper" does the RAID functions. This only works if there is a "normal" SATA driver in Linux that works with the disk controller chip on the controller card. The proprietary driver from Adaptec isn't required when using "dmraid". The "dmraid" program does not work with every Fake RAID metadata format. I believe that the Adaptec RAID is supported. Don't confuse "Device Mapper" with the "Mapper Device". The "dmraid" software and the program "dmsetup" are used to manage "Fake Hardware RAID" devices. The "mdadm" command is NOT used for this kind of RAID setup. Your RAID arrays and partitions will use device names in this format. Code:
/dev/mapper/adp_cgbibceck There is a second set of device names created for "Device Mapper" devices. Code:
/dev/dm-0 You must also be careful to NEVER write directly to the "normal" SATA disk drives. They will still appear as Linux devices, EX: "/dev/sda", "/dev/sda1". Depending on the array layout, some or all of the devices may appear to have partitions. Do not try to mount those partitions, and do not use "mkfs" or "fsck" on those devices. You can partition an array by specifying the array name without a partition number. Then re-detect the partitions. Code:
cfdisk /dev/mapper/adp_cgbibceck Here are the steps to build "dmraid".
Use this command to detect the arrays. Code:
dmraid -ay Are you going to boot from the RAID array? There are additional steps required to install Slackware to a "dmraid" array and allow it to boot from the array.
Next you have to create an "initrd" image and install a boot loader. I have never attempted to use "lilo" with "dmraid" although it should be possible. I use "grub" Legacy that is included with Slackware 14 in the "extras". What I recommend is to install "grub" on some other Slackware 14 system and then create a "grub" boot CD or floppy for installing "grub" in "native" mode. You can find instructions for that with "info grub". I will also be happy to make a "grub" boot CD for you. Here is what you need to do ahead of time on some other Slackware system to use "grub".
Building the "initrd" and installing the boot loader may take several attempts, I am going to explain the process from booting the Slackware install CD up until the point where you can use commands to create the "intird" or install the boot loader. You will have to use the following commands every time you boot the Slackware setup CD, in order to gain access to the Linux system you are installing.
When you are ready to make another boot attempt, here is how you restart the system.
Here are the steps to create the "initrd" for booting with "dmraid". You can use an "initrd" even if you aren't booting from RAID.
Before you can install "grub" you have to copy the needed files to "/boot/grub" and create the "/boot/grub/menu.lst" configuration file.
The "setup" command specifies where to write the "grub" boot sector. Hard disks are numbered starting with 0 for the first hard disk. Partitions are also numbered starting with 0 for the first partition. A device name such as (hd0) specifies an entire hard disk (or the MBR). A device name such as (hd0,0) specifies a partition. Partitions 0 through 3 are primary partitions. Partitions 4 and above are logical drive partitions in an extended partition. For example, the second partition on the third hard disk would be "(hd2,1)". You can write the "grub" boot sector to the Master Boot Record or a partition boot sector. Here is an example "menu.lst" file. Code:
default 0 Code:
title Windows This is an example of how NOT to write a rule. Code:
KERNEL == "dm-3", SYMLINK+="sdr2" Here is a good example for creating some normal looking device names "/dev/sdr", "/dev/sdr1", etc. that correspond to the "/dev/mapper" names. Code:
# /etc/udev/rules.d/70-local.rules: local device naming rules for udev You can also write "udev" rules based on the partition UUIDs. Be careful to prefix the rules file name with "70-" so that rules run after the environment variable "ID_FS_UUID" has been set. If you need to run your rules earlier, change the name of the rules file and un-comment the line that refers to "blkid". That rule sets the "ID_FS_UUID" environment variable and others provided by "blkid". Code:
# /etc/udev/rules.d/70-local.rules: local device naming rules for udev |
I took a look at the information for the Adaptec 1420SA controller. It actually uses a Marvell 88SX6541 SATA controller chip with some Adaptec BIOS software. Linux is loading a driver for the Marvell 6041 SATA controller.
From your "dmesg" log I can see that the driver is reporting a time-out on trying to perform an "identify" command on the disk drives. Either the driver is not compatible with the 88SX6541 chip or the disk drives are not compatible with the 88SX6541 chip. Since the Adaptec 1420SA doesn't work with the normal Linux SATA drivers you are not going to be able to use the card. You are better off to buy or scrounge a newer (or more compatible) card. The Adaptec card has NO RAID hardware. You gain nothing by using the card except four more SATA ports. You can buy a cheap two-port or four-port SATA card and do exactly the same thing with Linux software RAID. If you really want to make the Adaptec card work, the only thing I can suggest is trying a newer version of the "sata_mv" driver. You may find that in Slackware current or another Linux distro. The driver source file is "/usr/src/linux/drivers/ata/sata_mv.c". I could not tell if it is intended to work with the Marvell 88SX6541 but it appears to detect the Adaptec card. Even if you get the Linux driver working, you will still have to use Linux software RAID or "dmraid" to make the card support RAID. The Adaptec Linux driver for the card is so old that it is useless. |
All times are GMT -5. The time now is 03:13 PM. |