On Fri, 2021-04-02 at 13:12 -0600, Chris Murphy wrote:
> # smartctl -l scterc /dev/sdd
> smartctl 7.2 2021-01-17 r5171 [x86_64-linux-5.11.10-200.fc33.x86_64]
> (local build)
> Copyright (C) 2002-20, Bruce Allen, Christian Franke,
>
www.smartmontools.org
>
> SCT Error Recovery Control command not supported
>
> # smartctl -l scterc /dev/sde
> smartctl 7.2 2021-01-17 r5171 [x86_64-linux-5.11.10-200.fc33.x86_64]
> (local build)
> Copyright (C) 2002-20, Bruce Allen, Christian Franke,
>
www.smartmontools.org
>
> SCT Error Recovery Control:
> Read: 85 (8.5 seconds)
> Write: 85 (8.5 seconds)
>
> So I guess the /dev/sde drive is set correctly, right? Or would you
> recommend disabling SCT ERC for this drive?
Leave /dev/sde alone, 85 deciseconds is fine.
OK.
Not much can be done with /dev/sdd itself directly. But it is
possible
to increase the kernel's command timer for this drive. The usual way
of doing this is via sysfs.
Tried that and it seems to work.
I think it can be done with a udev rule
as well, but I'm having a bit of a lapse how to do it. Udev needs to
identify the device by serial number or wwn, but changing the timeout
via sysfs requires knowing that the /dev node is - which of course can
change each time you boot or plug the device in. I don't know enough
about udev. But there should be examples on the internet or you can
just fudge it with the linux-raid wiki guide.
This came up in a Google search:
https://github.com/jonathanunderwood/mdraid-safe-timeouts
It´s for MD arrays, but I´m guessing it could be adapted for BTRFS as
well.
poc
PS One thing that slightly confused me in setting up the RAID array is
that, unlike with MD, there´s no new pseudo-device, and you mount the
array by just mounting one of its components, right? (I´ve already done
it and it works, just checking if I´ve missed something).