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" <a...@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
> 


Reply via email to