Thanks for explaining the constraints you'd like to see on any potential
solution. It would be possible to create some sort of method for extending
an existing RAID-Z stripe; it will be quite complicated.

I think it's fair to say that while the ZFS team at Sun is working on some
facilities that will be required for this sort of migration, their priorities
lie elsewhere. The OpenSolaris community at large, however, may see this as
a high enough priority that some group wants to give it a shot. I suggest
that you file an RFE at least.

Adam

On Mon, Jul 30, 2007 at 05:55:11PM -0700, Dave Johnson wrote:
> They perform it while online.  The operation takes an extensive amount of 
> time... presumably due to the overhead involved in performing such an 
> exhaustive amount of data manipulation.
> 
> There are optimizations one could take but for simplicity, I expect this 
> would be one way a hardware controller could expand a RAID5 array:
> 
> -Keep track of "access method" address using "utility area" on the existing 
> array (used to keep track of the address in the array beyond witch uses the 
> "new" stripe size.  needs to be kept updated on disk in case of power outage 
> during array expansion).
> 
> -Logically "relocate" first stripe of data on existing array to an area 
> inside the "utility area" created previously for this purpose
> 
> -Modify controller logic to add a temporary "stripe access method" check to 
> the access algorithm (used from this point forward until expansion is 
> complete)
> 
> -Read data from full stripe on the disk starting at address 00 (Stripe "A")
> 
> -Read additional data additional stripes on disk until the aggregation of 
> stripe reads is greater than or equal to new stripe size
> 
> -Write aggregated data in new stripe layout to previously empty stripe, plus 
> blocks from newly added stripe members
> 
> -Update "stripe access method" address
> 
> -Read next stripe
> 
> -Aggregate data left over from previously read stripe with next stripe
> 
> -Write new stripe in similar fashion as above
> 
> -Update "stripe access method" address
> 
> -Wash, rinse, repeat
> 
> -Write relocated stripe 00 back to beginning of array
> 
> -Remove additional logic to check for "access method" for array
> 
> 
> How one would perform such an operation in ZFS is left as an exercise for 
> the reader :)
> 
> -=dave
> 
> ----- Original Message ----- 
> From: "Adam Leventhal" <ahl at eng.sun.com>
> To: "MC" <rac at eastlink.ca>
> Cc: <zfs-code at opensolaris.org>
> Sent: Monday, July 30, 2007 4:06 PM
> Subject: Re: [zfs-code] Raid-Z expansion
> 
> 
> >> RAIDz does not let you do this:  Start from one disk, add another disk
> >> to mirror the data, add another disk to make it a RAIDz array, and add
> >> another disk to increase the size of the RAIDz array.
> >
> > That's true: today you can't expand a RAID-Z stripe or 'promote' a mirror
> > to be a RAID-Z stripe. Given the current architecture, I'm not sure how
> > that would be done exactly, but it's an interesting though experiment.
> >
> > How do other systems work? Do they take the pool offline while they 
> > migrate
> > data to the new device in the RAID stripe or do they do this online? How
> > would you propose this work with ZFS?
> >
> > Adam
> >
> > -- 
> > Adam Leventhal, Solaris Kernel Development       http://blogs.sun.com/ahl
> > _______________________________________________
> > zfs-code mailing list
> > zfs-code at opensolaris.org
> > http://mail.opensolaris.org/mailman/listinfo/zfs-code
> > 
> 
> _______________________________________________
> zfs-code mailing list
> zfs-code at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/zfs-code

-- 
Adam Leventhal, Solaris Kernel Development       http://blogs.sun.com/ahl

Reply via email to