Most Western Digital hard drives’ firmware let the heads park themselves after a certain amount of seconds in case the disk is not actively performing any operation.
This might be useful to keep power consumption under control but is actually harmful for disks that run 24/7 (WD Red for example).
Luckily there is a way to disable head parking, this can be done directly from Linux using a tool called idle3ctl.


# Fedora
dnf install idle3-tools

# CentOS (gcc and make required)
# get source code from here: https://sourceforge.net/projects/idle3-tools/
tar xzvf idle3-tools-0.9.1.tar.gz
cd idle3-tools-0.9.1
make

Now, identify the hard disk device using for example fdisk -l, once done run the following command to completely disable head park.


# Fedora
sudo idle3ctl -d /dev/sd[X]

# CentOS
sudo ./idle3ctl -d /dev/sd[X]

Don’t forget to power off and on (reboot is not enough) the machine where the hard disk is installed, otherwise the setting is not gonna be applied.
To check if head park has really been disabled use smartctl and check after a few minutes if Load_Cycle_Count grew or not.


smartctl -A /dev/sd[X]

idle3 tools documentation