All of lore.kernel.org
 help / color / mirror / Atom feed
From: "James Johnston" <johnstonj.public@codenest.com>
To: "'Mladen Milinkovic'" <maxrd2@smoothware.net>,
	"'Chris Murphy'" <lists@colorremedies.com>,
	"'Austin S. Hemmelgarn'" <ahferroin7@gmail.com>
Cc: "'Martin'" <rc6encrypted@gmail.com>,
	"'Btrfs BTRFS'" <linux-btrfs@vger.kernel.org>
Subject: RE: Recommended why to use btrfs for production?
Date: Sun, 5 Jun 2016 16:33:34 -0000	[thread overview]
Message-ID: <0aaf01d1bf48$020d4670$0627d350$@codenest.com> (raw)
In-Reply-To: <73123a36-6502-d735-c813-fce43b620e5a@smoothware.net>

On 06/05/2016 10:46 AM, Mladen Milinkovic wrote:
> On 06/03/2016 04:05 PM, Chris Murphy wrote:
> > Make certain the kernel command timer value is greater than the driver
> > error recovery timeout. The former is found in sysfs, per block
> > device, the latter can be get and set with smartctl. Wrong
> > configuration is common (it's actually the default) when using
> > consumer drives, and inevitably leads to problems, even the loss of
> > the entire array. It really is a terrible default.
> 
> Since it's first time i've heard of this I did some googling.
> 
> Here's some nice article about these timeouts:
> http://strugglers.net/~andy/blog/2015/11/09/linux-software-raid-and-drive-
> timeouts/comment-page-1/
> 
> And some udev rules that should apply this automatically:
> http://comments.gmane.org/gmane.linux.raid/48193

I think the first link there is a good one.  On my system:

/sys/block/sdX/device/timeout

defaults to 30 seconds - long enough for a drive with short TLER setting
but too short for a consumer drive.

There is a Red Hat link on setting up a udev rule for it here:
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/5/html/Online_Storage_Reconfiguration_Guide/task_controlling-scsi-command-timer-onlining-devices.html

I thought it looked a little funny, so I combined the above with one of the
VMware udev rules pre-installed on my Ubuntu system and came up with this:

# Update timeout from 180 to one of your choosing:
ACTION=="add|change", SUBSYSTEMS=="scsi", ATTRS{type}=="0|7|14", \
RUN+="/bin/sh -c 'echo 180 >/sys$DEVPATH/device/timeout'"

Now my attached drives automatically get this timeout without any scripting
or manual setting of the timeout.

James



  reply	other threads:[~2016-06-05 16:33 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-03  9:49 Recommended why to use btrfs for production? Martin
2016-06-03  9:53 ` Marc Haber
2016-06-03  9:57   ` Martin
2016-06-03 10:01 ` Hans van Kranenburg
2016-06-03 10:15   ` Martin
2016-06-03 12:55 ` Austin S. Hemmelgarn
2016-06-03 13:31   ` Martin
2016-06-03 13:47     ` Julian Taylor
2016-06-03 14:21     ` Austin S. Hemmelgarn
2016-06-03 14:39       ` Martin
2016-06-03 19:09       ` Christoph Anton Mitterer
2016-06-09  6:16       ` Duncan
2016-06-09 11:38         ` Austin S. Hemmelgarn
2016-06-09 17:39           ` Chris Murphy
2016-06-09 19:57             ` Duncan
2016-06-03 14:05   ` Chris Murphy
2016-06-03 14:11     ` Martin
2016-06-03 15:33       ` Austin S. Hemmelgarn
2016-06-04  0:48         ` Nicholas D Steeves
2016-06-04  1:48           ` Chris Murphy
2016-06-06 13:29             ` Austin S. Hemmelgarn
2016-06-04  1:34       ` Chris Murphy
2016-06-05 10:45     ` Mladen Milinkovic
2016-06-05 16:33       ` James Johnston [this message]
2016-06-05 18:20         ` Andrei Borzenkov
2016-06-06  1:47       ` Chris Murphy
2016-06-06  2:40         ` James Johnston
2016-06-06 13:36           ` Austin S. Hemmelgarn

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='0aaf01d1bf48$020d4670$0627d350$@codenest.com' \
    --to=johnstonj.public@codenest.com \
    --cc=ahferroin7@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lists@colorremedies.com \
    --cc=maxrd2@smoothware.net \
    --cc=rc6encrypted@gmail.com \
    /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.