Skip to contentSkip to conversation

growing a RAID5 array by adding disks later

DISCUSSION David T-G 4 participants 4 messages Oct 28, 2021 MD RAID

lore
Share & tools
lore

David T-G

author
#0 lore raw

Hi, all --

It's time to replace a few 4T disks in our little server. I don't particularly want to go back with more 4T disks (although the same model sure are cheap these days! :-) and figure I should put in larger drives as I go. I am then left with weighing simple $/G vs total price; bigger drives can be cheaper per volume but of course more overall. My first approach is to put newer, larger drives in place and expect to grow into the empty space when all of the old ones have been swapped out.

But ... If I were to splurge and buy 3ea big drives to replace all of the space that I have now, how practical is it to grow that RAID5 array by adding additional drives later? My eventual goal would be to get to 8-10 devices in a RAID6 layout (two "extras"), but of course I can't afford that today. Do I have an easy path to get there in the long run?

[BTW, can I convert an array from RAID5 to RAID6, too?]

On the other hand, I do have the empty slots (currently filled with scratch drives here and there), so I could both replace my aging drives and add more and just grow this array 1) if the growth idea is practical and 2) if I don't get to splurge.

TIA

:-D

Signature · 3 lines
David T-G
See http://justpickone.org/davidtg/email/
See http://justpickone.org/davidtg/tofu.txt
#1 lore raw

So yes changing the array from 5 to 6 is possible, time intensive (for the machine). Please see http://www.ewams.net/?date=2013/05/02&view=Converting_RAID5_to_RAID6_in_mdadm

Growing an array with additional disks is very similar and takes time same as the above.

Hope this answers all your questions.

Quoted 27 lines · David T-G

Hi, all --

It's time to replace a few 4T disks in our little server. I don't particularly want to go back with more 4T disks (although the same model sure are cheap these days! :-) and figure I should put in larger drives as I go. I am then left with weighing simple $/G vs total price; bigger drives can be cheaper per volume but of course more overall. My first approach is to put newer, larger drives in place and expect to grow into the empty space when all of the old ones have been swapped out.

But ... If I were to splurge and buy 3ea big drives to replace all of the space that I have now, how practical is it to grow that RAID5 array by adding additional drives later? My eventual goal would be to get to 8-10 devices in a RAID6 layout (two "extras"), but of course I can't afford that today. Do I have an easy path to get there in the long run?

[BTW, can I convert an array from RAID5 to RAID6, too?]

On the other hand, I do have the empty slots (currently filled with scratch drives here and there), so I could both replace my aging drives and add more and just grow this array 1) if the growth idea is practical and 2) if I don't get to splurge.

TIA

:-D

#2 lore raw
In reply to David T-G
Quoted 11 lines · David T-G

Hi, all --

It's time to replace a few 4T disks in our little server. I don't particularly want to go back with more 4T disks (although the same model sure are cheap these days! :-) and figure I should put in larger drives as I go. I am then left with weighing simple $/G vs total price; bigger drives can be cheaper per volume but of course more overall. My first approach is to put newer, larger drives in place and expect to grow into the empty space when all of the old ones have been swapped out.

But ... If I were to splurge and buy 3ea big drives to replace all of

Does that mean you have three drives currently?

Quoted 2 lines

the space that I have now, how practical is it to grow that RAID5 array by adding additional drives later?

Very. mdadm --add ...

Quoted 11 lines

My eventual goal would be to get
to 8-10 devices in a RAID6 layout (two "extras"), but of course I can't afford that today. Do I have an easy path to get there in the long run?

[BTW, can I convert an array from RAID5 to RAID6, too?]

On the other hand, I do have the empty slots (currently filled with scratch drives here and there), so I could both replace my aging drives and add more and just grow this array 1) if the growth idea is practical and 2) if I don't get to splurge.

Okay, buy your new 8TB drives in pairs (unless you've got a bunch of scratch 4TB drives).

Assuming you've got a 3x4TB array this will get you to a 3x8TB in one hit...

mdadm --replace 4TB with 8TB
Twice.

mdadm --create --level=striped 4TB 4TB (to give you an 8TB raid0)

mdadm --replace 4TB with 8TB raid0 mirror

You may then be able move the data off your scratch drives onto the array, create another 8TB raid0, and add that for a raid6. You can then just add 8TB drives bit by bit.

Read the website - there#s a lot of info there...
https://raid.wiki.kernel.org/index.php/Linux_Raid

Cheers,
Wol

#3 lore raw

On mine I would partition the 8tb into 4tb partitions.

Then replace one of the 4tb partitions with an 4tb partition on an 8tb.

Then create a new 2 disk raid5 array with the old 4tb and the #2 8tb partition

Next add looks similar and you then have 3 disk raid5.

I have my array build of partitions of several disks such that when I get a bad block on one of the partitions typically only one partition gets thrown out of its array and when doing ops on the smaller partitions I don't ever have any operation that takes anywhere close to a full day.

I am using gpt so I also number the partitions such that they match the last number of the md device like this:
md13 : active raid6 sde3[12] sdd3[1] sdb3[7] sdh3[8] sdg3[10] sdi3[11] sdf3[9]

      3612623360 blocks super 1.2 level 6, 512k chunk, algorithm 2
[7/7] [UUUUUUU]
      bitmap: 0/6 pages [0KB], 65536KB chunk

that way I always know 13 gets a *3 device.

The above array was all 3tb disks originally, now 3 of them are partitions on 6tb disks and I have a 4 disk raid6 added into a separate fs using the one "good" 3tb disk I removed, and the 3 2nd partitions on the 6tb disks (the other 2 3tb were having sector read issues).

This lets me get a bit of extra space without doing an immediate buy of all 7 new 6TB disks at once.

Quoted 53 lines · Wol
Quoted 11 lines · David T-G

Hi, all --

It's time to replace a few 4T disks in our little server. I don't particularly want to go back with more 4T disks (although the same model sure are cheap these days! :-) and figure I should put in larger drives as I go. I am then left with weighing simple $/G vs total price; bigger drives can be cheaper per volume but of course more overall. My first approach is to put newer, larger drives in place and expect to grow into the empty space when all of the old ones have been swapped out.

But ... If I were to splurge and buy 3ea big drives to replace all of

Does that mean you have three drives currently?

Quoted 2 lines

the space that I have now, how practical is it to grow that RAID5 array by adding additional drives later?

Very. mdadm --add ...

Quoted 11 lines

My eventual goal would be to get
to 8-10 devices in a RAID6 layout (two "extras"), but of course I can't afford that today. Do I have an easy path to get there in the long run?

[BTW, can I convert an array from RAID5 to RAID6, too?]

On the other hand, I do have the empty slots (currently filled with scratch drives here and there), so I could both replace my aging drives and add more and just grow this array 1) if the growth idea is practical and 2) if I don't get to splurge.

Okay, buy your new 8TB drives in pairs (unless you've got a bunch of scratch 4TB drives).

Assuming you've got a 3x4TB array this will get you to a 3x8TB in one hit...

mdadm --replace 4TB with 8TB
Twice.

mdadm --create --level=striped 4TB 4TB (to give you an 8TB raid0)

mdadm --replace 4TB with 8TB raid0 mirror

You may then be able move the data off your scratch drives onto the array, create another 8TB raid0, and add that for a raid6. You can then just add 8TB drives bit by bit.

Read the website - there#s a lot of info there...
https://raid.wiki.kernel.org/index.php/Linux_Raid

Cheers,
Wol