Modern hard drives allow to set the amount of time a hard disk is

allowed to spend recovering from a read or write error. This feature
is called ERC (error recovery control, usually in Seagate), TLER
(time-limited error recovery, usually on Western Digital) or CCLT
(command completion time limit, usually on Samsung or Hitachi).

This rc.d script allows to set these valus on system startup to
tune disks for RAID usage.

WWW: https://github.com/AMDmi3/scterc-rc.d
This commit is contained in:
Dmitry Marakasov 2014-01-31 19:48:26 +00:00
parent a92d3f339f
commit 385e0d496a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=342057
5 changed files with 62 additions and 0 deletions

View file

@ -850,6 +850,7 @@
SUBDIR += screen
SUBDIR += screenfetch
SUBDIR += screenie
SUBDIR += scterc
SUBDIR += sdd
SUBDIR += sdparm
SUBDIR += searchmonkey

34
sysutils/scterc/Makefile Normal file
View file

@ -0,0 +1,34 @@
# Created by: Dmitry Marakasov <amdmi3@FreeBSD.org>
# $FreeBSD$
PORTNAME= scterc
PORTVERSION= 0.0.1
CATEGORIES= sysutils
MAINTAINER= amdmi3@FreeBSD.org
COMMENT= Configure SCT ERC for hard disks on system startup
RUN_DEPENDS= ${LOCALBASE}/sbin/smartctl:${PORTSDIR}/sysutils/smartmontools
USE_GITHUB= yes
GH_ACCOUNT= AMDmi3
GH_PROJECT= ${PORTNAME}-rc.d
GH_COMMIT= c8dc8c1
NO_BUILD= yes
SUB_FILES= pkg-message
PLIST_FILES= etc/rc.d/scterc
PORTDOCS= *
OPTIONS_DEFINE= DOCS
post-patch:
@${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|' ${WRKSRC}/scterc.sh
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/scterc.sh ${STAGEDIR}${PREFIX}/etc/rc.d/scterc
${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}/
.include <bsd.port.mk>

2
sysutils/scterc/distinfo Normal file
View file

@ -0,0 +1,2 @@
SHA256 (scterc-0.0.1.tar.gz) = 14edaef5e3ab554f86f0284e771fa1347c9fb7e24c820a84459a4bf78890c9ef
SIZE (scterc-0.0.1.tar.gz) = 3145

View file

@ -0,0 +1,15 @@
To enable setting hard disk SCT ERC on system boot time, add the
following to your /etc/rc.conf:
scterc_enable="YES"
# specify hard disks to configure
scterc_disks="ada0 ada1"
# specify read and write timeouts in tenths of second
# here each is set to 7.0 seconds, which is also the default
# for which you may omit these lines
scterc_read_timeout="70"
scterc_write_timeout="70"
See %%DOCSDIR%%/README.md for more info.

10
sysutils/scterc/pkg-descr Normal file
View file

@ -0,0 +1,10 @@
Modern hard drives allow to set the amount of time a hard disk is
allowed to spend recovering from a read or write error. This feature
is called ERC (error recovery control, usually in Seagate), TLER
(time-limited error recovery, usually on Western Digital) or CCLT
(command completion time limit, usually on Samsung or Hitachi).
This rc.d script allows to set these valus on system startup to
tune disks for RAID usage.
WWW: https://github.com/AMDmi3/scterc-rc.d