scx/disks-keepalive

Project ID: 55004

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 (58 downloads)
Centos-stream 9 aarch64 (0)*, x86_64 (0)* Centos-stream 9 (61 downloads)
EPEL 7 ppc64le (0)*, x86_64 (2)* EPEL 7 (71 downloads)
EPEL 8 aarch64 (0)*, ppc64le (0)*, s390x (0)*, x86_64 (4)* EPEL 8 (74 downloads)
EPEL 9 aarch64 (0)*, s390x (0)*, x86_64 (0)* EPEL 9 (67 downloads)
Fedora 37 aarch64 (0)*, armhfp (0)*, i386 (0)*, ppc64le (0)*, s390x (0)*, x86_64 (0)* Fedora 37 (0 downloads)
Fedora 38 aarch64 (0)*, i386 (0)*, ppc64le (0)*, s390x (0)*, x86_64 (0)* Fedora 38 (38 downloads)
Fedora 39 aarch64 (0)*, i386 (0)*, ppc64le (0)*, s390x (0)*, x86_64 (0)* Fedora 39 (23 downloads)
Fedora 40 aarch64 (0)*, i386 (0)*, ppc64le (0)*, s390x (0)*, x86_64 (0)* Fedora 40 (9 downloads)
Fedora eln aarch64 (0)*, ppc64le (0)*, s390x (0)*, x86_64 (0)* Fedora eln (65 downloads)
Fedora rawhide aarch64 (0)*, i386 (0)*, ppc64le (0)*, s390x (0)*, x86_64 (0)* Fedora rawhide (56 downloads)

* Total number of downloaded packages.