I like using laptop hard drives in my desktops. Something about the lower latency. Call it a poor-man’s Raptor, if you will.
As it happens, I bought another drive from Western Digital, the WD Black WD5000BPKT, that had a decent 5-year warranty, but one constant and annoying issue: the onboard power-saving features create an annoying *click* more or less randomly, as the drive seems to attempt a spin-down at strange moments.
I’ve had this issue since day one with this drive, and I’m still not sure I’ve fixed it. Here are my workarounds so far:
Automatic Disk Access
No joke – the way I fixed this under Ubuntu 12.04 was to add a directory search to my crontab, scheduling a disk use before the about 4 minutes or so it would take for the disk to spin down.
sudo crontab -e
*/3 * * * * ls /home/
Random Sector Access
I tried switching from this to having the disk read from a randomly selected sector, since I was concerned all those reads from the same place were going to do stress damage of a different kind. So I thought perhaps I could get the disk to read random sectors on the plate with something like this…
*/3 * * * * sudo dd if=/dev/sdx of=/dev/null bs=4096 skip=$(( -1 + ( disksize * $RANDOM / 65536 ) ))
the command appears to work (that is, do essentially nothing) but the clicking returned rapidly.
Power Management Settings
Under Ubuntu 14.04, neither of these options appears to work. So I dug down under the system settings to find the disk utility, which Trusty Tahr now simply calls the “Disks” program.
A few clicks later and I can set the disk’s APM setting to ‘254, Spin-down not permitted’, You have to do it that way because setting the power management level to ‘255, disabled’ causes the drive to say “LOL, O RLY?” and still spin down anyway.