A problem with some of the Western Digital's My Book external hard drives is that they have a spin-down functionality built into their firmware. Meaning that no matter what preferences are set in System Preferences, if 10 minutes of inactivity have passed, the hard drive will go to sleep. This is annoying, as even if you are browsing files in the Finder without looking at the ones on the hard drive, the Finder triggers a spin-up, and then bogging down the system until the hard drive has finished spinning up.
A workaround for this is to not let the hard drive be inactive for more than five minutes by constantly touching a hidden file on the hard drive. This is done by first building a small script in bash that touches the hidden file and that also checks if the hard drive is mounted, so as to not flood the system logs if the drive isn't connected. Here's that code:
#!/bin/bash
# Used to not let a volume named MYBOOK sleep
volpresent=$(mount | grep MYBOOK | wc -c)
if [ $volpresent -gt 0 ]
then
touch /Volumes/MYBOOK/.hiddenfile
fi
This script should be made executable by running the following on the Terminal: chmod +x ./no_sleep_script.sh. Replace no_sleep_script.sh with whatever you named the script. The best way to run this script every five minutes is to use the launchd system built into Mac OS X, and a donationware app called Lingon is a great tool to manage it.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20090316190817357