View previous topic :: View next topic |
Author |
Message |
ferg Guru
Joined: 15 Nov 2002 Posts: 540 Location: Cambridge, UK
|
Posted: Thu Jun 03, 2021 1:45 pm Post subject: Growing a RAID10 array with additonal devices |
|
|
Hello all,
I've got a four drive (4 x 2TB) partitions in a RAID10 array (near copies)created by mdadm.
I would like to grow the array by two drives (all drives have a single partition).
Now I've grown RAID1 and RAID5 but never RAID10.
As I understand it I need to add the pair of drives together (mirrored stripes) and allow mdadm to deal with it. Once grown I can expand the EXT4 filesystem.
So my workflow would be to add the drives, grow the array and increase the number of active devices all in a single command.
So presuming the drives are all prepared then the mdadm command should be something along the following lines:
Code: | mdadm --grow /dev/md/ARRAY --add /dev/sda1 --add /dev/sdb1 --raid-devices=6 |
Does that sound right?
Thanks
Ferg _________________ Climb up it, kayak down it + make sure it runs on GNU/Linux
"cease to exist, giving my goodbye, drive my car into the ocean,
you think I'm dead, but i sail away, on a wave of mutilation!" |
|
Back to top |
|
|
nvaert1986 Tux's lil' helper
Joined: 05 May 2019 Posts: 124
|
Posted: Fri Jun 04, 2021 12:05 pm Post subject: Re: Growing a RAID10 array with additonal devices |
|
|
ferg wrote: | Hello all,
I've got a four drive (4 x 2TB) partitions in a RAID10 array (near copies)created by mdadm.
I would like to grow the array by two drives (all drives have a single partition).
Now I've grown RAID1 and RAID5 but never RAID10.
As I understand it I need to add the pair of drives together (mirrored stripes) and allow mdadm to deal with it. Once grown I can expand the EXT4 filesystem.
So my workflow would be to add the drives, grow the array and increase the number of active devices all in a single command.
So presuming the drives are all prepared then the mdadm command should be something along the following lines:
Code: | mdadm --grow /dev/md/ARRAY --add /dev/sda1 --add /dev/sdb1 --raid-devices=6 |
Does that sound right?
Thanks
Ferg |
You can't grow a RAID-10 array as far as I know, only a 0/1/4/5/6 RAID array. See man mdadm under the header Grow for details. |
|
Back to top |
|
|
ferg Guru
Joined: 15 Nov 2002 Posts: 540 Location: Cambridge, UK
|
Posted: Fri Jun 04, 2021 1:17 pm Post subject: |
|
|
Thanks. I think that man page is a little out of date though.
The array is fully backed up and umounted.
So I've just run:
Code: | mdadm /dev/md1 --add /dev/sda1 /dev/sdb1
mdadm --grow /dev/md1 --raid-devices=6 |
Seems to have worked. Currently:
Code: | md1 : active raid10 sdb1[5] sda1[4] sde1[2] sdd1[1] sdf1[3] sdc1[0]
3906760704 blocks super 1.2 512K chunks 2 near-copies [6/6] [UUUUUU]
[>....................] reshape = 0.6% (23788288/3906760704) finish=357.2min speed=181140K/s
ec
bitmap: 7/22 pages [28KB], 131072KB chunk |
Wish me luck! _________________ Climb up it, kayak down it + make sure it runs on GNU/Linux
"cease to exist, giving my goodbye, drive my car into the ocean,
you think I'm dead, but i sail away, on a wave of mutilation!" |
|
Back to top |
|
|
ferg Guru
Joined: 15 Nov 2002 Posts: 540 Location: Cambridge, UK
|
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|