Natterings RSS

Mobile Hacker Stephen Ryner Jr. is also known as @nuthatch

Archive

Dec
12th
Sat
permalink

Keep Drobo from sleeping

My Drobo keeps falling asleep. It’s not in standby mode, but whenever Snow Leopard opens a file dialog, there is this huge pause while the drives in the Drobo spin up. I’m blocked. I listen to the four drives spin up and click into action. Then, finally, I’m allowed to use the file dialog. The process repeats throughout the day.

So here’s what I’m going to try. A little script:

#!/bin/bash
while [ true ]; do
# Keep Drobo from sleeping
touch /Volumes/Drobo/nosleep
sleep 300
done 

I saved that file on my Drobo as nosleep.

The path to any drive attached to OS X should be in /Volumes and that is where you’ll find it from the command line or a script.

And then from the command line:

$ chmod  +x /Volumes/Drobo/nosleep

That makes your script executable. You only need to do that once.

Then… execute it in the background:

$ /Volumes/Drobo/nosleep &
[1] 47644

And that should do it. Every five minutes, the script will update the filesystem on the Drobo, hopefully keeping it awake.

You can use the process command to verify your script is working. See our process number 47644 below, and its child 47646 sleeping?

~ $ ps
  PID   TT  STAT      TIME COMMAND
20643 s001  S+     0:00.55 -bash
47641 s003  S      0:00.01 -bash
47644 s003  S      0:00.01 /bin/bash /Volumes/Drobo/nosleep
47646 s003  S      0:00.00 sleep 300

Does it work for you? Got a better idea? Please hit me up in the comments. Thanks!

  1. bobwalder reblogged this from nuthatch
  2. nuthatch posted this
blog comments powered by Disqus