Re: a dmraid bug on Promise RAID (urgent! resend)

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

 



It's already in FC6.
See http://people.redhat.com/heinzm/sw/dmraid/ as well.

Heinz

On Tue, Oct 17, 2006 at 11:13:06AM +0800, Conke Hu wrote:
> Resend
> 
> ________________________________
> 
> From: Conke Hu 
> Sent: 2006年9月29日 20:38
> To: 'Mauelshagen@xxxxxxxxxx'
> Cc: 'g.hoogewerf@xxxxxxxxx'
> Subject: a dmraid bug on Promise RAID
> 
>  
> 
> Hi,
> 
>        There is bug in pdc.c (lib/format/ataraid/pdc.c). when you activate the promise software RAID, you will get the following error messages:
> 
> #dmraid -ay
> 
> ERROR: pdc: identifying /dev/sda, magic_0, 0xb18d6/0xb16a4, magic_1: 0xb18d6/0xb18d6, total_disks: 2
> 
> ERROR: pdc: identifying /dev/sdb, magic_0, 0xb18d6/0xb16a5, magic_1: 0xb18d6/0xb18d6, total_disks: 2
> 
> No RAID disks  
> 
>        We’ve found the root cause. Firstly let’s take a look at struct pdc:
> 
>        struct pdc {
> 
>        uint8_t promise_id[PDC_ID_LENGTH];   /* 0x00 - 0x17 */
> 
>        uint32_t unknown_0;                /* 0x18 - 0x1B */
> 
>        uint32_t magic_0;                     /* 0x1C - 0x1F */
> 
>        According to the Promise engineer, the value set at offset 0x1C is not a magic number, but records the RAID engine version. So when dmraid executes the following code (lib/format/ataraid/pdc.c):
> 
>     if (pdc->magic_0 == pdc->raid.magic_0 &&
> 
>             pdc->raid.total_disks &&
> 
>             pdc->raid.total_disks < PDC_MAXDISKS)
> 
>                 return 1;
> 
>        it always returns 1 since pdc->magic_0 never equals pdc->raid.magic_0 ! 
> 
>        To fix this bug, dmraid source code only needs to ignore checking magic_0, modified to the following:
> 
>        if ( pdc->raid.total_disks &&
> 
>             pdc->raid.total_disks < PDC_MAXDISKS)
> 
>                 return 1;
> 
>        I have tested this modification and it is safe to delete “pdc->magic_0 == pdc->raid.magic_0”.
> 
>        Could you please do this change in next dmraid version?
> 
>  
> 
> Thanks!
> 
> Conke

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

Heinz Mauelshagen                                 Red Hat GmbH
Consulting Development Engineer                   Am Sonnenhang 11
Storage Development                               56242 Marienrachdorf
                                                  Germany
Mauelshagen@xxxxxxxxxx                            PHONE +49  171 7803392
                                                  FAX   +49 2626 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-

_______________________________________________
Ataraid-list mailing list
Ataraid-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/ataraid-list

[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