On 10/03/2011 06:04 PM, Anton Yuzhaninov wrote:
Подскажите как регирует контроллеры/FreeBSD на срабатыване таймацта,
задаваемого через smartctl -l scterc,N,M
?
Немного погуглил - информация противоречивая:
- диск при срабатывании таймацта сообщеяет некий soft error и
контроллер/OC увидев такую ошибку могут не выкидывать диск из
рейд-массива (как это происходит если диск совсем не отвечает в рамках
таймаута на уровне контроллера)
- сробатыываене этого таймацута позволяет раньше выкинуть
медленный/плохой диск из рейда, чтобы систем дальше работала без него.
Да ну, ерунда какая-то. Гуглить надо первоисточник, а именно - ата
стандарт (точнее его драфт который доступен в сети). Цитирую
(переводить лень, сорри):
The Error Recovery Control command is used to set time limits for read
and write error recovery.
[skip]
If the Read Command Timer is going to expire while the device is
performing error recovery, the device shall
stop processing the command and report an uncorrectable ECC error for
the LBA that was causing error
recovery to be invoked prior to timer expiration. Note that the LBA
might be recoverable given more time for
error recovery. At this point the host may reconstruct the data for the
failing LBA from the other devices in a
RAID and issue a write command to the target LBA, allowing the device to
attempt vendor specific error
recovery on the suspect LBA.
The Write Command Timer sets the upper limit for the amount of time a
device processes a write command.
The minimum value for this command is one. Setting this value to zero
shall disable Write Command timeout,
allowing the device to perform all available error recovery procedures
without a time limit.
The Write Command Timer has the effect of controlling how aggressively
the device reallocates write data
when encountering write errors. A large Write Command Timer value allows
the device to use more
available error recovery procedures for dealing with write errors. A
small Write Command Timer value forces
the device to attempt to reallocate sectors that may have otherwise been
written without error. If the timer is
about to expire, then the device should attempt to reallocate the data
before the timer expires. If the device
is unable to complete data reallocation before the timer expires then
the devices fails the command when the
timer expires. When write cache is enabled the operation of the timer is
vendor specific.
В двух словах - диск намного раньше скажет, что данные не удалось
считать или записать, не дожидаясь всех возможных recovery процедур.
При ошибки записи рейд скорее всего попытается ее повторить (увеличив
счетчик ошибок) и в случае фейла - выкинет глючный диск. С scterc это
произойдет быстрее и скорее всего не по таймауту драйвера, а именно по
ошибке. Так что второе ближе к истине, а первое - прекрасная тема для
статьи на хабро, ггг.