Link to home
Start Free TrialLog in
Avatar of Hikarus
HikarusFlag for United States of America

asked on

Wake Up WD MyBook RAID 2T

I'm having the sleep problem with this drive and I already read the article about using a timed backup software to keep it awake. It's a decent solution, but I have another question: Once the drive is asleep, HOW DO I WAKE IT UP?
I have MacOS Leopard, and when the drive goes to sleep the Volume just disappears from my finder, and I don't see a way to wake it up from MacOS or the WD Service. Unplugging the HD won't do the trick 'cos it's asleep, and the only option I find is holding down it's power button for a while until it turns off, and then turn it back on... or removing the power cord and plugging it back again, but this is an awful solution. Is there a button on the drive to wake it up or something? :O
Avatar of technious
technious

I am assuming you already tried this:
http://att.macrumors.com/attachment.php?attachmentid=72934&d=1177206273
That's in your Energy Saver options (in Preferences). There is a small checkbox that you can unclick to prevent you drives from going to sleep
So, try this:
It looks like there is no cut and dry way to prevent this drive from spinning down about every ten minutes. Try this instructional I found:

1.      Open Terminal.
2.      Type touch /volumes/MyBook/.hiddenfile (replace MyBook with the name the OS is listed as for external HD, and remember the console is case sensitive)
3.      Type: "su -" and then type in the root password
4.      Type "crontab -e" You are now in the "vi" editor...kind of tricky here...so type exactly what I put here.
5.      Type "i" Thats a lowercase "i".
6.      Now type something like this */5 * * * * touch -c '/Volumes/MyBook/.hiddenfile' (replace MyBook with the name of your MyBook. Also, mind the single ticks)
7.      Hit the Escape key.
8.      Type "x"
9.      Close terminal.


This should keep the drive awake as long as you have it connected. All it does is creates a hidden file on the drive and re-writes it every 5 minutes so it prevents the drive from sleeping. Some might argue that it will shorten the life of the drive, but doing this is actually less intensive on a hard drive than running an operating system on it. It wont hurt the drive to write a small file every 5 minutes.
I've been having the same problem with MyBook going to sleep and unmounting. I tried technious's instructions and I can't even get past the first line.

I found an applet online that automates the process of writing the hidden file. You can download it at http://www.macupdate.com/info.php/id/31158

The default is to write the file every minute, but you can change it from 60 (seconds) to 300 if you want the file to be written every 5 minutes. I just ran the applet, so I can't report whether it solves the problem or not.
Avatar of Hikarus

ASKER

technious: I think I must have done something wrong (typed literally, but I think I should have typed ENTER after the last line 'cos when I typed ESCAPE, it erased the last character). What's exactly what I've done with the VI editor? what script have I created/modified? because I don't know if repeating the operation will create another file, or a new line or what ever... I need to know what I'm doing. Thanks a lot :)
The applet I used didn't work. The drive is still unmounting. I fear there is no solution to this problem other than to throw the drive into the ocean.

Regarding the question about waking the drive up, when mine unmounts, I unplug it and pull the USB cable, then plug it back in and insert the USB cable. This makes me wonder if the problem is related to the drive sleeping or whether there is something else causing it to unmount. In any case, the drive is worthless to me, and I will probably have to buy another 500 GB drive and go back to using software to copy one to the other.
The VI editor is just a text editing tool. When you press Esc it looks like it deletes that last line because it brings up the command line for VI, but the line is still there it is just not being displayed.

1.      Open Terminal. [this is a command line tool built into all MAC OSs]
2.      Type touch /volumes/MyBook/.hiddenfile (replace MyBook with the name the OS is listed as for external HD, and remember the console is case sensitive) [This creates a file called .hiddenfile in the /volumes/MyBook directory. The . preceding the hiddenfile make this file hidden.] DONT FORGET TO CHANGE MyBook TO THE NAME OF YOUR EXTERNAL DRIVE, OR THIS SCRIPT WONT WORK!!!!!
3.      Type: "su -" and then type in the root password [this allows you to execute the following command with root priveleges]
4.      Type "crontab -e" You are now in the "vi" editor...kind of tricky here...so type exactly what I put here. [this opens up the crontab which is a utility that executes a command or script automatically at a specified interval]
5.      Type "i" Thats a lowercase "i". [this changes VI to the insert mode which allows you to add text to the file]
6.      Now type something like this */5 * * * * touch -c '/Volumes/MyBook/.hiddenfile' (replace MyBook with the name of your MyBook. Also, mind the single ticks) [this command creates a hidden file on your MyBook volume every 5 minutes which enables the OS to keep the drive from sleeping.] DONT FORGET TO CHANGE MyBook TO THE NAME OF YOUR EXTERNAL DRIVE, OR THIS SCRIPT WONT WORK!!!!!
7.      Hit the Escape key. (This opens the VI Command line and allows you to manipulate the file on the file system and run other VI commands)
8.      Type "x" (this saves the file)
9.      Close terminal. (this closes the file)
Is there anything else I need to clarify?
I know I'm doing something wrong. The name of my drive is My Book.

I type in: touch /volumes/My Book/.hiddenfile

When I hit ENTER, I get

touch: Book/.hiddenfile: No such file or directory

try enclosing My Book in quotes. Like this:
touch /volumes/"My Book"/.hiddenfile

Open in new window

Make sure you enclose the My Book in quotes wherever it is used in the instructions.
Yeah, ok, I see that I had to use "My Book."  Still having problems, or at least a question. After typing

*/5 * * * * touch -c '/Volumes/"My Book"/.hiddenfile'

I hit the enter key. Then the escape key, then x. Nothing changed in Terminal when I did this. Was I supposed to get an indication of something happening? How can I check to see if this script worked?
you must type a colon preceding the x.

that is a colon :

If you don't type the colon vi will not let you enter command mode.
Got it that time. Thanks. I will report back on whether that has ended the problem with the drive.
I have been running using this script for a few days. Although the drive has had a couple of problems with the drive not mounting on startup, once the drive is mounted, it has stayed mounted, even after leaving the Mac on overnight. All in all, I would say that the script has solved the problem.

My last question: If the day comes when I no longer have the drive and I'm still using the same Mac, how do I stop the script from running?
ASKER CERTIFIED SOLUTION
Avatar of technious
technious

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial