WD Scorpio Blue 640 Gb 2.5″ hard drive.
Western Digital mobile hard drives, at least 640 Gb model, have some unpleasant features on Mac OS X, regardless whether is it a root volume or an external drive. When idle, disk spins down and then spins up several times a minute. Mac OS X’s power saving settings do not matter. This behavior is not only annoying but also harmful for the device.
Community offers an efficient solution: HDAPM. This utility changes the power management settings for the device directly so it runs constantly. However hdapm works only with internal SATA drives and inapplicable with external drives connected by USB. So another solution is wanted.
My idea was to send the drive filesystem some tasks repeated with some interval. Initially I created this with AppleScript, but after N cycles (I do not know exactly how many) it reported “Stack overflow” error. Then I decided to migrate the script to bash engine. It seems to be simpler and I suppose will not give that stupid errors.
Here you can find a working script. It uses some variables such as disk name (or name of its first partition), notification type (text output in Terminal window or by Voice).
To use the script, copy the text below, paste it into a text editor, edit the disk_name variable and save with .command extension.
Create a blank (or a small text) file named driveWakeUp at the drive’s root.
Now you can run the script:
Okay, I also could dedicate a separate function for notifications, but I was lazy to the time (: