Question regarding Linux 2.4.18 and the ataraid set-up for the Fasttrak 100 Raid Controller

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

 



Hi,

I am using 2.4.18

with the following set in the config file:

CONFIG_BLK_DEV_ATARAID=y
CONFIG_BLK_DEV_ATARAID_PDC=y
ONFIG_BLK_DEV_ATARAID_HPT=y


What I would like to do is analyse the output from 'cat /proc/partitions'

using code fragments such as

list_ataraid() {
  DRV=`expr $2 / 16`
  NUM=`expr $2 % 16`
  if [ "$NUM" = "0" ]; then
    ATARAID_IDE_Count=`expr ${ATARAID_IDE_Count} + 1`
    fdisk -l /dev/ataraid/d${DRV} >> $TMP/SeTfdisk
  fi
}


....
    if [ "$MAJOR" = "114" ]; then
      list_ataraid $MAJOR $MINOR

and then return a file containing the output of this 'probing'. Output of

cat /proc/partition:

major minor  #blocks  name

 114     0  120103137 ataraid/disc0/disc
 114     1          1 ataraid/disc0/part1
 114     5   35849016 ataraid/disc0/part5
 114     6   84244828 ataraid/disc0/part6
 114    16   60051568 ataraid/disc1/disc
 114    17    7389868 ataraid/disc1/part1
 114    18      40162 ataraid/disc1/part2
 114    19      40162 ataraid/disc1/part3
 114    20          1 ataraid/disc1/part4
 114    21    1413688 ataraid/disc1/part5
 114    22   51166993 ataraid/disc1/part6
  56     0   60051600 ide/host4/bus0/target0/lun0/disc
  56     1    7389868 ide/host4/bus0/target0/lun0/part1
  56     2      40162 ide/host4/bus0/target0/lun0/part2
  56     3      40162 ide/host4/bus0/target0/lun0/part3
  56     4          1 ide/host4/bus0/target0/lun0/part4
  56     5    1413688 ide/host4/bus0/target0/lun0/part5
  56     6   51166993 ide/host4/bus0/target0/lun0/part6
  34     0   60051600 ide/host2/bus1/target0/lun0/disc
  34    64   60051600 ide/host2/bus1/target1/lun0/disc
  34    65          1 ide/host2/bus1/target1/lun0/part1

Also extracted from dmesg and fdisk -l
...

ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
ide3 at 0x7400-0x7407,0x7002 on irq 3
ide4 at 0x6400-0x6407,0x6002 on irq 10

PDC20265: (U)DMA Burst Bit ENABLED Primary PCI Mode Secondary PCI Mode.
    ide4: BM-DMA at 0x5000-0x5007, BIOS settings: hdi:pio, hdj:pio
    ide5: BM-DMA at 0x5008-0x500f, BIOS settings: hdk:pio, hdl:DMA

hdg: IBM-DTLA-307060, ATA DISK drive
hdg: 120103200 sectors (61493 MB) w/1916KiB Cache, CHS=119150/16/63,
UDMA(100)
hdh: IBM-DTLA-307060, ATA DISK drive
hdh: 120103200 sectors (61493 MB) w/1916KiB Cache, CHS=119150/16/63,
UDMA(100)

Disk /dev/ataraid/d0: 255 heads, 63 sectors, 14952 cylinders
Units = cylinders of 16065 * 512 bytes

           Device Boot    Start       End    Blocks   Id  System
/dev/ataraid/d0p1             2     14952 120093907+   f  Win95 Ext'd (LBA)
/dev/ataraid/d0p5             2      4464  35849016   83  Linux native
/dev/ataraid/d0p6          4465     14952  84244828+  83  Linux native

hdi: IC35L060AVER07-0, ATA DISK drive
hdi: 120103200 sectors (61493 MB) w/1916KiB Cache, CHS=119150/16/63,
UDMA(100)

Disk /dev/hdi: 255 heads, 63 sectors, 7476 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
/dev/hdi1   *         1       920   7389868+   7  HPFS/NTFS
/dev/hdi2           921       925     40162+  83  Linux native
/dev/hdi3           926       930     40162+  83  Linux native
/dev/hdi4           931      7476  52580745    f  Win95 Ext'd (LBA)
/dev/hdi5           931      1106   1413688+  82  Linux swap
/dev/hdi6          1107      7476  51166993+   b  Win95 FAT32

Disk /dev/ataraid/d1: 255 heads, 63 sectors, 7476 cylinders
Units = cylinders of 16065 * 512 bytes

           Device Boot    Start       End    Blocks   Id  System
/dev/ataraid/d1p1   *         1       920   7389868+   7  HPFS/NTFS
/dev/ataraid/d1p2           921       925     40162+  83  Linux native
/dev/ataraid/d1p3           926       930     40162+  83  Linux native
/dev/ataraid/d1p4           931      7476  52580745    f  Win95 Ext'd (LBA)
/dev/ataraid/d1p5           931      1106   1413688+  82  Linux swap
/dev/ataraid/d1p6          1107      7476  51166993+   b  Win95 FAT32


Notes:
 (1) I managed to surpress /dev/hdg, /dev/hdh (which fdisk gave warnings
about), by some scripting (using the variable 'ATARAID_IDE_Count'), but this
maybe incorrect.
 (2) /dev/hdi  and /dev/ataraid/d1 refer to the same physical disk (hence
the same partition information).

Say for the ** SAME ** linux swap partition, my probe returns:
/dev/ataraid/d1p5 and /dev/hdi5.

Is there a way to tell from something, say in /proc which /dev/hd* is
actually on the /dev/ataraid device, so I can get the 'probe' script
to only detect this partition once?





[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