LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 02-15-2013, 05:52 PM   #1
0zMe
Member
 
Registered: Jun 2009
Posts: 85

Rep: Reputation: 15
Question 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:
[ 0.721904] Adaptec aacraid driver 1.2-0[29800]-ms
[ 0.722388] aic94xx: Adaptec aic94xx SAS/SATA driver version 1.0.3 loaded
[ 0.795301] megaraid cmm: 2.20.2.7 (Release Date: Sun Jul 16 00:01:03 EST 2006)
[ 0.795579] megaraid: 2.20.5.1 (Release Date: Thu Nov 16 15:32:35 EST 2006)
[ 0.795761] megasas: 06.504.01.00-rc1 Mon. Oct. 1 17:00:00 PDT 2012
[ 0.795947] mpt2sas version 14.100.00.00 loaded
[ 0.796284] GDT-HA: Storage RAID Controller Driver. Version: 3.05
[ 0.796572] 3ware Storage Controller device driver for Linux v1.26.02.003.
[ 0.796747] 3ware 9000 Storage Controller device driver for Linux v2.26.02.014.
[ 0.796997] LSI 3ware SAS/SATA-RAID Controller device driver for Linux v3.26.02.000.
[ 0.797264] ipr: IBM Power RAID SCSI Device Driver version: 2.5.4 (July 11, 2012)
[ 0.797510] RocketRAID 3xxx/4xxx Controller driver v1.6 (091225)
[ 0.797681] stex: Promise SuperTrak EX Driver version: 4.6.0000.4
[ 0.798059] st: Version 20101219, fixed bufsize 32768, s/g segs 256
[ 0.798998] ata_piix 0000:00:1f.2: version 2.13
[ 0.799047] ata_piix 0000:00:1f.2: MAP [
[ 0.799160] IDE IDE P0 P1 ]
[ 0.950027] ata_piix 0000:00:1f.2: setting latency timer to 64
[ 0.950797] scsi2 : ata_piix
[ 0.951534] scsi3 : ata_piix
[ 0.952176] ata1: PATA max UDMA/100 cmd 0x1f0 ctl 0x3f6 bmdma 0x1470 irq 14
[ 0.952293] ata2: SATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0x1478 irq 15
[ 0.952692] sata_mv 0000:03:02.0: version 1.28
[ 0.952889] sata_mv 0000:03:02.0: Applying B2 workarounds to unknown rev
[ 0.953076] sata_mv 0000:03:02.0: Gen-II 32 slots 4 ports ? mode IRQ via INTx
[ 0.954745] scsi4 : sata_mv
[ 0.955049] scsi5 : sata_mv
[ 0.955332] scsi6 : sata_mv
[ 0.955614] scsi7 : sata_mv
[ 0.955867] ata3: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0222000 irq 25
[ 0.956085] ata4: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0224000 irq 25
[ 0.956275] ata5: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0226000 irq 25
[ 0.956460] ata6: SATA max UDMA/133 mmio m1048576@0xd0200000 port 0xd0228000 irq 25
[ 0.989381] md: linear personality registered for level -1
[ 0.989497] md: raid0 personality registered for level 0
[ 0.989610] md: raid1 personality registered for level 1
[ 0.989723] md: raid10 personality registered for level 10
[ 0.989836] md: raid6 personality registered for level 6
[ 0.989948] md: raid5 personality registered for level 5
[ 0.990097] md: raid4 personality registered for level 4
[ 0.990211] md: multipath personality registered for level -4
[ 1.133395] ata2.01: ATA-7: HDS123456KLA789, K2AOAB0A, max UDMA/133
[ 1.133518] ata2.01: 976773168 sectors, multi 16: LBA48 NCQ (depth 0/32)
[ 1.245364] ata2.01: failed to get Identify Device Data, Emask 0x1
[ 1.262043] ata3: SATA link down (SStatus 0 SControl 300)
[ 1.288019] tsc: Refined TSC clocksource calibration: 3200.534 MHz
[ 1.288139] Switching to clocksource tsc
[ 1.378723] ata2.01: failed to get Identify Device Data, Emask 0x1
[ 1.378729] ata2.01: configured for UDMA/133
[ 1.412435] ata1.00: ATAPI: Pioneer DVD-ROM ATAPIModel DVD-121 0100, E1.00, max UDMA/66
[ 1.412627] ata1.00: limited to UDMA/33 due to 40-wire cable
[ 1.418280] ata1.00: configured for UDMA/33
[ 1.421636] scsi 2:0:0:0: CD-ROM PIONEER DVD-ROM DVD-121R 1.00 PQ: 0 ANSI: 5
[ 1.423828] sr0: scsi3-mmc drive: 40x/40x cd/rw xa/form2 cdda tray
[ 1.423947] cdrom: Uniform CD-ROM driver Revision: 3.20
[ 1.424297] sr 2:0:0:0: Attached scsi CD-ROM sr0
[ 1.424756] scsi 3:0:1:0: Direct-Access ATA HDS123456KLA789 K2AO PQ: 0 ANSI: 5
[ 1.424610] ACPI: Invalid Power Resource to register!
[ 1.425351] sd 3:0:1:0: [sda] 976773168 512-byte logical blocks: (500 GB/465 GiB)
[ 1.425663] sd 3:0:1:0: [sda] Write Protect is off
[ 1.425786] sd 3:0:1:0: [sda] Mode Sense: 00 3a 00 00
[ 1.425830] sd 3:0:1:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 1.455127] sda: sda1 sda2 < sda5 > sda3
[ 1.455945] sd 3:0:1:0: [sda] Attached SCSI disk
[ 1.731036] ata4: SATA link down (SStatus 0 SControl 300)
[ 2.187039] ata5: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ 2.193065] ata5.00: ATA-8: MAXTOR STM1234567AS, MX15, max UDMA/133
[ 2.193186] ata5.00: 976773168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[ 7.193147] ata5.00: qc timeout (cmd 0x2f)
[ 7.193267] ata5.00: failed to get Identify Device Data, Emask 0x4
[ 7.193273] ata5.00: failed to set xfermode (err_mask=0x40)
[ 7.649037] ata5: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ 12.655147] ata5.00: qc timeout (cmd 0x2f)
[ 12.655262] ata5.00: failed to get Identify Device Data, Emask 0x4
[ 12.655270] ata5.00: failed to set xfermode (err_mask=0x40)
[ 12.655387] ata5: limiting SATA link speed to 1.5 Gbps
[ 12.655503] ata5.00: limiting speed to UDMA/133:PIO3
[ 13.112037] ata5: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 18.118147] ata5.00: qc timeout (cmd 0x2f)
[ 18.118263] ata5.00: failed to get Identify Device Data, Emask 0x4
[ 18.118271] ata5.00: failed to set xfermode (err_mask=0x40)
[ 18.118389] ata5.00: disabled
[ 18.118509] ata5: hard resetting link
[ 18.575038] ata5: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 18.575164] ata5: EH complete
[ 19.031037] ata6: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ 19.037063] ata6.00: ATA-8: MAXTOR STM9876543AS, MX15, max UDMA/133
[ 19.037181] ata6.00: 976773168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[ 24.037147] ata6.00: qc timeout (cmd 0x2f)
[ 24.037261] ata6.00: failed to get Identify Device Data, Emask 0x4
[ 24.037267] ata6.00: failed to set xfermode (err_mask=0x40)
[ 24.493038] ata6: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[ 29.499146] ata6.00: qc timeout (cmd 0x2f)
[ 29.499263] ata6.00: failed to get Identify Device Data, Emask 0x4
[ 29.499271] ata6.00: failed to set xfermode (err_mask=0x40)
[ 29.499390] ata6: limiting SATA link speed to 1.5 Gbps
[ 29.499505] ata6.00: limiting speed to UDMA/133:PIO3
[ 29.956036] ata6: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 34.962147] ata6.00: qc timeout (cmd 0x2f)
[ 34.962266] ata6.00: failed to get Identify Device Data, Emask 0x4
[ 34.962273] ata6.00: failed to set xfermode (err_mask=0x40)
[ 34.962390] ata6.00: disabled
[ 34.962510] ata6: hard resetting link
[ 35.419038] ata6: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[ 35.419165] ata6: EH complete
[ 35.419306] registered taskstats version 1
[ 35.419882] rtc_cmos 00:04: setting system clock to 2003-10-04 02:56:47 UTC (1065236207)
[ 35.420263] md: Waiting for all devices to be available before autodetect
[ 35.420382] md: If you don't use raid, use raid=noautodetect
[ 35.420795] md: Autodetecting RAID arrays.
[ 35.420914] md: Scanned 0 and added 0 devices.
[ 35.421043] md: autorun ...
[ 35.421159] md: ... autorun DONE.
[ 35.435206] EXT3-fs (sda1): error: couldn't mount because of unsupported optional features (240)
[ 35.435567] EXT2-fs (sda1): error: couldn't mount because of unsupported optional features (244)
[ 35.437205] EXT4-fs (sda1): INFO: recovery required on readonly filesystem
[ 35.437325] EXT4-fs (sda1): write access will be enabled during recovery
[ 36.410109] EXT4-fs (sda1): recovery complete
[ 36.414343] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[ 36.416360] VFS: Mounted root (ext4 filesystem) readonly on device 8:1.
[ 36.446772] devtmpfs: mounted
[ 36.446950] Freeing unused kernel memory: 680k freed
/proc/partitions output
Quote:
Device Boot Start End Blocks Id System
/dev/sda1 * 63 195318269 97659103+ 83 Linux
/dev/sda2 195318270 210949514 7815622+ 5 Extended
/dev/sda3 210949515 976773167 382911826+ 83 Linux
/dev/sda5 195318333 210949514 7815591 82 Linux swap
lspci output
Quote:
03:02.0 RAID bus controller: Adaptec Serial ATA II RAID 1420SA (rev 01)
adaptec in lspci is recognized, in dmesg the driver is loaded but it seems that there some other errors.

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

Last edited by 0zMe; 02-16-2013 at 05:19 AM.
 
Old 02-16-2013, 09:03 PM   #2
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 797

Rep: Reputation: 247Reputation: 247Reputation: 247
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 want to boot from a RAID array
  • More than one operating system will access the same array (Windows & Linux)
  • You need to "rescue" the existing data from the array
  • Some other operating system (Windows) requires that RAID setup

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
/dev/mapper/adp_cgbibceckp1
/dev/mapper/adp_cgbibceckp2
/dev/mapper/adp_cgbibceckp5
The exact name for each array is random, but each name is unique, and will always be the same every time the system is booted. The name that does not end in a number is the name for an array. The names ending in numbers are for partitions.

There is a second set of device names created for "Device Mapper" devices.

Code:
/dev/dm-0
/dev/dm-1
/dev/dm-2
/dev/dm-3
/dev/dm-4
You should not use the above names. What they refer to can change when you boot the computer or connect devices. Instead, always use the names created in "/dev/mapper".

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
dmraid -ay
udevadm trigger
mkfs -t ext4 /dev/mapper/adp_cgbibceckp2
To use "dmraid" you will have to install and build the program. You can download the "dmraid sources here. dmraid-1.0.0.rc16-18.fc18.src.rpm That is the same version of "dmraid" that I currently use. There may be newer versions. I am also happy to upload 32-bit and 64-bit "dmraid" binaries that I have built for Slackware 14.

Here are the steps to build "dmraid".
  • Un-pack the source files to a directory, "EX: "/usr/src/dmraid/1.0.0.rc16-3"
  • Configure the build environment
    Code:
    cd /usr/src/dmraid/1.0.0.rc16-3
    ./configure
  • Build the software
    Code:
    make
  • Install the software
    Code:
    make install
  • For 64-bit, move the library files to the correct location
    Code:
    mv /lib/libdevmapper* /lib64
    mv /lib/device-mapper /lib64
    If you later uninstall "dmraid" move the library files back to "/lib" or delete them manually.

Use this command to detect the arrays.
Code:
dmraid -ay
You will have to add that command to an initialization script that runs before the arrays are mounted. One way to do that is using an "initrd" image with a modified "init" script.

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.
  • Build "dmraid" on a compatible version of Slackware and a compatible kernel BEFORE you install Slackware. A virtual machine program such as VirtuaBox may be helpful for this.
  • Copy the following files to a thumb drive, floppy or CD-ROM
    Code:
    /sbin/dmraid
    /lib/libdmraid.so.1
    /lib/libdmraid.so.1.0.0
    /lib/device-mapper/libdmraid-events-isw.so
    For 64-bit use "/lib64/" instead of "/lib/".
  • On the target system, boot the normal Slackware setup CD
  • Mount the thumb drive, CD or floppy containing the "dmraid" files
    Code:
    mount /dev/sr0 /mnt
  • Copy the "dmraid" program and libraries to the RAM disk.
    Code:
    cp /mnt/dmraid /sbin
    cp /mnt/libdmraid* /lib
  • Dismount the disk containing the files
    Code:
    umount /mnt
  • Use "dmraid" to detect your arrays
    Code:
    dmraid -ay
    ls -l /dev/mapper
  • Use "fdisk" or "cfdisk" to create, modify or delete partitions
    Code:
    cfdisk /dev/mapper/adp_cgbibceck
    NOTE: "fdisk" or "cfdisk" may display slightly different names for the partitions than expected. The important thing is the array name and the ending partition number. You may see an extra or missing "p" character before the partition number.
  • Edit the Slackware setup script (so that it will detect the partitions)
    Code:
    cd /usr/lib/setup
    vi setup
  • Search for the text "if probe".
  • In the following two lines of the file, change "probe" to "fdisk"
    Code:
    if probe -l 2> /dev/null | egrep 'Linux$' 1> /dev/null 2> /dev/null ; then
     probe -l 2> /dev/null | egrep 'Linux$' | sort 1> $TMP/SeTplist 2> /dev/null
  • The result should look like this
    Code:
    if fdisk -l 2> /dev/null | egrep 'Linux$' 1> /dev/null 2> /dev/null ; then
     fdisk -l 2> /dev/null | egrep 'Linux$' | sort 1> $TMP/SeTplist 2> /dev/null
  • Save the file and then run setup.
    Code:
    setup
  • Choose your Linux partition using the "/dev/mapper/xxxx" device name, NOT a normal disk device name
  • Do not set up a swap file. You will have to do that after you have installed Slackware
  • Install the desired Linux packages
  • Do not install LILO. You will have to install a boot loader manually
  • Exit from setup
  • Un-mount the target Linux system
    Code:
    cd /
    umount /mnt/proc
    umount /mnt/sys
    umount /mnt/dev
    umount /mnt

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".
  • Install the 32-bit "grub" package from Slackware 14
  • Copy the files from "/usr/lib/grub/i386-pc" to a thumb drive, floppy or CD. To use grub on the same system, copy the files to "/boot/grub".
  • Follow the instructions in "info grub" to create a "grub" boot floppy or CD-ROM

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.
  • On the target system, boot the normal Slackware setup CD
  • Mount the thumb drive, CD or floppy containing the "dmraid" files
    Code:
    mount /dev/sr0 /mnt
  • Copy the "dmraid" program and libraries to the RAM disk.
    Code:
    cp /mnt/dmraid /sbin
    cp /mnt/libdmraid* /lib
  • Dismount the disk containing the files
    Code:
    umount /mnt
  • Use "dmraid" to detect your arrays
    Code:
    dmraid -ay
    ls -l /dev/mapper
  • Mount the target Linux file-system
    Code:
    mount -t ext4 /dev/mapper/adp_cgbibceckp1 /mnt
  • Mount the device file-system
    Code:
    mount --bind /dev /mnt/dev
  • Mount the proc file-system
    Code:
    mount --bind /proc /mnt/proc
  • Mount the sys file-system
    Code:
    mount --bind /sys /mnt/sys
  • Change the root to the target file-system
    Code:
    chroot /mnt
  • Use shell commands to build the "initrd" or install the boot loader.

When you are ready to make another boot attempt, here is how you restart the system.
  • Exit from the shell to change the root back to the RAM disk file-system
    Code:
    exit
  • Dismount the target file-system
    Code:
    cd /
    umount /mnt/sys
    umount /mnt/proc
    umount /mnt/dev
    umount/mnt
  • Press Ctrl+Alt+Delete to reboot

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.
  • Perform the steps needed to access the target Linux system being installed
  • Create the files for the "initrd"
    Code:
    mkinitrd -k 3.2.29-smp -c -r /dev/mapper/adp_cgbibceckp1 -f ext4 -u -L
    NOTE: You can skip the above step if you just want to edit or add files to an "initrd" that you have already created.
  • Edit the "init" script to add the "dmraid" command
    Code:
    cd /boot/initrd-tree
    vi init
  • Search for the text "$RESCUE"
  • You should add the "dmraid" command just before this line
    Code:
    if [ "$RESCUE" = "" ]; then
  • The result should look like this
    Code:
    # Find any dmraid detectable partitions
    dmraid -ay
    
    if [ "$RESCUE" = "" ]; then
      # Initialize RAID:
  • Copy files needed by "dmraid" to the "initrd"
    Code:
    cd /boot/initrd-tree
    cp -p /sbin/dmraid sbin
    cp -a /lib/libdmraid.so* lib
  • If you have written "udev" rules that you want to include in the "initrd", copy them
    Code:
    cp -a /etc/udev/rules.d/70-local.rules etc/udev/rules.d
  • Recreate the compressed "initrd" image using the new files
    Code:
    mkinitrd
  • Dismount devices and reboot to test the "initrd" changes

Before you can install "grub" you have to copy the needed files to "/boot/grub" and create the "/boot/grub/menu.lst" configuration file.
  • Boot the normal Slackware setup CD
  • Perform the steps needed to access the target Linux system being installed
  • You can remove the Slackware installation CD after booting from it
  • Mount the thumb drive, floppy or CD-ROM that contains the grub files from "/usr/lib/grub/i386-pc"
    Code:
    mount /dev/sr0 /mnt/cdrom
  • Create the "/boot/grub" directory if it does not already exist
    Code:
    mkdir /boot/grub
  • Copy the grub files to "/boot/grub"
    Code:
    cp /mnt/cdrom/* /boot/grub
  • Create or edit the "menu.lst" file
    Code:
    cd /boot/grub
    vi menu.lst
  • Dismount the drive containing the "grub" files
    Code:
    umount /mnt/cdrom
  • Put in the "grub" boot CD, disk or thumb drive so that it is ready to be booted
  • Reboot the computer. Boot from the "grub" boot disk.
  • When you see the "grub" menu, press "C" on the keyboard to enter "native" command mode
  • You can use the "find" command to determine the device name of your Linux partition
    Code:
    find /boot/grub/menu.lst
    find /boot/vmlinuz
  • Set the default "root" device to the partition containing your Linux system
    Code:
    root (hd0,0)
  • Install "grub" to the Master Boor Record
    Code:
    setup (hd0)

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
timeout 5

title Slackware Linux
root (hd0,0)
kernel /boot/vmlinuz vga=791 root=/dev/mapper/adp_cgbibceckp1 ro vt.default_utf8=0 load_ramdisk=1 ramdisk_size=4096
initrd /boot/initrd.gz
If you want to add a boot option for Windows it should look similar to this.

Code:
title Windows
rootnoverify (hd0,1)
chainloader +1
The last thing that I'll mention is "udev" rules for use with "dmraid". Writing "udev" rules is a little tricky because the "/dev/mapper" names are totally separate from the kernel device names "/dev/dm-X". You should not match against specific "dm-X" device names. However you can test for the kernel name "dm-" to determine if a device is a "Device Mapper" device or some other kind of device.

This is an example of how NOT to write a rule.

Code:
KERNEL == "dm-3", SYMLINK+="sdr2"
There is no guarantee which partition will be associated with "dm-3". That could change when the system is rebooted or another "Device Mapper" device is created. The result could be a corrupted RAID array or partition.

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
KERNEL!="dm-[0-9]*", GOTO="skip_arrays"
PROGRAM="/sbin/dmsetup info -c --noh -o name %N", ENV{ID_DM_NAME}="%c"
ENV{ID_DM_NAME}!="adp_cgbibceck*", GOTO="skip_array0"
ENV{ID_DM_NAME}=="adp_cgbibceck", SYMLINK+="sdr"
ENV{ID_DM_NAME}=="adp_cgbibceckp1", SYMLINK+="sdr1"
ENV{ID_DM_NAME}=="adp_cgbibceckp2", SYMLINK+="sdr2"
ENV{ID_DM_NAME}=="adp_cgbibceckp5", SYMLINK+="sdr5"
LABEL="skip_array0"
LABEL="skip_arrays"
The "dmsetup" program is used to look up the "/dev/mapper" name of a "Device Mapper" kernel device. An environment variable called "ID_DM_NAME" is set to the name. The name is then matched against rules that create the desired device names. The names appearing under "/dev/mapper" are guaranteed to be consistently assigned to the same array and partition all the time.

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
KERNEL!="dm-[0-9]*", GOTO="skip_arrays"
#IMPORT{builtin}="blkid"
ENV{ID_FS_UUID}=="1840c578-2eeb-459f-a93b-0b1d544d20f3", SYMLINK+="sdr1"
ENV{ID_FS_UUID}=="1740c378-2aeb-459f-a93b-0b1d521c20e7", SYMLINK+="sdr2"
ENV{ID_FS_UUID}=="1247c579-2ebb-459f-a93b-0b4d576a20f5", SYMLINK+="sdr5"
LABEL="skip_arrays"
You can use the "blkid" command to find out the UUIDs of the partitions.

Last edited by Erik_FL; 02-16-2013 at 09:43 PM.
 
Old 02-16-2013, 10:57 PM   #3
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 797

Rep: Reputation: 247Reputation: 247Reputation: 247
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Slackware 13.1 Hardware Raid Samcro Slackware - Installation 2 11-15-2010 04:19 AM
Slackware 13.1 hardware raid mattca Slackware 16 06-29-2010 09:14 AM
Slackware Fake Hardware RAID - Suggestions Erik_FL Slackware 5 05-20-2010 06:15 AM
Slackware 13 x64 Hardware Raid Install??? Sphex Slackware 4 11-25-2009 04:09 PM
Installing Slackware 10.1 on SATA Hardware(?) Raid 0, VIA VT8237 ftgow Slackware - Installation 7 09-16-2005 05:38 AM


All times are GMT -5. The time now is 07:36 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration