All of lore.kernel.org
 help / color / mirror / Atom feed
* growing a RAID5 array by adding disks later
@ 2021-10-28 13:36 David T-G
  2021-10-28 14:05 ` John Atkins
  2021-10-28 16:42 ` Wol
  0 siblings, 2 replies; 4+ messages in thread
From: David T-G @ 2021-10-28 13:36 UTC (permalink / raw)
  To: Linux RAID

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
-- 
David T-G
See http://justpickone.org/davidtg/email/
See http://justpickone.org/davidtg/tofu.txt


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

* Re: growing a RAID5 array by adding disks later
  2021-10-28 13:36 growing a RAID5 array by adding disks later David T-G
@ 2021-10-28 14:05 ` John Atkins
  2021-10-28 16:42 ` Wol
  1 sibling, 0 replies; 4+ messages in thread
From: John Atkins @ 2021-10-28 14:05 UTC (permalink / raw)
  To: David T-G, Linux RAID

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.

On 28/10/2021 14:36, David T-G wrote:
> 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


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

* Re: growing a RAID5 array by adding disks later
  2021-10-28 13:36 growing a RAID5 array by adding disks later David T-G
  2021-10-28 14:05 ` John Atkins
@ 2021-10-28 16:42 ` Wol
  2021-10-28 19:11   ` Roger Heflin
  1 sibling, 1 reply; 4+ messages in thread
From: Wol @ 2021-10-28 16:42 UTC (permalink / raw)
  To: David T-G, Linux RAID

On 28/10/2021 14:36, David T-G wrote:
> 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?

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

Very. mdadm --add ...

> 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

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

* Re: growing a RAID5 array by adding disks later
  2021-10-28 16:42 ` Wol
@ 2021-10-28 19:11   ` Roger Heflin
  0 siblings, 0 replies; 4+ messages in thread
From: Roger Heflin @ 2021-10-28 19:11 UTC (permalink / raw)
  To: Wol; +Cc: David T-G, Linux RAID

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.

On Thu, Oct 28, 2021 at 11:44 AM Wol <antlists@youngman.org.uk> wrote:
>
> On 28/10/2021 14:36, David T-G wrote:
> > 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?
>
> > the space that I have now, how practical is it to grow that RAID5 array
> > by adding additional drives later?
>
> Very. mdadm --add ...
>
> > 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

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

end of thread, other threads:[~2021-10-28 19:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-28 13:36 growing a RAID5 array by adding disks later David T-G
2021-10-28 14:05 ` John Atkins
2021-10-28 16:42 ` Wol
2021-10-28 19:11   ` Roger Heflin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.