FastTrak on RedHat

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hey all,  i've finally got this working w/ the promise fasttrak.so on 2.4.18-3 uniprocessor

I originally had problems with the drives doing “Drive Interrupt Time Out” and “RESET Channel1” etc..

 

So, I followed the readme in their latest driver Version 1.02.0.25 & Booted w/ redhat cd-rom, appended the setup as instructed:

linux ide0=0x1f0,0x3f6,14 ide1=0x170,0x376,15 ide2=0 ide3=0 ide4=0 ide5=0 ide6=0 ide7=0 ide8=0 ide9=0 expert


then I added the following into my Grub kernel parameters:

 

ide0=0x1f0,0x3f6,14 ide1=0x170,0x376,15 ide2=0 ide3=0 ide4=0 ide5=0 ide6=0 ide7=0 ide8=0 ide9=0

 

and tada, no probs! It still seems weird that it’s working properly when cat /proc/pci says it’s on IRQ 5 w/ different I/O addresses. But oh well.

 

So, not that I’ve got it working, I’d like to be able to monitor my raid array, locally & remotely. Promise provides a tiny text with some info, locates at /proc/scsi/FastTrak/x

Where x is the array you’re looking at. Here’s my 120GB Raid 1:

[root@redhat root]# cat /proc/scsi/FastTrak/0

PROMISE FastTrak Series Linux Driver Version 1.02.0.25 

Adapter1 - FastTrak TX2000, IRQ(5)

Array    - Array[1] : 1X2 Mirror (OK-Gigabyte Boundary)

Drive    -

  1: IC35L120AVV207 Pri/Master Array[1] 123522MB BASE(0xc000) BM(0xd000) UDMA5

  3: IC35L120AVV207 Sec/Master Array[1] 123522MB BASE(0xc800) BM(0xd008) UDMA5

 

 

sure, great all good & well, but where’s some real info? Where’s the logs?... hrm.. I checked the zip they provided on http://www.promise.com and found this file: FT-ioctl.txt

it looks like a doc for c-source using ioctl for querying info about the drives..

 

well I know nothing about C and this is the first I’ve ever seen it, so I gave it a whirl J

 

/////////// BEGIN SOURCE //////////////

#include <unistd.h>

#include <sys/ioctl.h>

#include <stdio.h>

#include <fcntl.h>

#include <linux/hdreg.h>

#include <linux/fs.h>

#include <string.h>

#include <assert.h>

 

#define FT_Max_Ada      2

#define FT_Max_Arr      4

#define FT_Max_Dev      8

 

//The SwapBox structure for IOCTL (0X3803)

typedef struct {

   unsigned char        present;   // box present

   unsigned char        BoxID;     // different kind of box

   unsigned short       MIC;       // monitor IC vendor ID

   unsigned long        RPM;

   unsigned short       TmpC;

   unsigned short       TmpF;

   unsigned short       Vcc;       // (mv)

   unsigned short       V12;       // (mv)

} ft_swapbox_t;

 

//The Main Adapter structure for IOCTL(0x3801)

typedef struct {

   unsigned short       deviceid;

   unsigned char        irq;

   unsigned short       base[5];

   unsigned int         rom;

} ft_ladainfo_t;

 

//The Array structure for ft_info_t - IOCTL(0x3801)

typedef struct {

   unsigned char        ID;        // array ID

   unsigned char        Flag;      // normal(0x0F)

   unsigned char        RAID;      // RAID Mode

   unsigned char        StripeBlockPower;

   unsigned short       Cyl;

   unsigned char        Hd;

   unsigned char        Sctr;

   unsigned int         Size;      // total size

   unsigned int         Watermark; // has rebuilt size

   unsigned char        strm;      // component disks

} ft_larrinfo_t;

 

//The Main Information structure for IOCTL (0x3801)

typedef struct {

   unsigned char        ver[30];

   ft_ladainfo_t        adainfo[FT_Max_Ada];

   ft_larrinfo_t        arrinfo[FT_Max_Arr];

   unsigned char        rebdev;    // rebuilding drive

} ft_info_t;

 

//event log struct provided thru ioctl

typedef struct {

   int sequence;

   int eventid;

   int arrayid;

   int diskid;

} snmp_log_t;

 

int main ()

{

        ft_info_t prom;

        snmp_log_t ftLog[50];

        char ftDrives[512];

 

        int fd1;

        FILE *file1;

        int i;

 

        file1 = fopen("/dev/sda","r");

        fd1 = fileno(file1);

 

        if ( ioctl(fd1, 0x3801, &prom) );

        {

                printf("version: %s\n", prom.ver);

 

                for (i = 0; i < 4; i++)

                {

 

                        printf("deviceid: %i\n", prom.adainfo[i].deviceid);

                        printf("irq: %c\n", prom.adainfo[i].irq);

                        printf("base: %i\n", prom.adainfo[i].base);

                        printf("rom: %i\n", prom.adainfo[i].rom);

                }

                for (i = 0; i < 4; i++)

                {

                        printf("ID: %c\n", prom.arrinfo[i].ID);

                        printf("Flag: %c\n", prom.arrinfo[i].Flag);

                        printf("RAID: %c\n", prom.arrinfo[i].RAID);

                        printf("StripeBlockPower: %c\n", prom.arrinfo[0].StripeBlockPower);

                        printf("Cyl: %i\n", prom.arrinfo[i].Cyl);

                        printf("Hd: %c\n", prom.arrinfo[i].Hd);

                        printf("Sctr: %c\n", prom.arrinfo[i].Sctr);

                        printf("Size: %c\n", prom.arrinfo[i].Size);

                        printf("Watermark: %i\n", prom.arrinfo[i].Watermark);

                        printf("strm: %c\n", prom.arrinfo[i].strm);

                }

 

                printf("rebdev: %c\n", prom.rebdev);

        }

        for (i = 0; i < 4; i++)

        {

                ftDrives[0] = (char)i;

                if ( ioctl(fd1, 0x3802, &ftDrives) );

                {

                        printf("drive %i: %s\n", i, ftDrives);

                }

        }

        if ( ioctl(fd1, 0x3806, &ftLog) );

        {

                for (i = 0; i < 50; i++)

                {

                        printf("log sequence %i: %i\n", i, ftLog[i].sequence);

                        printf("log eventid %i: %i\n", i, ftLog[i].eventid);

                        printf("log arrayid %i: %i\n", i, ftLog[i].arrayid);

                        printf("log diskid %i: %i\n", i, ftLog[i].diskid);

                }

        }

        close (fd1);

}

///////////////// END SOURCE ///////////////

 

so, it outputs some data, but nothing useful, mostly magic numbers and eventids :(

 

does anyone know of any tools to manage the FastTrak raid array on linux, either locally or remotely, and any tools to show the logs, and status of the array?

 

p.s. if this source is broken, email me for the source, will be happy to share.

 


[Index of Archives]     [Linux RAID]     [Linux Device Mapper]     [Linux IDE]     [Linux SCSI]     [Kernel]     [Linux Books]     [Linux Admin]     [GFS]     [RPM]     [Yosemite Campgrounds]     [AMD 64]

  Powered by Linux