Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Growing a RAID10 array with additonal devices
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
ferg
Guru
Guru


Joined: 15 Nov 2002
Posts: 536
Location: Cambridge, UK

PostPosted: Thu Jun 03, 2021 1:45 pm    Post subject: Growing a RAID10 array with additonal devices Reply with quote

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
View user's profile Send private message
nvaert1986
Tux's lil' helper
Tux's lil' helper


Joined: 05 May 2019
Posts: 120

PostPosted: Fri Jun 04, 2021 12:05 pm    Post subject: Re: Growing a RAID10 array with additonal devices Reply with quote

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
View user's profile Send private message
ferg
Guru
Guru


Joined: 15 Nov 2002
Posts: 536
Location: Cambridge, UK

PostPosted: Fri Jun 04, 2021 1:17 pm    Post subject: Reply with quote

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
View user's profile Send private message
ferg
Guru
Guru


Joined: 15 Nov 2002
Posts: 536
Location: Cambridge, UK

PostPosted: Sat Jun 05, 2021 8:35 am    Post subject: Reply with quote

It completed overnight.Now just to grow the filesystem.

I saw this post that indicates the release of MDADM 3.3 introduced the ability to reshaoe RAID10 devices.

https://superuser.com/questions/311570/adding-drives-to-a-raid-10-array

I also came across this comprehensive guide:

https://www.digitalocean.com/community/tutorials/how-to-manage-raid-arrays-with-mdadm-on-ubuntu-16-04

Cheers
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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
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