zfsonlinux/zfs — Issue #471: Reduce timeout on disks
Author: Rudd-O
Created: 2011-11-29 01:25:36+00:00
State: open

For every disk device that ZFS manages:

On Fri, 2011-11-25 at 11:12 +0100, e-t172 wrote:
On 2011-11-25 11:02, Fajar A. Nugraha wrote:
> > For zfs to work properly:
> > - a drive needs to be report quickly that it failed
> > - zfs needs to know that the drive failed, and kick it out of the pool
> > (possibly activating hot spare, if available)
> >
> > The problem is some drives (your HDD might be among those) will retry
> > for a LOOOONG time reading/writing to a bad sector before if it gives
> > up. And linux's driver will also spend lots of time retrying.
>
> Maybe reducing /dev/block/*/device/timeout would alleviate this issue?
>
>

It'd be appropriate in case the device is just being... uhh... quite literally retarded. Five seconds? Ten seconds? Should be enough in contrast to the minutes- or hours-long timeouts.

Donno if this will fix the "kernel retries reads" problem (which fundamentally we need to solve in the linux kernel), but this might help.

I'd advise to adjust the timeout even in the case of disk partitions being used rather than whole disks. Remember that most of us who use zfs-on-root have no choice but to use ZFS on disk partitions because of /boot.