Linux RAID subsystem development
 help / color / mirror / Atom feed
* RAID-6 horizontal grow
@ 2009-04-10 21:54 Piergiorgio Sartor
  2009-04-10 21:58 ` Robin Hill
  0 siblings, 1 reply; 6+ messages in thread
From: Piergiorgio Sartor @ 2009-04-10 21:54 UTC (permalink / raw)
  To: linux-raid

Hi all,

is it possible to grow a RAID-6, not by adding
more drives, but by extending the partions which
are composing the array?

In other words, let's say I've "n" partitions of
"x" GB forming a RAID-6 array. After some time I
increase the size of each partition to "y" GB, of
course y > x.
Is it then possible to use the complete space
growing the array?
How?

Thanks,

bye,

-- 

piergiorgio

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

* Re: RAID-6 horizontal grow
  2009-04-10 21:54 RAID-6 horizontal grow Piergiorgio Sartor
@ 2009-04-10 21:58 ` Robin Hill
  2009-04-10 22:34   ` Piergiorgio Sartor
  0 siblings, 1 reply; 6+ messages in thread
From: Robin Hill @ 2009-04-10 21:58 UTC (permalink / raw)
  To: linux-raid

[-- Attachment #1: Type: text/plain, Size: 829 bytes --]

On Fri Apr 10, 2009 at 11:54:35PM +0200, Piergiorgio Sartor wrote:

> Hi all,
> 
> is it possible to grow a RAID-6, not by adding
> more drives, but by extending the partions which
> are composing the array?
> 
> In other words, let's say I've "n" partitions of
> "x" GB forming a RAID-6 array. After some time I
> increase the size of each partition to "y" GB, of
> course y > x.
> Is it then possible to use the complete space
> growing the array?
> How?
> 
Yes - "mdadm --grow --size=max /dev/mdX".  You'll also need to grow the
filesystem afterwards of course.

Cheers,
    Robin
-- 
     ___        
    ( ' }     |       Robin Hill        <robin@robinhill.me.uk> |
   / / )      | Little Jim says ....                            |
  // !!       |      "He fallen in de water !!"                 |

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

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

* Re: RAID-6 horizontal grow
  2009-04-10 21:58 ` Robin Hill
@ 2009-04-10 22:34   ` Piergiorgio Sartor
  2009-04-11  8:23     ` Piergiorgio Sartor
  0 siblings, 1 reply; 6+ messages in thread
From: Piergiorgio Sartor @ 2009-04-10 22:34 UTC (permalink / raw)
  To: linux-raid

Hi again,

I made a quick test, but that does not seem to
work, at least with RAID-6.

What I did was to create 4 loop devices of 128MB
and then a RAID-6, metadata 1.1, on top of that.
The I stopped the array and the loop, I added
another 128MB (added as in "dd ... >> file"),
run "losetup" again and "mdadm -A ...".
Then "mdadm --grow --size=max ...", but the size
of the array did not change from 256MB (2x128MB).
The loop devices are 256MB (wc -c /dev/loop..).

So, either I'm missing something or this type of
grow does not seem to affect RAID-6.

Any ideas?

Thanks again,

bye,

pg

On Fri, Apr 10, 2009 at 10:58:33PM +0100, Robin Hill wrote:
> On Fri Apr 10, 2009 at 11:54:35PM +0200, Piergiorgio Sartor wrote:
> 
> > Hi all,
> > 
> > is it possible to grow a RAID-6, not by adding
> > more drives, but by extending the partions which
> > are composing the array?
> > 
> > In other words, let's say I've "n" partitions of
> > "x" GB forming a RAID-6 array. After some time I
> > increase the size of each partition to "y" GB, of
> > course y > x.
> > Is it then possible to use the complete space
> > growing the array?
> > How?
> > 
> Yes - "mdadm --grow --size=max /dev/mdX".  You'll also need to grow the
> filesystem afterwards of course.
> 
> Cheers,
>     Robin
> -- 
>      ___        
>     ( ' }     |       Robin Hill        <robin@robinhill.me.uk> |
>    / / )      | Little Jim says ....                            |
>   // !!       |      "He fallen in de water !!"                 |



-- 

piergiorgio

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

* Re: RAID-6 horizontal grow
  2009-04-10 22:34   ` Piergiorgio Sartor
@ 2009-04-11  8:23     ` Piergiorgio Sartor
  2009-04-11  9:53       ` NeilBrown
  0 siblings, 1 reply; 6+ messages in thread
From: Piergiorgio Sartor @ 2009-04-11  8:23 UTC (permalink / raw)
  Cc: linux-raid

Hi again,

I answer to myself.

It seems that the array needs to be assembled
with "--update devicesize", so that later the
"--grow --size=max" could really work.

It also seems that "--update" works only with
"--assemble".
Is there any way to update the device size "live",
i.e. without stopping and re-assembling the array?
(and without failing/removing/adding components?).

Thanks,

bye,

pg

On Sat, Apr 11, 2009 at 12:34:33AM +0200, Piergiorgio Sartor wrote:
> Hi again,
> 
> I made a quick test, but that does not seem to
> work, at least with RAID-6.
> 
> What I did was to create 4 loop devices of 128MB
> and then a RAID-6, metadata 1.1, on top of that.
> The I stopped the array and the loop, I added
> another 128MB (added as in "dd ... >> file"),
> run "losetup" again and "mdadm -A ...".
> Then "mdadm --grow --size=max ...", but the size
> of the array did not change from 256MB (2x128MB).
> The loop devices are 256MB (wc -c /dev/loop..).
> 
> So, either I'm missing something or this type of
> grow does not seem to affect RAID-6.
> 
> Any ideas?
> 
> Thanks again,
> 
> bye,
> 
> pg
> 
> On Fri, Apr 10, 2009 at 10:58:33PM +0100, Robin Hill wrote:
> > On Fri Apr 10, 2009 at 11:54:35PM +0200, Piergiorgio Sartor wrote:
> > 
> > > Hi all,
> > > 
> > > is it possible to grow a RAID-6, not by adding
> > > more drives, but by extending the partions which
> > > are composing the array?
> > > 
> > > In other words, let's say I've "n" partitions of
> > > "x" GB forming a RAID-6 array. After some time I
> > > increase the size of each partition to "y" GB, of
> > > course y > x.
> > > Is it then possible to use the complete space
> > > growing the array?
> > > How?
> > > 
> > Yes - "mdadm --grow --size=max /dev/mdX".  You'll also need to grow the
> > filesystem afterwards of course.
> > 
> > Cheers,
> >     Robin
> > -- 
> >      ___        
> >     ( ' }     |       Robin Hill        <robin@robinhill.me.uk> |
> >    / / )      | Little Jim says ....                            |
> >   // !!       |      "He fallen in de water !!"                 |
> 
> 
> 
> -- 
> 
> piergiorgio
> --
> 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

-- 

piergiorgio

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

* Re: RAID-6 horizontal grow
  2009-04-11  8:23     ` Piergiorgio Sartor
@ 2009-04-11  9:53       ` NeilBrown
  2009-04-11 10:40         ` Piergiorgio Sartor
  0 siblings, 1 reply; 6+ messages in thread
From: NeilBrown @ 2009-04-11  9:53 UTC (permalink / raw)
  To: Piergiorgio Sartor; +Cc: linux-raid

On Sat, April 11, 2009 6:23 pm, Piergiorgio Sartor wrote:
> Hi again,
>
> I answer to myself.
>
> It seems that the array needs to be assembled
> with "--update devicesize", so that later the
> "--grow --size=max" could really work.

I love it when people find out answers by themselves - it shows the
documentation isn't completely worthless :-)

>
> It also seems that "--update" works only with
> "--assemble".
> Is there any way to update the device size "live",
> i.e. without stopping and re-assembling the array?
> (and without failing/removing/adding components?).

I think so, but mdadm cannot do it for you (yet).

If you
  for i in /sys/block/mdX/md/dev-*/size
  do echo 0 > $i
  done

it will have much the same effect as --assemble --update devicesize

Then you can
   --grow --size=max

NeilBrown


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

* Re: RAID-6 horizontal grow
  2009-04-11  9:53       ` NeilBrown
@ 2009-04-11 10:40         ` Piergiorgio Sartor
  0 siblings, 0 replies; 6+ messages in thread
From: Piergiorgio Sartor @ 2009-04-11 10:40 UTC (permalink / raw)
  To: linux-raid

Hi,

> I love it when people find out answers by themselves - it shows the
> documentation isn't completely worthless :-)

well, I think the mdadm man page is good and
complete, even if it requires several re-reads
in order to get all the information... :-)
It is definitely worth!

BTW, maybe it would be good to update the wiki
page about this topic.

> I think so, but mdadm cannot do it for you (yet).
> 
> If you
>   for i in /sys/block/mdX/md/dev-*/size
>   do echo 0 > $i
>   done
> 
> it will have much the same effect as --assemble --update devicesize

Thank you so much!
This is exactly what I needed!
 
Thanks again,

bye,

-- 

piergiorgio

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

end of thread, other threads:[~2009-04-11 10:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-10 21:54 RAID-6 horizontal grow Piergiorgio Sartor
2009-04-10 21:58 ` Robin Hill
2009-04-10 22:34   ` Piergiorgio Sartor
2009-04-11  8:23     ` Piergiorgio Sartor
2009-04-11  9:53       ` NeilBrown
2009-04-11 10:40         ` Piergiorgio Sartor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox