Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Avoid Western Digital external drives' built-in spin down' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Avoid Western Digital external drives' built-in spin down
Authored by: randalla on Mar 18, '09 08:10:48AM
I effectively did something very similar to this to make that damn drive not spin down (it's where I store all the files I serve to my PS3...so it was really annoying).

My solution was not to write a script, but rather to just call touch on the hidden file directly through the launch agent. Here's the plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">;
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.xaren.touchApollo</string>
<key>ProgramArguments</key>
<array>
<string>touch</string>
<string>/Volumes/Apollo/.touch</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>StartInterval</key>
<integer>60</integer>
</dict>
</plist>

My MyBook drive is called Apollo. Since I'm not overly concerned about logging, if the drive isn't there then I'm not terribly worried about any log messages this may produce.

Save the file in ~/Library/LaunchAgents and either load it using launchctl load /path/to/agent.plist and you should be good to go.

I figured out my solution when I needed it. The above solution is better than mine, but I thought I'd share anyway :)

Adam.

---
Xaren Development
http://www.xaren.net

[ Reply to This | # ]

Avoid Western Digital external drives' built-in spin down
Authored by: Anonymous on Mar 19, '09 11:25:51AM
Instead of touching /Volumes/Apollo directly, you could avoid any logged errors by saying [[ -w /Volumes/Apollo ]] && touch /Volumes/Apollo. I wonder if you need to wrap each "word" in a separate "<string> .. </string>" clause.

[ Reply to This | # ]