linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sean Greenslade <sean@seangreenslade.com>
To: Goffredo Baroncelli <kreijack@inwind.it>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Is it necessary to balance a btrfs raid1 array?
Date: Wed, 10 Sep 2014 21:25:17 -0400	[thread overview]
Message-ID: <20140911012516.GA3367@wheatley.student.rit.edu> (raw)
In-Reply-To: <5410D0A8.6040204@inwind.it>

On Thu, Sep 11, 2014 at 12:28:56AM +0200, Goffredo Baroncelli wrote:
> The WD datasheet says something different. It reports "Non-recoverable 
> read errors per bits read" less than 1/10^14. They express the number of 
> error in terms of number of bit reading.
> 
> You instead are saying that the error depends by the disk age.
> 
> These two sentence are very different.
> 
> ( and of course all these values depend also by the product quality).

I'm not certain how those specs are determined. I was basing my
statements on knowledge of how read errors occur in rotating media.

> I think that there is two source of error:
> - a platter/disk degradation (due to ageing, wearing...), which may require a 
> sector relocation
> - other sources of error which are not permanent and that may be corrected
> by a 2nd read
> 
> I don't have any idea about which one is bigger (even I suspect the second).

They are both the same, generally. If the sector is damaged (e.g.
manufacturing fault), then it can do several things. It can always
return bad data, which will result in a reallocation. It can also
partially fail. For example, accept the data, but slowly lose it over
some period of time. It's still due to bad media, but if you were to
read it quickly enough, you may be able to catch it before it goes bad.
If the drive catches (and re-writes) it, then it may have staved off
losing that data that time around. 

> > So doing reads, especially across the entire media surface, is a great
> > way to make the disk perform these sector checks. But sometimes the disk
> > cannot correct the error. 
> 
> I read this as: the error rate is greater than 1/10^14, but the CRC and
> some multiple reading and sector remapping lower the error rate below 1/10^14.
> 
> If behind this there are a "dumb" drive which returns an error as soon as 
> the CRC doesn't match, or a smart drive which retries several time until
> it got a good value doesn't matter: the error rate is still 1/10^14.

Yes, the error rate is almost entirely determined by the manufacturing
of the physical media. Controllers can attempt to work around that, but
they won't go searching for media defects on their own (at least, I've
never seen a drive that does.)

> > Long story short, reads don't cause media errors, and scrubs help detect
> > errors early.
> 
> Nobody told that a reading "cause" a media "error"; however assuming (this is how
> I read the WD datasheet) the error rate constant, if you increase the number 
> of reading then you have more errors.
> 
> May be that I was not clear, however I didn't want to say that "scrubbing reduces 
> the life of disk", I wanted to point out that the size of the disk and the error
> rate are becoming comparable.

I know that wasn't your implication, but I wanted to be sure that things
weren't misinterpreted. I'll clarify:

Disks have latent errors. Nothing you can do will change this, and the
number of reads you do will not affect the error rate of the media. It
_will_ affect how often those errors are detected, however. And with
btrds, this is a Good Thing(TM). If errors are found, they can be
corrected by either the disk controller itself (on the block level) or
the filesystem on its level. 

Scrub your disks, folks. A scrubbed disk is a happy disk.

--Sean

  reply	other threads:[~2014-09-11  1:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-10 12:27 Is it necessary to balance a btrfs raid1 array? Bob Williams
2014-09-10 13:06 ` Austin S Hemmelgarn
2014-09-10 13:48   ` Rich Freeman
2014-09-10 14:41     ` Austin S Hemmelgarn
2014-09-10 17:44   ` Bob Williams
2014-09-10 18:43 ` Goffredo Baroncelli
2014-09-10 19:32   ` Sean Greenslade
2014-09-10 22:28     ` Goffredo Baroncelli
2014-09-11  1:25       ` Sean Greenslade [this message]
2014-09-11  3:51         ` Zygo Blaxell
2014-09-11  4:23           ` Sean Greenslade
2014-09-11  6:55           ` Duncan
2014-09-11  9:56   ` Bob Williams
2014-09-11 11:10     ` Duncan
2014-09-11  4:30 ` Zygo Blaxell
2014-09-11  9:08   ` Bob Williams

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=20140911012516.GA3367@wheatley.student.rit.edu \
    --to=sean@seangreenslade.com \
    --cc=kreijack@inwind.it \
    --cc=linux-btrfs@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).