All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Turmel <philip@turmel.org>
To: Wols Lists <antlists@youngman.org.uk>,
	andras@tantosonline.com, Linux-RAID <linux-raid@vger.kernel.org>
Subject: Re: How to recover after md crash during reshape?
Date: Wed, 21 Oct 2015 12:05:29 -0400	[thread overview]
Message-ID: <5627B7C9.1050700@turmel.org> (raw)
In-Reply-To: <5627BAB4.7010402@youngman.org.uk>

Hi Wols,

I glad you've got the big picture correct, but some details need to be
addressed:

On 10/21/2015 12:17 PM, Wols Lists wrote:

> tl;dr summary ...
> 
> Desktop drives are spec'd as being okay with one soft error per 10TB
> read - that's where a read fails, you try again, and everything's okay.

No, this isn't correct.

That spec is for *unrecoverable* read errors.  For desktop drives,
typically spec'd as one such error every 1e14 bits read, on average.
These are failures where you really have lost the sector contents.  Such
sectors are marked as "Pending Relocations" in drive firmware.  But the
recording surface might still be good, so the drive waits for a write to
that pending sector, which it then verifies, before deciding to relocate
or not.

When MD raid receives a read error, whether in normal operation or a
scrub, it will reconstruct the missing data and write it back, closing
this loop immediately.  Where "normal operation" means "read errors are
reported by the drive before the driver times out".

> A resync will scan the array from start to finish - if you have 10TB's
> worth of disk, you MUST be prepared to handle these errors.
> 
> By default, mdadm will assume a disk is faulty and kick it after about
> 10secs, but a desktop drive will hang for maybe several minutes before
> reporting a problem.

MD raid has no timeout, and does not kick drives out for occassional
read errors.  The timeout is in the per-device drivers (SCSI, SATA,
whatever).  Which defaults to 30 seconds.  Desktop drives typically keep
trying to read a bad sector for 120 seconds or more, ignoring the world
while they do so.  Drives with default SCTERC support typically report a
read error within four to seven seconds.

With a desktop drive, the linux device driver bails after 30 seconds and
resets the link to the drive -- which gets ignored.  And keeps getting
ignored until the original read retry cycle finishes.  During this time,
MD has reconstructed the data and told the driver to write the fixed
sector.  That *write* also fails (because the driver is failing to
reset) and that *write error* kicks the drive out of the array.

Anyways, please consider reading the threads I pointed Andras at :-)

Phil

  reply	other threads:[~2015-10-21 16:05 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-20  2:35 How to recover after md crash during reshape? andras
2015-10-20 12:50 ` Anugraha Sinha
2015-10-20 13:04 ` Wols Lists
2015-10-20 13:49 ` Phil Turmel
     [not found]   ` <3baf849321d819483c5d20c005a31844@tantosonline.com>
2015-10-20 15:42     ` Phil Turmel
2015-10-20 22:34       ` Anugraha Sinha
2015-10-21  3:52       ` andras
2015-10-21 12:01         ` Phil Turmel
2015-10-21 16:17       ` Wols Lists
2015-10-21 16:05         ` Phil Turmel [this message]
2015-10-25 14:15       ` andras
2015-10-25 23:02         ` Phil Turmel
2015-10-28 16:31           ` Andras Tantos
2015-10-28 16:42             ` Phil Turmel
2015-10-28 17:10               ` Andras Tantos
2015-10-28 17:38                 ` Phil Turmel
2015-10-29 16:59               ` Andras Tantos
2015-10-30 18:12                 ` Phil Turmel
2015-11-03 23:42                   ` How to recover after md crash during reshape? - SOLVED/SUMMARY Andras Tantos
2015-10-21  1:35 ` How to recover after md crash during reshape? Neil Brown
2015-10-21  4:03   ` andras
2015-10-21 12:18   ` Phil Turmel
2015-10-21 20:26     ` Neil Brown
2015-10-21 20:37       ` Phil Turmel

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=5627B7C9.1050700@turmel.org \
    --to=philip@turmel.org \
    --cc=andras@tantosonline.com \
    --cc=antlists@youngman.org.uk \
    --cc=linux-raid@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 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.