Subject: Re: Big RAIDframe
To: None <tech-kern@netbsd.org>
From: Greg Oster <oster@cs.usask.ca>
List: tech-kern
Date: 03/05/2007 14:44:07
der Mouse writes:
> Is RAIDframe terabyte-clean?  In particular, if I RAIDframe together
> partitions so as to produce a RAID volume larger than 2TB, will the
> resulting volume work?  (Okay, let's say not, does it work, but raer,
> should it work.  Unless someone has experience saying it does, which
> would be very welcome.)
> 
> This is under 3.0.  If it doesn't work on 3.0 but does on something
> later, that information too would be welcome.  It's a live production
> machine with important data on it, so I can't casually try things that
> might roach the data.

The only "32-bit issue" that you might run into is the one related to:

        int     numRUsComplete; /* number of Reconstruction Units done */
        int     numRUsTotal;    /* total number of Reconstruction Units */

where you could run into problems if the number of "Reconstruction 
Units" overflows.  The fix is to change the above to:

 RF_StripeCount_t numRUsComplete; /* number of Reconstruction Units done */
 RF_StripeCount_t numRUsTotal;    /* total number of Reconstruction Units */

but I've been a slacker, and havn't verified the correctness of this 
in all places where those variables are used... (and or checked them 
for other 32-bit issues). 

As a workaround:  Stripe Units and Reconstruction Units are usually 
mapped 1:1.  In your raid0.conf file you have lines like:

           START layout
           # sectPerSU SUsPerParityUnit SUsPerReconUnit RAID_level
           32 1 1 5

If you change that 3rd value to (say) 100, then the number of RU's 
you have will be 1/100 of the number of stripes in the RAID.  And so 
long as that value fits inside a 32-bit (signed), you won't encounter 
the above 32-bit problem...

There are also some issues where raidctl gets back a 32-bit version 
of a 64-bit number (numBlocks), but I think that's only cosmetic...

Later...

Greg Oster