Solving the dmraid and "attempt to access beyond end of device" problem

Yesterday, i decided to activate the so-called RAID 0 support on my P4P800 mainboard, to increase the performance of my 2 Seagate SATA disk -- bought for this purpose. The first unfortunate event was to discover that there is 3 levels of hardware RAID: controller, accelerator and fake. Of course fake RAID is not the better category and it is the one provided by my mainboard. Once, i have understood that i must use the package dmraid to activate my RAID, i fall into a syslog flood of messages concerning "attempt to access beyond end of device".

The problem is simple, the partition table are stored on the first disk of the RAID. Linux believes that he can reach the end of the device defined in the partition table of the first disk. But since, the partition table is for the whole RAID, it cannot access the last partition.

In fact, the solution is quite simple and described here . You must add files to udev and hal rules to ignore the partition found in the partition table of the first disk:

/etc/udev/rules.d/000dmraid.rules

KERNEL=="sda1", OPTIONS+="ignore_device"
KERNEL=="sda2", OPTIONS+="ignore_device"
KERNEL=="sda3", OPTIONS+="ignore_device"

(where sda1/2/3 are the partition stored on my RAID)

/etc/hal/fdi/preprobe/000dmraid.fdi

<?xml version="1.0" encoding="UTF-8"?>

<deviceinfo version="0.2">
  <device>
    <match key="scsi.model" string="ST3160811AS">
      <merge key="info.ignore" type="bool">true</merge>
    </match>
  </device>
</deviceinfo>

(where ST3160811AS is my two Seagate disks)

You should not ignore the whole disk in udev -- as i think it is suggested in the spanish web page (i don't speak spanish so i really don't know what it explains). After adding this two files, you must update your initrd:

update-initramfs -u

If you have problem with this configuration (you have ignored too much things), you can go back to the former initrd from grub command line, by editing the menu entry and editing the standard initrd to add ".bak" at the end.



At least, i got what i want:

~$ sudo hdparm -Tt /dev/mapper/isw_dhgabfaiad_RAID_Volume1

/dev/mapper/isw_dhgabfaiad_RAID_Volume1:
 Timing cached reads:   1354 MB in  2.00 seconds = 676.78 MB/sec
 Timing buffered disk reads:  426 MB in  3.01 seconds = 141.51 MB/sec

Not that bad for an old P4.

Comments

1. On Wednesday, December 5 2007, 09:55 by Cstamas

Why do not you use pure linux sw raid ?

2. On Wednesday, December 5 2007, 10:49 by gildor

This is a good point. I think there is no difference between using "fake RAID" and "sw RAID" concerning performance. The latest should even be more flexible when trying different RAID level (which i cannot do with my current "fake RAID" BIOS). In fact, i have begin to use this so called RAID, before understanding that this was fake RAID. If i have to do it again, i think i will use sw RAID -- Linux implementation seems to be really great.

3. On Monday, September 29 2008, 11:26 by dai

Ta mate. This helped me.
dai.

4. On Thursday, December 11 2008, 12:38 by fjk

Hello,

where i can find <match key="scsi.model" string="ST3160811AS"> string for my disk ?

5. On Thursday, December 11 2008, 12:45 by gildor

Use "lshal | grep scsi.model" to find the string that can match your hard drive.

They posted on the same topic

Trackback URL : http://sylvain.le-gall.net/blog/index.php?trackback/31

This post's comments feed