* Reshaping raid0/10 @ 2007-02-21 16:28 Jan Engelhardt 2007-02-21 19:59 ` Neil Brown 0 siblings, 1 reply; 9+ messages in thread From: Jan Engelhardt @ 2007-02-21 16:28 UTC (permalink / raw) To: linux-raid Hello, are there any plans to support reshaping on raid0 and raid10? Jan -- ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Reshaping raid0/10 2007-02-21 16:28 Reshaping raid0/10 Jan Engelhardt @ 2007-02-21 19:59 ` Neil Brown 2007-02-22 6:09 ` dean gaudet 2007-02-23 12:59 ` Jan Engelhardt 0 siblings, 2 replies; 9+ messages in thread From: Neil Brown @ 2007-02-21 19:59 UTC (permalink / raw) To: Jan Engelhardt; +Cc: linux-raid On Wednesday February 21, jengelh@linux01.gwdg.de wrote: > Hello, > > > > are there any plans to support reshaping > on raid0 and raid10? > No concrete plans. It largely depends on time and motivation. I expect that the various flavours of raid5/raid6 reshape will come first. Then probably converting raid0->raid5. I really haven't given any thought to how you might reshape a raid10... NeilBrown ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Reshaping raid0/10 2007-02-21 19:59 ` Neil Brown @ 2007-02-22 6:09 ` dean gaudet 2007-02-23 12:59 ` Jan Engelhardt 1 sibling, 0 replies; 9+ messages in thread From: dean gaudet @ 2007-02-22 6:09 UTC (permalink / raw) To: Neil Brown; +Cc: Jan Engelhardt, linux-raid On Thu, 22 Feb 2007, Neil Brown wrote: > On Wednesday February 21, jengelh@linux01.gwdg.de wrote: > > Hello, > > > > > > > > are there any plans to support reshaping > > on raid0 and raid10? > > > > No concrete plans. It largely depends on time and motivation. > I expect that the various flavours of raid5/raid6 reshape will come > first. > Then probably converting raid0->raid5. > > I really haven't given any thought to how you might reshape a > raid10... i've got a 4x250 near2 i want to turn into a 4x750 near2. i was considering doing straight dd from each of the 250 to the respective 750 then doing an mdadm --create on the 750s (in the same ordering as the original array)... so i'd end up with a new array with more stripes. it seems like this should work. the same thing should work for all nearN with a multiple of N disks... and offsetN should work as well right? but farN sounds like a nightmare. if we had a generic "proactive disk replacement" method it could handle the 4x250->4x750 step. (i haven't decided yet if i want to try my hacky bitmap method of doing proactive replacement... i'm not sure what'll happen if i add a 750GB disk back into an array with 250s... i suppose it'll work... i'll have to experiment.) -dean ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Reshaping raid0/10 2007-02-21 19:59 ` Neil Brown 2007-02-22 6:09 ` dean gaudet @ 2007-02-23 12:59 ` Jan Engelhardt 2007-02-23 20:17 ` Neil Brown 1 sibling, 1 reply; 9+ messages in thread From: Jan Engelhardt @ 2007-02-23 12:59 UTC (permalink / raw) To: Neil Brown; +Cc: linux-raid On Feb 22 2007 06:59, Neil Brown wrote: >On Wednesday February 21, jengelh@linux01.gwdg.de wrote: >> >> are there any plans to support reshaping >> on raid0 and raid10? >> > >No concrete plans. It largely depends on time and motivation. >I expect that the various flavours of raid5/raid6 reshape will come >first. >Then probably converting raid0->raid5. > >I really haven't given any thought to how you might reshape a >raid10... It should not be any different from raid0/raid5 reshaping, should it? Jan -- ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Reshaping raid0/10 2007-02-23 12:59 ` Jan Engelhardt @ 2007-02-23 20:17 ` Neil Brown 2007-03-10 20:21 ` H. Peter Anvin 0 siblings, 1 reply; 9+ messages in thread From: Neil Brown @ 2007-02-23 20:17 UTC (permalink / raw) To: Jan Engelhardt; +Cc: linux-raid On Friday February 23, jengelh@linux01.gwdg.de wrote: > > On Feb 22 2007 06:59, Neil Brown wrote: > >On Wednesday February 21, jengelh@linux01.gwdg.de wrote: > >> > >> are there any plans to support reshaping > >> on raid0 and raid10? > >> > > > >No concrete plans. It largely depends on time and motivation. > >I expect that the various flavours of raid5/raid6 reshape will come > >first. > >Then probably converting raid0->raid5. > > > >I really haven't given any thought to how you might reshape a > >raid10... > > It should not be any different from raid0/raid5 reshaping, should it? Depends on what level you look at. If I wanted to reshape a raid0, I would just morph it into a raid4 with a missing parity drive, then use the raid5 code to restripe it. Then morph it back to regular raid0. With raid10 I cannot do that. I would need to do the restriping inside the raid10 module. But raid10 doesn't have a stripe-cache like raid5 does, and the stripe cache is a very integral part of the restripe process. So there would be a substantial amount of design and coding to effect a raid10 reshape - at least as much as the work to produce the initial raid5 reshape and probably more. So conceptually it might be very similar, but at the code level, it is likely to be very different. NeilBrown ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Reshaping raid0/10 2007-02-23 20:17 ` Neil Brown @ 2007-03-10 20:21 ` H. Peter Anvin 2007-03-10 21:19 ` Jan Engelhardt 2007-03-11 22:36 ` Neil Brown 0 siblings, 2 replies; 9+ messages in thread From: H. Peter Anvin @ 2007-03-10 20:21 UTC (permalink / raw) To: Neil Brown; +Cc: Jan Engelhardt, linux-raid Neil Brown wrote: > > If I wanted to reshape a raid0, I would just morph it into a raid4 > with a missing parity drive, then use the raid5 code to restripe it. > Then morph it back to regular raid0. > Wow, that made my brain hurt. Given the fact that we're going to have to do this on kernel.org soon, what would be the concrete steps involved (we're going to have to change 3-member raid0 into 4-member raid0)... -hpa ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Reshaping raid0/10 2007-03-10 20:21 ` H. Peter Anvin @ 2007-03-10 21:19 ` Jan Engelhardt 2007-03-11 22:36 ` Neil Brown 1 sibling, 0 replies; 9+ messages in thread From: Jan Engelhardt @ 2007-03-10 21:19 UTC (permalink / raw) To: H. Peter Anvin; +Cc: Neil Brown, linux-raid On Mar 10 2007 12:21, H. Peter Anvin wrote: > Neil Brown wrote: >> >> If I wanted to reshape a raid0, I would just morph it into a raid4 >> with a missing parity drive, then use the raid5 code to restripe it. >> Then morph it back to regular raid0. > > Wow, that made my brain hurt. > > Given the fact that we're going to have to do this on kernel.org soon, what > would be the concrete steps involved (we're going to have to change 3-member > raid0 into 4-member raid0)... Iff it was in the kernel, mdadm -G would suffice. Jan -- ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Reshaping raid0/10 2007-03-10 20:21 ` H. Peter Anvin 2007-03-10 21:19 ` Jan Engelhardt @ 2007-03-11 22:36 ` Neil Brown 2007-05-29 4:51 ` H. Peter Anvin 1 sibling, 1 reply; 9+ messages in thread From: Neil Brown @ 2007-03-11 22:36 UTC (permalink / raw) To: H. Peter Anvin; +Cc: Jan Engelhardt, linux-raid On Saturday March 10, hpa@zytor.com wrote: > Neil Brown wrote: > > > > If I wanted to reshape a raid0, I would just morph it into a raid4 > > with a missing parity drive, then use the raid5 code to restripe it. > > Then morph it back to regular raid0. > > > > Wow, that made my brain hurt. > > Given the fact that we're going to have to do this on kernel.org soon, > what would be the concrete steps involved (we're going to have to change > 3-member raid0 into 4-member raid0)... Well.... it's not straight forward at all. Firstly: it can only work if all your drives are the same size (rounded to 64K). If they aren't raid0 will use all the available space on each drive, while raid5 will only use the amount that is available on the first drive. If that condition is met, then you can safely convert to a raid4 with one extra (missing) device by simply creating an array with the same drives (so you have to stop and restart the array - you cannot do that bit while the array is live). You seem to need --assume-clean to create the raid4 degraded... That is probably a bug in mdadm. md/raid5 won't grow a degraded array, so now you have to add the new drive and let it sync the parity information onto it even though you aren't going to ultimately use it. This is a bit of a bore. It could probably be fixed but it wouldn't be entirely trivial (meaning a day rather than an hour). Once you have the non-degraded raid4, the next step would be mdadm -G /dev/mdX -n 5 --backup-file=/root/something (a 5 drive raid4 contains your 4drive raid0). Growing to a degraded array is not a problem. However md won't currently let you do this on a raid4. The patch to fix this is trivial and is below. The --backup-file is needed as there is no spare for mdadm to store some temporary data on. Once the grow finishes, you can unmount, stop the array, and create it as a raid0. This seems to work - I just tried it on a rather small filesystem (100M per drive) and it all went quite smoothly. I hope to be able to get all this automated one days so you can just mdadm -G /dev/mdX -n 4 on a raid0 and it will work. The need to sync the new disk first adds some real awkwardnesses. It would actually be a lot easier if the parity device was the first of the array instead of the last.. retro fitting a new raid4 layout which you cannot accidentally corrupt be using an old kernel might be awkward though... not impossible. Changing a raid0 to a raid4 while on-line is also non-trivial. Raid0 doesn't keep track of requests-in-flight so knowing when all raid0 requests have completed and it is ok to start handling requests via raid4 will need some care.. But with the following patch and a small down-time window at each end, you can use md to grow a raid0 today... But I suggest you try it on test data first. NeilBrown Signed-off-by: Neil Brown <neilb@suse.de> ### Diffstat output ./drivers/md/raid5.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff .prev/drivers/md/raid5.c ./drivers/md/raid5.c --- .prev/drivers/md/raid5.c 2007-03-02 15:48:35.000000000 +1100 +++ ./drivers/md/raid5.c 2007-03-12 09:02:41.000000000 +1100 @@ -4104,6 +4104,10 @@ static struct mdk_personality raid4_pers .spare_active = raid5_spare_active, .sync_request = sync_request, .resize = raid5_resize, +#ifdef CONFIG_MD_RAID5_RESHAPE + .check_reshape = raid5_check_reshape, + .start_reshape = raid5_start_reshape, +#endif .quiesce = raid5_quiesce, }; ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Reshaping raid0/10 2007-03-11 22:36 ` Neil Brown @ 2007-05-29 4:51 ` H. Peter Anvin 0 siblings, 0 replies; 9+ messages in thread From: H. Peter Anvin @ 2007-05-29 4:51 UTC (permalink / raw) To: Neil Brown; +Cc: Jan Engelhardt, linux-raid Back in March, Neil Brown wrote: > > Well.... it's not straight forward at all. > > Firstly: it can only work if all your drives are the same size > (rounded to 64K). If they aren't raid0 will use all the available > space on each drive, while raid5 will only use the amount that is > available on the first drive. > > If that condition is met, then you can safely convert to a raid4 with > one extra (missing) device by simply creating an array with the same > drives (so you have to stop and restart the array - you cannot do that > bit while the array is live). You seem to need --assume-clean > to create the raid4 degraded... That is probably a bug in mdadm. > [rest of procedure deleted] I just wanted to let you know we performed this procedure on mirrors1.kernel.org. It was successful, and saved us from copying 3 TB of data across the Internet. -hpa ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-05-29 4:51 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2007-02-21 16:28 Reshaping raid0/10 Jan Engelhardt 2007-02-21 19:59 ` Neil Brown 2007-02-22 6:09 ` dean gaudet 2007-02-23 12:59 ` Jan Engelhardt 2007-02-23 20:17 ` Neil Brown 2007-03-10 20:21 ` H. Peter Anvin 2007-03-10 21:19 ` Jan Engelhardt 2007-03-11 22:36 ` Neil Brown 2007-05-29 4:51 ` H. Peter Anvin
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.