<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
I must warn you that all these new tests and results have been done
after SATA RAID has been DISABLED on bios and installed FC6 with the
"nodmraid" option.<br>
<a class="moz-txt-link-freetext" href="http://www.latinsud.com/ddf1-HP_ML310-ICH7.tar.bz2">http://www.latinsud.com/ddf1-HP_ML310-ICH7.tar.bz2</a><br>
<br>
After all that I've also been playing with source code, cleaned up code
and compiled with debugging:<br>
<tt>/* Find the offset for this config/drive. */<br>
static uint64_t get_offset(struct ddf1 *ddf1, struct ddf1_config_record
*cr,<br>
                           struct ddf1_phys_drive *pd)<br>
{<br>
        uint64_t * kk;<br>
        int i = get_offset_entry(ddf1, cr, pd);<br>
        if (i < 0)<br>
                return pd->size;<br>
        else {<br>
                kk=CR_OFF(ddf1, cr);<br>
                return kk[i];<br>
        }<br>
}<br>
</tt><br>
Then I got this:<tt><br>
Starting program: /root/dmraid/1.0.0.rc13-mio/tools/dmraid -s<br>
Program received signal SIGSEGV, Segmentation fault.<br>
0x0806687b in get_offset (ddf1=0x9f55768, cr=0x9f567d0, pd=0x9f56000)
at format/ddf/ddf1.c:189<br>
189                     return kk[i];<br>
(gdb) bt<br>
#0  0x0806687b in get_offset (ddf1=0x9f55768, cr=0x9f567d0,
pd=0x9f56000) at format/ddf/ddf1.c:189<br>
#1  0x08068089 in group_rd (lc=0x9f54520, rs_group=0x9f58908,
rd_group=0x9f54670) at format/ddf/ddf1.c:746<br>
#2  0x0806831f in ddf1_group (lc=0x9f54520, rd=0x9f54670) at
format/ddf/ddf1.c:817<br>
#3  0x0805434f in dmraid_group (lc=0x9f54520, rd=0x9f54670) at
metadata/metadata.c:657<br>
#4  0x0805476c in group_set (lc=0x9f54520, name=0x0) at
metadata/metadata.c:873<br>
#5  0x0804bdb5 in build_sets (lc=0x9f54520, sets=0xbfd506ec) at
toollib.c:69<br>
#6  0x0804b96f in get_metadata (lc=0x9f54520, p=0x8073ce8,
argv=0xbfd506ec) at commands.c:640<br>
#7  0x0804baa7 in _perform (lc=0x9f54520, p=0x8073ce8, argv=0xbfd506ec)
at commands.c:767<br>
#8  0x0804bb7f in perform (lc=0x9f54520, argv=0xbfd506ec) at
commands.c:787<br>
#9  0x0804aa21 in main (argc=2, argv=0xbfd506ec) at dmraid.c:34<br>
(gdb) print kk<br>
$1 = (uint64_t *) 0x9f969cc</tt><br>
Where "kk" takes random values each execution.<br>
<tt><br>
</tt>Then I tried a modification (without really knowing what i was
doing) and it looks like it quite worked:<br>
<tt>ddf1_cr_off_maxpds_helper(...) {<br>
    struct ddf1_header *h = ddf1->primary;<br>
    printf("WAA %d %d\n",  h->max_phys_drives ,
h->max_primary_elements);<br>
    return  h->max_phys_drives; /* Always return this, like assume
adaptec_mode==1 */<br>
}<br>
</tt><br>
And I got this with "dmraid -s":<tt><br>
Starting program: /root/dmraid/1.0.0.rc13-mio/tools/dmraid -s<br>
WAA 15 65535<br>
WAA 15 65535<br>
WAA 15 65535<br>
WAA 15 65535<br>
WAA 15 65535<br>
WAA 15 65535<br>
WAA 15 65535<br>
WAA 15 65535<br>
*** Group superset .ddf1_disks<br>
--> Subset<br>
name   : ddf1_MiArray<br>
size   : 312237824<br>
stride : 128<br>
type   : mirror<br>
status : ok<br>
subsets: 0<br>
devs   : 2<br>
spares : 0<br>
Program exited normally.</tt>
<br>
<br>
And with "dmraid -ay" (in dmesg):<br>
<tt>device-mapper: ioctl: 4.10.0-ioctl (2006-09-14) initialised:
<a class="moz-txt-link-abbreviated" href="mailto:dm-devel@redhat.com">dm-devel@redhat.com</a><br>
device-mapper: multipath: version 1.0.5 loaded<br>
...<br>
device-mapper: table: 253:2: mirror: Device lookup failure<br>
device-mapper: ioctl: error adding target to table<br>
</tt><br>
Sorry i never used dmraid or device-mapper before, does that mean it
all worked except for device-mapper?<br>
<br>
By the way, this is what i did to get the last 32MB of each drive:<br>
<tt>dmesg | grep sda<br>
SCSI device sda: 312581808 512-byte hdwr sectors (160042 MB)<br>
...<br>
dd if=/dev/sda of=sda.dat bs=512 skip=$((312581808-2*32*1024))<br>
dd if=/dev/sdb of=sdb.dat bs=512 skip=$((312581808-2*32*1024))<br>
</tt><br>
HP offers a driver (with source code) for Proliant SmartArray for
RHEL/CentOS and other distros,
<a class="moz-txt-link-freetext"
 href="http://h18023.www1.hp.com/support/files/server/us/download/25356.html">http://h18023.www1.hp.com/support/files/server/us/download/25356.html</a>,
but i'm not sure whether it's for my device (had a look at
include/linux/pci_ids.h and did not match).<br>
Do you think we will be able to set it up using Fedora and dmraid, any
advice? I might also try to update firmware.<br>
Thanks.<br>
<br>
Heinz Mauelshagen escribió:
<blockquote cite="mid20070201091840.GA29643@redhat.com" type="cite">
  <pre wrap="">On Fri, Jan 26, 2007 at 10:28:43AM +0100, SuD wrote:
  </pre>
  <blockquote type="cite">
    <pre wrap="">Hi, i'm using a HP ML310 (with removable disks) server with some ICH7. I 
configured raid1 from bios. It has 2 HD of 160MB each.
Fedora core 6 installation will hang from the start unless i add 
"nodmraid" to boot.

This is the output of commands:
* lspci | grep ATA:
00:1f.2 Raid bus controller: Intel 82801GR/GH (ICH7 Family) Serial ATA 
Storage Controller RAID (rev 01)
Device is 8086:27c3

* dmraid -r:
/dev/sda: ddf1, ".ddf_disks", GROUP, ok, 312237856 sectors, data@ 0
/dev/sdb: ddf1, ".ddf_disks", GROUP, ok, 312237856 sectors, data@ 0
(shouldn't be "isw"?)
    </pre>
  </blockquote>
  <pre wrap=""><!---->
This is DDF1 metadata.

Can you send me the last 32MB of each drive dd'ed off into file sda.dat
and sdb.dat for analysis, please ?

tar/bzip2 them into ddf1-HP_ML310-ICH7.tar.bz2 before sending.

Thanks,
Heinz
  </pre>
  <blockquote type="cite">
    <pre wrap="">* dmraid -ay
Segmentation fault

Thanks</pre>
  </blockquote>
</blockquote>
<br>
</body>
</html>