How to increase discs timeout?

Discussion in general that pertains to Sabayon Linux - Must Pertain to Sabayon Linux

Moderator: Moderators

Post Reply
Old Dear Hen
Posts: 890
Joined: Sun Aug 21, 2011 8:48

How to increase discs timeout?

Post by msdobrescu » Fri Aug 07, 2020 17:42


I have an old USB to SATA multiplier and I have attached large discs to it.
I can't copy on them for a long time, looks like sometimes the write operation takes longer.
I am not really sure.
I'd like to check that and increase the timeout on the discs.
How could I do that?

Thanks you.

Old Dear Hen
Posts: 890
Joined: Sun Aug 21, 2011 8:48

Re: How to increase discs timeout?

Post by msdobrescu » Sat Aug 08, 2020 5:06

Here is my temporary solution, until the disk is ejected or the computer restarted:

Code: Select all

echo 180 > /sys/block/sdf/deviceMM/timeout
Above, the disk is sdf, but will be used the needed one.

And checked (although the naming differs:

Code: Select all

find /sys/class/scsi_generic/*/device/timeout -exec grep -H . '{}' \;

This is inspired by this post on StackExchange.

The problem is related to using large drives (SATA III 6TB) on an old controller (supporting LBA48) supporting SATA II only. I don't really know the source of the problem, but would be really useful to be able to persist the timeout for certain drives. There are udev solutions over the Internet, but it seems udev is not used on Sabayon.

User avatar
Sagely Hen
Posts: 3569
Joined: Sun Sep 21, 2008 1:12
Location: Italy

Re: How to increase discs timeout?

Post by sabayonino » Sat Aug 08, 2020 10:20

look at "sdparm" disk utility.

Code: Select all

  @@ Searching...
╠      @@ Package: sys-apps/sdparm-1.10 branch: 5, [sabayon-weekly] 
╠          Available:     version: 1.10 ~ tag: NoTag ~ revision: 0
╠          Installed:     version: 1.10 ~ tag: NoTag ~ revision: 0
╠          Slot:          0
╠          Homepage: 
╠          Description:   Utility to output and modify parameters 
╠                         on a SCSI device, like hdparm 
╠          License:       BSD
╠   Keywords:  sdparm
╠   Found:     1 entry
and read this : ... 00125.html

It could help you

Your problem could be related to the cache read/write performance + USB controller performance

The system r/w progress utility can show the fully r/w operations are completed but the deviece still r/w so you can't umount or remove the device(s)

Old Dear Hen
Posts: 890
Joined: Sun Aug 21, 2011 8:48

Re: How to increase discs timeout?

Post by msdobrescu » Sat Aug 08, 2020 20:59

Hi, thanks, it is interesting, but that link is referring to spin down or power down. It's a good resource for the ones needing the power down or spin down.
I think my problem is quite opposite. The card I have, Lycom UB-208M, despite discontinued, has a firmnware that prevents the spin down/sleep in case of inactivity. It was my request to them, so, graciously, Lycom support offered me the firmware I've needed.

Now, my problem is really related to the cache and controller performance. So, copying files, breaks the transfer at some point, sometimes soon, after 20GB, sometimes later, after 200GB. I've tested with the same files and got strange results. Also, copying from a drive connected to that card, didn't finish. It ended in a true crash that needed to check the target disk (that was not on that controller).

I've searched and read many articles, but seems that running those commands above helps.
Unfortunately, I can't persist that, as I don't know how to identify the disks, they being assigned dynamically due to the pluggable nature of the setup.
I've increased the timeout progressively, by 30, 180 being the smallest that worked so far for about 1.2TB data transfer at once, regardless it's written or read. I see that the more is transferred, the bigger the timeout must be. The transfer rate is proportional to the timeout set, so the bigger the timeout is, the slower it goes.

Post Reply