RAID-6 horizontal grow
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,
Signature · 1 line
piergiorgio
Quoted 6 lines · Piergiorgio Sartor
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?
Quoted 8 lines
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
Signature · 4 lines
___
( ' } | Robin Hill <[email protected]> |
/ / ) | Little Jim says .... |
// !! | "He fallen in de water !!" |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
Quoted 26 lines · Robin Hill
Quoted 6 lines · Piergiorgio Sartor
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?
Quoted 8 lines
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,
RobinSignature · 4 lines
___ ( ' } | Robin Hill <[email protected]> | / / ) | Little Jim says .... | // !! | "He fallen in de water !!" |
Signature · 1 line
piergiorgio
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
Quoted 62 lines · Piergiorgio Sartor
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
Quoted 26 lines · Robin Hill
Quoted 6 lines · Piergiorgio Sartor
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?
Quoted 8 lines
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,
RobinSignature · 4 lines
___ ( ' } | Robin Hill <[email protected]> | / / ) | Little Jim says .... | // !! | "He fallen in de water !!" |Signature · 5 lines
piergiorgio -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 1 line
piergiorgio
Quoted 7 lines · Piergiorgio Sartor
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 :-)
Quoted 6 lines
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
Hi,
Quoted 2 lines
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.
Quoted 8 lines
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
doneit will have much the same effect as --assemble --update devicesize
Thank you so much!
This is exactly what I needed!
Thanks again,
bye,
Signature · 1 line
piergiorgio