scx/disks-keepalive

Description

An utility that can disable extensive head parking for specified disk drives. It is based on smartctl and can be considered as an equivalent of wdidle3 or idle3ctl. It is supposed to deal with non-removable media. It tries to disable APM for all disks listed in the configuration file. It can work as a standalone utility or a systemd unit. It doesn't provide udev rules, but you can define your own.

Alternatives:

  • wdidle3.exe is a proprietary utility for MS-DOS, officially provided by WD for their HDDs.
  • idle3-tools/idle3ctl is an unofficial Linux utility which can be considered as an alternative to the wdidle3.exe. Compatibility with SATA-to-USB adapters is uncertain.
  • hdparm can set the APM (Advanced Power Management) feature. Unfortunately, both udev rules and systemd units are a Debian/Ubuntu-only thing. They are not supported on EL, nor Fedora.
  • smartmontools/systemctl can set the APM (Advanced Power Management) feature. On EL/Fedora, it only provides a S.M.A.R.T. (Self Monitoring and Reporting Technology) service.

Parking the disk head is a normal process that occurs in all hard disk drives. However, extensive head parking can lead to premature failure of the HDD. It is impossible to clearly determine when head parking is too intensive. It may vary depending on the manufacturer and model of the drive. Some reports indicate possible differences within the same HDD model. The series and edition of the disk (BOX or OEM) may be relevant. And of course the firmware version also matters. Anyway, if the disk parking occurs once a minute or more and makes a squeaking noise, that is the basis for considering the use of one of the above-mentioned tools. If you suspect that this is happening, you should monitor the "Load_Cycle_Count" parameter of the S.M.A.R.T. mechanism and watch out for the noises your drive makes.

The problem stems from the smart head parking mechanism implemented in the new HDDs. It is designed to conserve disk usage and save energy when the disk remains idle for a certain period of time. However, this mechanism is often adapted to work under Windows, where the activity of the system disk is more continuous. In the case of Linux, we can often observe short periods of disk use followed by idle times, which leads to a disturbance in the operation of this mechanism.

In most cases this problem can be resolved by disabling APM. If this operation is not supported by your HDD, you can also try to set the APM value to 254. This is how the above tool actually works. Please note that disabling APM may lead to an increase in HDD temperature. If the drive constantly runs at temperatures in excess of 50 °C (see: "Temperature_Celsius" in S.M.A.R.T.), the risk of premature failure is increased. Use at your own risk!

Installation Instructions

For EL7:

cd '/etc/yum.repos.d/'

curl 'https://copr.fedorainfracloud.org/coprs/scx/disks-keepalive/repo/epel-7/scx-disks-keepalive-epel-7.repo' > 'scx-disks-keepalive-epel-7.repo'

yum install 'disks-keepalive'

systemctl enable 'disks-keepalive.service'

systemctl start 'disks-keepalive.service'

For EL8:

cd '/etc/yum.repos.d/'

curl 'https://copr.fedorainfracloud.org/coprs/scx/disks-keepalive/repo/epel-8/scx-disks-keepalive-epel-8.repo' > 'scx-disks-keepalive-epel-8.repo'

dnf install 'disks-keepalive'

systemctl enable --now 'disks-keepalive.service'

Active Releases

The following unofficial repositories are provided as-is by owner of this project. Contact the owner directly for bugs or issues (IE: not bugzilla).

Release Architectures Repo Download Centos-stream 8 aarch64 (0)*, ppc64le (0)*, x86_64 (0)* Centos-stream 8 (0 downloads) Centos-stream 9 aarch64 (0)*, x86_64 (0)* Centos-stream 9 (0 downloads) Epel for CentOS 7 ppc64le (0)*, x86_64 (0)* Epel for CentOS 7 (0 downloads) Epel for CentOS 8 aarch64 (0)*, ppc64le (0)*, s390x (0)*, x86_64 (0)* Epel for CentOS 8 (0 downloads) Epel for CentOS 9 aarch64 (0)*, s390x (0)*, x86_64 (0)* Epel for CentOS 9 (0 downloads) Fedora 34 aarch64 (0)*, armhfp (0)*, i386 (0)*, ppc64le (0)*, s390x (0)*, x86_64 (0)* Fedora 34 (0 downloads) Fedora 35 aarch64 (0)*, armhfp (0)*, i386 (0)*, ppc64le (0)*, s390x (0)*, x86_64 (0)* Fedora 35 (0 downloads) Fedora eln aarch64 (0)*, i386 (0)*, ppc64le (0)*, s390x (0)*, x86_64 (0)* Fedora eln (0 downloads) Fedora rawhide aarch64 (0)*, armhfp (0)*, i386 (0)*, ppc64le (0)*, s390x (0)*, x86_64 (0)* Fedora rawhide (0 downloads) Oraclelinux 7 aarch64 (0)*, x86_64 (0)* Oraclelinux 7 (0 downloads) Oraclelinux 8 aarch64 (0)*, x86_64 (0)* Oraclelinux 8 (0 downloads)

* Total number of packages downloaded in the last seven days.


This is a companion discussion topic for the original entry at https://copr.fedorainfracloud.org/coprs/scx/disks-keepalive/