tech-kern archive

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

Re: ataraid(4) problems



On Fri, 14 May 2010 23:27:51 +0900
Hiroyuki Bessho <bsh%netbsd.org@localhost> wrote:

> Hi,
> 
>   Recently I've been trying to use firmware RAID facility supported
> by my motherboard (ASUS P6T) on NetBSD/amd64.  It is recognized as
> Intel MatrixRAID by ataraid(4).
> 
>   I found following three problems:
> 
>   1) accessing RAID volume causes kernel hang-up.  LOCKDEBUG kernel
>      reports:
>         Mutex error: lockdebug_barrier: spin lock held
> 
>   2) can't handle a volume larger than 2TiB.  gpt(8) command can't
> find GPT on those volumes.
> 
>      # gpt show ld0
>      gpt: error: bogus map
>      gpt: unable to open device 'rld0d': Undefined error: 0
> 
>   3) can't access to NTFS partition on a RAID0 volume.
>      # mount -t ntfs /dev/ld0e /mnt
>      ntfs_procfixups: magic doesn't match: c801c800 != 58444e49
>      ntfs_procfixups: magic doesn't match: c801c800 != 58444e49
> 
> 
>    Problem #1 is already known and filed as PR kern/38273, and a patch
>  has already been provided by Juan RP <xtraeme@> for it.
> (http://mail-index.netbsd.org/tech-kern/2008/09/17/msg002734.html)

I find it strange the user that reported the bug couldn't make it
work; even more strange is when I tested it for weeks and massively
performed IOs on multiple volumes on the same disks at a time
(feature Intel MatrixRAID) and never never had a panic or corruption...

All debugging/preventive facilities on the NetBSD kernel were enabled
(LOCKDEBUG/DIAGNOSTIC/DEBUG,WHATEVER) running on amd64 with SMP.

>   Problem #3 is a bit weird. NTFS partition can be mounted correctly
> when it is on a RAID1 volume.  I found the interleave value is handled
> incorrectly on RAID0 volume by ataraid.
>   The following patch fixed the problem #3:
> 
> ----------------------------------------------------------------
> diff -r decc052c0e82 src/sys/dev/ata/ata_raid_intel.c
> --- a/src/sys/dev/ata/ata_raid_intel.c        Thu May 13 19:59:35
> 2010 +0900 +++ b/src/sys/dev/ata/ata_raid_intel.c     Thu May 13
> 20:01:27 2010 +0900 @@ -241,7 +241,7 @@
>  
>       aai->aai_type = ATA_RAID_TYPE_INTEL;
>       aai->aai_capacity = map->total_sectors;
> -     aai->aai_interleave = map->stripe_sectors / 2;
> +     aai->aai_interleave = map->stripe_sectors;
>       aai->aai_ndisks = map->total_disks;
>       aai->aai_heads = 255;
>       aai->aai_sectors = 63;
> ----------------------------------------------------------------
> 
>   What does this " / 2 " mean exactly?

If I remember correctly the BIOS reported incorrectly stripe sectors (x2),
but I can't really verify again.

Adeu!


Home | Main Index | Thread Index | Old Index