Thread (2 messages) flat view 2 messages, 2 authors, 2009-01-21

Re: Roadmap for md/raid ???

From: Neil Brown <hidden>
Date: 2009-01-19 22:32:31

On Monday January 19, davidsen@tmr.com wrote:
Neil Brown wrote:
quoted
The difficulty is "How do you handle a crash?"
If you crash and restart in the middle of a reshape, you need to know
where all the data is.
To follow your scheme, you would need to update the metadata for
every block that is moved.

  
That would seem to be an issue doing it in a large task as well, if I 
understand what you want to do. After the data have been written to the 
spare space I believe you are going to write it back. If you update the 
metadata before the write and something happens you have old metadata 
but data in another format. Conversely, if you update the metadata 
first, and something happens, you have the metadata describing a change 
which didn't happen. So You would have to have a metadata reflecting the 
data not being in the array, but actually somewhere else, or you would 
have to keep the spare space inside the array, where room might not be 
available.
I "freeze" a section of the array so that any writes block,
I copy that data to somewhere safe, and mark that copy as being a
valid copy of the moved data.
Then I copy it back in the new layout and update the array metadata to
show that the change-over point between old-layout and new-layout has
changed.  Then I invalidate the copy.
Then repeat.

When restarting an array, mdadm checks the copy (which could be in a
file on a different device) and if it is valid, it is copied on to
the array and the metadata is updated.

NeilBrown
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help