All of lore.kernel.org
 help / color / mirror / Atom feed
* Reshaping RAID-0?
@ 2011-02-04 23:32 Patrick J. LoPresti
  2011-02-05  0:36 ` John Robinson
  0 siblings, 1 reply; 4+ messages in thread
From: Patrick J. LoPresti @ 2011-02-04 23:32 UTC (permalink / raw)
  To: linux-raid

Well, it has been 11 months since I last asked
(http://www.spinics.net/lists/raid/msg27676.html), and some recent
patches mention this in the context of "imsm", whatever that is...

So, is it possible to add a disk to a Linux md RAID-0 array and
re-stripe?  If so, what is the procedure and the required kernel/mdadm
version(s)?

If not, and if I want to contribute to an implementation effort, where
would I begin?

Thanks!

 - Pat

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Reshaping RAID-0?
  2011-02-04 23:32 Reshaping RAID-0? Patrick J. LoPresti
@ 2011-02-05  0:36 ` John Robinson
  2011-02-05  1:01   ` NeilBrown
  0 siblings, 1 reply; 4+ messages in thread
From: John Robinson @ 2011-02-05  0:36 UTC (permalink / raw)
  To: Patrick J. LoPresti; +Cc: linux-raid

On 04/02/2011 23:32, Patrick J. LoPresti wrote:
> Well, it has been 11 months since I last asked
> (http://www.spinics.net/lists/raid/msg27676.html), and some recent
> patches mention this in the context of "imsm", whatever that is...
>
> So, is it possible to add a disk to a Linux md RAID-0 array and
> re-stripe?  If so, what is the procedure and the required kernel/mdadm
> version(s)?
>
> If not, and if I want to contribute to an implementation effort, where
> would I begin?
>
> Thanks!

I think the capability is in mdadm 3.2, a developer-only release about 4 
days ago, or it's in Neil Brown's 3.2 devel branch. Take a closer look 
at the list archives for the last few days.

As for using it, it'll be the usual syntax, e.g. `mdadm /dev/mdX --add 
/dev/newdisc; mdadm /dev/mdX --grow --raid-disks=3`.

Hope this helps.

Cheers,

John.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Reshaping RAID-0?
  2011-02-05  0:36 ` John Robinson
@ 2011-02-05  1:01   ` NeilBrown
  2011-02-05  2:36     ` Patrick J. LoPresti
  0 siblings, 1 reply; 4+ messages in thread
From: NeilBrown @ 2011-02-05  1:01 UTC (permalink / raw)
  To: John Robinson; +Cc: Patrick J. LoPresti, linux-raid

On Sat, 05 Feb 2011 00:36:30 +0000 John Robinson
<john.robinson@anonymous.org.uk> wrote:

> On 04/02/2011 23:32, Patrick J. LoPresti wrote:
> > Well, it has been 11 months since I last asked
> > (http://www.spinics.net/lists/raid/msg27676.html), and some recent
> > patches mention this in the context of "imsm", whatever that is...
> >
> > So, is it possible to add a disk to a Linux md RAID-0 array and
> > re-stripe?  If so, what is the procedure and the required kernel/mdadm
> > version(s)?
> >
> > If not, and if I want to contribute to an implementation effort, where
> > would I begin?
> >
> > Thanks!
> 
> I think the capability is in mdadm 3.2, a developer-only release about 4 
> days ago, or it's in Neil Brown's 3.2 devel branch. Take a closer look 
> at the list archives for the last few days.
> 
> As for using it, it'll be the usual syntax, e.g. `mdadm /dev/mdX --add 
> /dev/newdisc; mdadm /dev/mdX --grow --raid-disks=3`.
> 
> Hope this helps.

It's heading in the right direction, but there is an important issue which is
as yet completely unimplemented.

You cannot --add a device to a RAID0 - the kernel won't let you because it
doesn't understand what that means - RAID0 arrays cannot have spares.

So the usage will have to be something like:


 mdadm /dev/md0X --grow --raid-disks=3 --add /dev/newdisc

mdadm will then need to:

 - convert the RAID0 to RAID4
 - disable recovery from auto-starting
 - add /dev/newdisc to the array as a spare (but recovery won't start)
 - request a size change to one extra disk
 - start the reshape
 - wait for the reshape to complete
 - convert back to RAID0

The latest kernel can handle each of those steps, should you could do this
'manually' by writing to /sys for some key steps and using mdadm for others.

But mdadm cannot do all of this yet.  It can or almost can) for 'imsm' which
is Intel's Matrix Storage Manager as the metadata handler for that can cope
with spares associated with a RAID0 ... (sort of - it's complicated).

I'll hopefully have this sorted for 3.2.1.

NeilBrown

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Reshaping RAID-0?
  2011-02-05  1:01   ` NeilBrown
@ 2011-02-05  2:36     ` Patrick J. LoPresti
  0 siblings, 0 replies; 4+ messages in thread
From: Patrick J. LoPresti @ 2011-02-05  2:36 UTC (permalink / raw)
  To: NeilBrown; +Cc: John Robinson, linux-raid

Thanks, John and Neil.  I have just a few more questions.

Any chance of this working on 2.6.32?  Specifically, Suse Linux
Enterprise Server 11 SP1?  :-)

I am interested in attempting this "by hand", so...

>  - convert the RAID0 to RAID4
>  - disable recovery from auto-starting
>  - add /dev/newdisc to the array as a spare (but recovery won't start)
>  - request a size change to one extra disk
>  - start the reshape
>  - wait for the reshape to complete
>  - convert back to RAID0


...could someone flesh out the mdadm and /sys invocations a little
bit?  Even vague pointers would be fine.

To make sure I understand the procedure correctly...  We convert from
RAID0 to (degraded) RAID4, disable recovery, add a new disk as a
spare.  That gives us a degraded RAID 4 with a spare.  So far I get
it.

But why are "request a size change to one extra disk" and "start the
reshape" separate steps?  I assume that "start the reshape" is to take
us to a (larger) degraded RAID 4, but what state are we in after the
"request a size change"?  (Put another way, what is the new disk being
used for, exactly, after the "size change" completes?  How does that
differ from after the "reshape" completes?)

Thanks again.

 - Pat
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-02-05  2:36 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-04 23:32 Reshaping RAID-0? Patrick J. LoPresti
2011-02-05  0:36 ` John Robinson
2011-02-05  1:01   ` NeilBrown
2011-02-05  2:36     ` Patrick J. LoPresti

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.