Reshaping RAID-0?

Reshaping RAID-0?

am 05.02.2011 00:32:45 von lopresti

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
--
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

Re: Reshaping RAID-0?

am 05.02.2011 01:36:30 von John Robinson

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.

--
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

Re: Reshaping RAID-0?

am 05.02.2011 02:01:18 von NeilBrown

On Sat, 05 Feb 2011 00:36:30 +0000 John Robinson
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
--
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

Re: Reshaping RAID-0?

am 05.02.2011 03:36:59 von lopresti

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...

> =A0- convert the RAID0 to RAID4
> =A0- disable recovery from auto-starting
> =A0- add /dev/newdisc to the array as a spare (but recovery won't sta=
rt)
> =A0- request a size change to one extra disk
> =A0- start the reshape
> =A0- wait for the reshape to complete
> =A0- 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" i=
n
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html