public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: antlists <antlists@youngman.org.uk>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] which linux RAID setup to choose?
Date: Mon, 4 May 2020 00:19:37 +0100	[thread overview]
Message-ID: <a73409b4-aaeb-8082-20b7-9e9ea1d258eb@youngman.org.uk> (raw)
In-Reply-To: <r_Q9jvM58EU2pwZlP_Y-68RWGty_14cd-2tWbp0SkzuYCp_NjKveJ5N2u_C7-MDj_ECdnP7ITK-fEikxX-u-j9qZkc8K6zMSUerYoduMq5c=@protonmail.com>

On 03/05/2020 22:46, Caveman Al Toraboran wrote:
> On Sunday, May 3, 2020 6:27 PM, Jack <ostroffjh@users.sourceforge.net> wrote:
> 
> 
> curious.  how do people look at --layout=n2 in the
> storage industry?  e.g. do they ignore the
> optimistic case where 2 disk failures can be
> recovered, and only assume that it protects for 1
> disk failure?

You CANNOT afford to be optimistic ... Murphy's law says you will lose 
the wrong second disk.
> 
> i see why gambling is not worth it here, but at
> the same time, i see no reason to ignore reality
> (that a 2 disk failure can be saved).
> 
Don't ignore that some 2-disk failures CAN'T be saved ...

> e.g. a 4-disk RAID10 with -layout=n2 gives
> 
>          1*4/10 + 2*4/10 = 1.2
> 
> expected recoverable disk failures.  details are
> below:
> 
> 
> now, if we do a 5-disk --layout=n2, we get:
> 
>      1    (1)    2    (2)    3
>     (3)    4    (4)    5    (5)
>      6    (6)    7    (7)    8
>     (8)    9    (9)    10   (10)
>      11   (11)   12   (12)   13
>     (13) ...
> 
> obviously, there are 5 possible ways a single disk
> may fail, out of which all of the 5 will be
> recovered.

Don't forget a 4+spare layout, which *should* survive a 2-disk failure.
> 
> there are nchoosek(5,2) = 10 possible ways a 2
> disk failure could happen, out of which 5
> will be recovered:
> 
> 
> so, by transforming a 4-disk RAID10 into a 5-disk
> one, we increase total storage capacity by a 0.5
> disk's worth of storage, while losing the ability
> to recover 0.2 disks.
> 
> but if we extended the 4-disk RAID10 into a
> 6-disk --layout=n2, we will have:
> 
>               6                  nchoosek(6,2) - 3
> = 1 * -----------------  +  2 * -----------------
>        6 + nchoosek(6,2)         6 + nchoosek(6,2)
> 
> = 6/21                   +  2 * 12/15
> 
> = 1.8857 expected recoverable failing disks.
> 
> almost 2.  i.e. there is 80% chance of surviving a
> 2 disk failure.
> 
> so, i wonder, is it a bad decision to go with an
> even number disks with a RAID10?  what is the
> right way to think to find an answer to this
> question?
> 
> i guess the ultimate answer needs knowledge of
> these:
> 
>      * F1: probability of having 1 disks fail within
>            the repair window.
>      * F2: probability of having 2 disks fail within
>            the repair window.
>      * F3: probability of having 3 disks fail within
>        .   the repair window.
>        .
>        .
>      * Fn: probability of having n disks fail within
>            the repair window.
> 
>      * R1: probability of surviving 1 disks failure.
>            equals 1 with all related cases.
>      * R2: probability of surviving 2 disks failure.
>            equals 1/3 with 5-disk RAID10
>            equals 0.8 with a 6-disk RAID10.
>      * R3: probability of surviving 3 disks failure.
>            equals 0 with all related cases.
>        .
>        .
>        .
>      * Rn: probability of surviving n disks failure.
>            equals 0 with all related cases.
> 
>      * L : expected cost of losing data on an array.
>      * D : price of a disk.

Don't forget, if you have a spare disk, the repair window is the length 
of time it takes to fail-over ...
> 
> this way, the absolute expected cost when adopting
> a 6-disk RAID10 is:
> 
> = 6D + F1*(1-R1)*L + F2*(1-R2)*L + F3*(1-R3)*L + ...
> = 6D + F1*(1-1)*L + F2*(1-0.8)*L + F3*(1-0)*L + ...
> = 6D + 0          + F2*(0.2)*L   + F3*(1-0)*L + ...
> 
> and the absolute cost for a 5-disk RAID10 is:
> 
> = 5D + F1*(1-1)*L + F2*(1-0.3333)*L + F3*(1-0)*L + ...
> = 5D + 0          + F2*(0.6667)*L   + F3*(1-0)*L + ...
> 
> canceling identical terms, the difference cost is:
> 
> 6-disk ===> 6D + 0.2*F2*L
> 5-disk ===> 5D + 0.6667*F2*L
> 
> from here [1] we know that a 1TB disk costs
> $35.85, so:
> 
> 6-disk ===> 6*35.85 + 0.2*F2*L
> 5-disk ===> 5*35.85 + 0.6667*F2*L
> 
> now, at which point is a 5-disk array a better
> economical decision than a 6-disk one?  for
> simplicity, let LOL = F2*L:
> 
> 5*35.85 + 0.6667 * LOL  <   6*35.85 + 0.2 * LOL
> 0.6667*LOL - 0.2 * LOL  <   6*35.85 - 5*35.85
> LOL * (0.6667 - 0.2)    <   6*35.85 - 5*35.85
> 
>                              6*35.85 - 5*35.85
>             LOL          <   -----------------
>                                0.6667 - 0.2
> 
>             LOL          <   76.816
>             F2*L         <   76.816
> 
> so, a 5-disk RAID10 is better than a 6-disk RAID10
> only if:
> 
>          F2*L  <  76.816 bucks.
> 
> this site [2] says that 76% of seagate disks fail
> per year (:D).  and since disks fail independent
> of each other mostly, then, the probabilty of
> having 2 disks fail in a year is:
> 
76% seems incredibly high. And no, disks do not fail independently of 
each other. If you buy a bunch of identical disks, at the same time, and 
stick them all in the same raid array, the chances of them all wearing 
out at the same time are rather higher than random chance would suggest.

Which is why, if a raid disk fails, the advice is always to replace it 
asap. And if possible, to recover the failed drive to try and copy that 
rather than hammer the rest of the raid.

Bear in mind that, it doesn't matter how many drives a raid-10 has, if 
you're recovering on to a new drive, the data is stored on just two of 
the other drives. So the chances of them failing as they get hammered 
are a lot higher.

That's why it makes a lot of sense to make sure you monitor the SMARTs, 
so you can replace any of the drives that look like failing before they 
actually do. And check the warranties. Expensive raid drives probably 
have longer warranties, so when they're out of warranty consider 
retiring them (they'll probably last a lot longer, but it's a judgement 
call).

All that said, I've been running a raid-1 mirror for a good few years, 
and I've not had any trouble on my Barracudas.

Cheers,
Wol


  parent reply	other threads:[~2020-05-03 23:19 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-03  5:44 [gentoo-user] which linux RAID setup to choose? Caveman Al Toraboran
2020-05-03  7:53 ` hitachi303
2020-05-03  9:23   ` Wols Lists
2020-05-03 17:55     ` Caveman Al Toraboran
2020-05-03 18:04       ` Dale
2020-05-03 18:29       ` Mark Knecht
2020-05-03 20:16         ` Rich Freeman
2020-05-03 22:52           ` Mark Knecht
2020-05-03 23:23             ` Rich Freeman
2020-05-03 21:22       ` antlists
2020-05-03  9:14 ` Wols Lists
2020-05-03  9:21   ` Caveman Al Toraboran
2020-05-03 14:27 ` Jack
2020-05-03 21:46   ` Caveman Al Toraboran
2020-05-03 22:50     ` hitachi303
2020-05-04  0:29       ` Caveman Al Toraboran
2020-05-04  7:50         ` hitachi303
2020-05-04  0:46       ` Rich Freeman
2020-05-04  7:50         ` hitachi303
2020-05-04  8:18           ` William Kenworthy
2020-05-03 23:19     ` antlists [this message]
2020-05-04  1:33       ` Caveman Al Toraboran
2020-05-03 20:07 ` Rich Freeman
2020-05-03 21:32   ` antlists
2020-05-03 22:34     ` Rich Freeman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a73409b4-aaeb-8082-20b7-9e9ea1d258eb@youngman.org.uk \
    --to=antlists@youngman.org.uk \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox