The art of the bodge: I'm running a long SMART self-test overnight on a hard drive and to prevent it from going to sleep I whipped up a bash while loop that periodically checks smartctl to see if the test is still in progress and if yes then it reads a single block from the disk with dd if=/dev/sda of=/dev/null count=1 to keep it active