Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

McPaul

macrumors member
Original poster
Sep 24, 2006
93
4
Vancouver
I have a Western Digital HD with a mac mini. Sometimes, after the Mybook is not used for a while, it will shut down, to the point that, only unplugging BOTH the firewire AND power to the Mybook will restart it.

How do I get this thing to reboot and show up on my desktop/finder again?

it's quite frustrating w/ itunes, as the songs wont play at all if the HD shuts down.
 

Lovesong

macrumors 65816
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
 

Attachments

  • Picture 1.png
    Picture 1.png
    72.5 KB · Views: 2,005

shinji

macrumors 65816
Mar 18, 2007
1,329
1,515
that doesn't reduce the life of the drive or anything, right? I don't care about power consumption, I just don't want to mess up my hard drive.
 

NATO

macrumors 68000
Feb 14, 2005
1,702
35
Northern Ireland
I know what you're describing, the MyBook drives have a built-in auto-spindown function which shuts the drive down after approx 10 minutes of inactivity, which is independent of Mac OS X.

To solve this (to the best I could), I created a small hidden file on the drive (although it could be any file, I chose a hidden file for convenience), and added a small cron job to 'touch' the file every 5 minutes, thus avoiding the drive shutting down while the drive was 'active' in OS X.

The line I added to my crontab was

Code:
*/5   *   *   *   *   touch '/Volumes/My External HD/.hiddenfile'

The drive has remained in the powered-up state perfectly since.
 

rockstarjoe

macrumors 6502a
Jun 2, 2006
875
76
washington dc
I know what you're describing, the MyBook drives have a built-in auto-spindown function which shuts the drive down after approx 10 minutes of inactivity, which is independent of Mac OS X.

To solve this (to the best I could), I created a small hidden file on the drive (although it could be any file, I chose a hidden file for convenience), and added a small cron job to 'touch' the file every 5 minutes, thus avoiding the drive shutting down while the drive was 'active' in OS X.

The line I added to my crontab was

Code:
*/5   *   *   *   *   touch '/Volumes/My External HD/.hiddenfile'

The drive has remained in the powered-up state perfectly since.

This sounds like an excellent solution, but I'm afraid I don't quite understand how to set up the file-touching cron thing. The terminal scares me. Could you explain a bit more? Thanks! :)
 

rdhatch

macrumors newbie
Nov 30, 2007
7
0
How to write the cron job

This sounds like an excellent solution, but I'm afraid I don't quite understand how to set up the file-touching cron thing. The terminal scares me. Could you explain a bit more? Thanks! :)

Not to tricky. Here goes:

1. Open Terminal.
2. type: "su -" and then type in the root password
3. type "crontab -e" You are now in the "vi" editor...kind of tricky here...so type exactly what I put here.
4. type "i" Thats a lowercase "i".
5. now type something like this */5 * * * * touch '/Volumes/MyBook/.hiddenfile' (replace MyBook with the name of your MyBook. Also, mind the single ticks)
6. Hit the Escape key.
7. type "x"
8. close terminal.

Your're all done! Good luck! ;)
 

balkce

Cancelled
Oct 18, 2007
2
0
Logs

I know what you're describing, the MyBook drives have a built-in auto-spindown function which shuts the drive down after approx 10 minutes of inactivity, which is independent of Mac OS X.

To solve this (to the best I could), I created a small hidden file on the drive (although it could be any file, I chose a hidden file for convenience), and added a small cron job to 'touch' the file every 5 minutes, thus avoiding the drive shutting down while the drive was 'active' in OS X.

The line I added to my crontab was

Code:
*/5   *   *   *   *   touch '/Volumes/My External HD/.hiddenfile'

The drive has remained in the powered-up state perfectly since.

Although your solution is good, if for some reason the disk is not connected (maybe it is a laptop), the logs will be flooded by errors stating that the .hiddenfile is not found.

A simple bash script can see if the volume is mounted or not before attempting to touching .hiddenfile:

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


Also, it is now not advisable to use crontab for regular jobs, as launchd is a better option. There is a donation-ware application called Lingon that provides a nice GUI to launchd.
 

i.p.

macrumors newbie
Mar 14, 2009
1
0
hi,

Although your solution is good, if for some reason the disk is not connected (maybe it is a laptop), the logs will be flooded by errors stating that the .hiddenfile is not found

A simple bash script can see if the volume is mounted or ...

actually there is no need for extra scripting,
just add the -c option to touch, that's enough..

touch -c ... does exactly the same thing as the shell script you provided ;)
 

tobinstrickland

macrumors newbie
Apr 12, 2009
1
0
Austin, TX ....where else?
I know what you're describing, the MyBook drives have a built-in auto-spindown function which shuts the drive down after approx 10 minutes of inactivity, which is independent of Mac OS X.

To solve this (to the best I could), I created a small hidden file on the drive (although it could be any file, I chose a hidden file for convenience), and added a small cron job to 'touch' the file every 5 minutes, thus avoiding the drive shutting down while the drive was 'active' in OS X.

The line I added to my crontab was

Code:
*/5   *   *   *   *   touch '/Volumes/My External HD/.hiddenfile'

The drive has remained in the powered-up state perfectly since.

DO you have to create the hidden file as well ....and if so, how do you do that?
 

TauDelt

macrumors newbie
Apr 13, 2009
3
0
Not to tricky. Here goes:

1. Open Terminal.
2. type: "su -" and then type in the root password
3. type "crontab -e" You are now in the "vi" editor...kind of tricky here...so type exactly what I put here.
4. type "i" Thats a lowercase "i".
5. now type something like this */5 * * * * touch '/Volumes/MyBook/.hiddenfile' (replace MyBook with the name of your MyBook. Also, mind the single ticks)
6. Hit the Escape key.
7. type "x"
8. close terminal.

Your're all done! Good luck! ;)

This didn't quite work for me... now the drive is not recognized at all. How can I reverse this?
 

johnpublic

macrumors newbie
Aug 2, 2009
7
0
Sacramento, CA
WD Firmware Upgrade Fixes Sleepy MyBook Mount Issue

2nd level support @ Western Digital directed me to download and install the latest firmware for the MyBook. That fixed the problem. The MyBook stays mounted. No longer need to run a job to touch a file.
 

Carlos E

macrumors 6502
Jun 30, 2007
333
0
NYC
2nd level support @ Western Digital directed me to download and install the latest firmware for the MyBook. That fixed the problem. The MyBook stays mounted. No longer need to run a job to touch a file.
Do you have a link? I updated the firmware and I'm still having the same issue. Maybe I used the wrong firmware.
 

johnpublic

macrumors newbie
Aug 2, 2009
7
0
Sacramento, CA
WD Firmware Link

Do you have a link? I updated the firmware and I'm still having the same issue. Maybe I used the wrong firmware.

Depends on what model and OS you are using.
Click on your product at this link: http://support.wdc.com/product/download.asp?level1=1&lang=en

Then, under "Select the software to download:" list, click on the firmware update for either Mac or PC - whichever you have.

For me, I have the MyBook Studio Edition, 1TB, USB2.0/FireWire400 / FireWire800 / eSATA, which is model # WD10000H1Q-00. Since I'm using a Mac, I downloaded the file at http://support.wdc.com/product/download.asp?groupid=113&sid=60&lang=en - File name WD_MB_Studio_1034_1_03.dmg, Firmware Version 1.034, dated January 2009.

The drive continues to work like a champ. I find that using these sequences for booting up and down help:
Booting up:
- Macbook - boot up
- eSATA card - insert
- MyBook - power on

Booting down:
- MyBook - "eject" drive from finder window on Mac
- MyBook - power down
- eSATA card - disconnect / eject
- Macbook - shut down
 

Carlos E

macrumors 6502
Jun 30, 2007
333
0
NYC
Depends on what model and OS you are using.
Click on your product at this link: http://support.wdc.com/product/download.asp?level1=1&lang=en

Then, under "Select the software to download:" list, click on the firmware update for either Mac or PC - whichever you have.

For me, I have the MyBook Studio Edition, 1TB, USB2.0/FireWire400 / FireWire800 / eSATA, which is model # WD10000H1Q-00. Since I'm using a Mac, I downloaded the file at http://support.wdc.com/product/download.asp?groupid=113&sid=60&lang=en - File name WD_MB_Studio_1034_1_03.dmg, Firmware Version 1.034, dated January 2009.

The drive continues to work like a champ. I find that using these sequences for booting up and down help:
Booting up:
- Macbook - boot up
- eSATA card - insert
- MyBook - power on

Booting down:
- MyBook - "eject" drive from finder window on Mac
- MyBook - power down
- eSATA card - disconnect / eject
- Macbook - shut down
I have the same drives and I updated the drives using the version of the firmware you posted. What eSata card are you using? I have 2 cards. A sonnet Tempo expresscard and an Iogear eSata expresscard. Both are 2 port cards and I'm using 2 WD 1TB drives. This is on a 2009 Unibody 17" MacBook Pro.
 

johnpublic

macrumors newbie
Aug 2, 2009
7
0
Sacramento, CA
JMicron Chipset

I have the same drives and I updated the drives using the version of the firmware you posted. What eSata card are you using? I have 2 cards. A sonnet Tempo expresscard and an Iogear eSata expresscard. Both are 2 port cards and I'm using 2 WD 1TB drives. This is on a 2009 Unibody 17" MacBook Pro.

At first, was using a Griffin eSATA ExpressCard/34 (http://www.griffintechnology.com/products/esataexpresscard), but learned that its Silicon Image chipset is problematic with Mac 10.5+ OS. Learned that eSATA cards w/ JMicron JMB360 chipset are natively supported by the Mac OS. I bought a PCMC-EXP34-1S2 (http://www.computercablesource.com/pcmcia-expresscard-1x-esata-port-34mm-jmicron-chipset-1686.html) from Computer Cable Source (http://www.computercablesource.com/). Unfortunately, it looks like the two-port eSATA card they sell is based on the Silicon Image chipset. Perhaps a two-port JMicron-based card is available elsewhere.

I see that Sonnet Tech (http://www.sonnettech.com/product/tempo_sata_express34.html)has a warning message on their website for their Tempo SATA ExpressCard/34: "Temporarily not recommended for Mac systems with greater than 2GB of memory." Looks like Iomega's eSATA 3Gbps 2-port ExpressCard/34 (http://www.iogear.com/product/GPS702e3W6/?PHPSESSID=fb059044e229a4d70806379d8660bb10) only supports 10.4 of the Mac OS (on the View All tab, under Requirements). This is consistent with Silicon Image chipsets that don't play well with 10.5+. Griffin tech support confirmed the same challenges.

Griffin Technology recommended, and I agree, that in System Preferences for your Mac, under Energy Saver, UN-check putting the hard disk(s) to sleep when possible.

Hope this helps. Keep us posted on your progress.

(The third party Mac OS drivers for the Silicon Image chipset are old and have not been updated in several years, hence the compatibility issues. Learned all this through troubleshooting and googling.)
 

Carlos E

macrumors 6502
Jun 30, 2007
333
0
NYC
At first, was using a Griffin eSATA ExpressCard/34 (http://www.griffintechnology.com/products/esataexpresscard), but learned that its Silicon Image chipset is problematic with Mac 10.5+ OS. Learned that eSATA cards w/ JMicron JMB360 chipset are natively supported by the Mac OS. I bought a PCMC-EXP34-1S2 (http://www.computercablesource.com/pcmcia-expresscard-1x-esata-port-34mm-jmicron-chipset-1686.html) from Computer Cable Source (http://www.computercablesource.com/). Unfortunately, it looks like the two-port eSATA card they sell is based on the Silicon Image chipset. Perhaps a two-port JMicron-based card is available elsewhere.

I see that Sonnet Tech (http://www.sonnettech.com/product/tempo_sata_express34.html)has a warning message on their website for their Tempo SATA ExpressCard/34: "Temporarily not recommended for Mac systems with greater than 2GB of memory." Looks like Iomega's eSATA 3Gbps 2-port ExpressCard/34 (http://www.iogear.com/product/GPS702e3W6/?PHPSESSID=fb059044e229a4d70806379d8660bb10) only supports 10.4 of the Mac OS (on the View All tab, under Requirements). This is consistent with Silicon Image chipsets that don't play well with 10.5+. Griffin tech support confirmed the same challenges.

Griffin Technology recommended, and I agree, that in System Preferences for your Mac, under Energy Saver, UN-check putting the hard disk(s) to sleep when possible.

Hope this helps. Keep us posted on your progress.

(The third party Mac OS drivers for the Silicon Image chipset are old and have not been updated in several years, hence the compatibility issues. Learned all this through troubleshooting and googling.)
The issue I was having is that the Western Digital Mybook has drive sleep written into the firmware and 10.5 will not over ride the sleep with the energy saver preference telling the drives not to sleep.

I found this work around. I wrote a script that looks at a hidden file on the WD drive every 5 minutes. Since it's getting activity every 5 minutes it doesn't allow the drive to sleep. I followed the instructions and got it working.

http://www.macosxhints.com/article.php?story=20090316190817357
 

johnpublic

macrumors newbie
Aug 2, 2009
7
0
Sacramento, CA
The issue I was having is that the Western Digital Mybook has drive sleep written into the firmware and 10.5 will not over ride the sleep with the energy saver preference telling the drives not to sleep.

I found this work around. I wrote a script that looks at a hidden file on the WD drive every 5 minutes. Since it's getting activity every 5 minutes it doesn't allow the drive to sleep. I followed the instructions and got it working.

http://www.macosxhints.com/article.php?story=20090316190817357

Yes, I was having the same problem and was using the same fix until I upgraded the WD firmware. The upgrade permanently fixed my problem and negated the need for me to periodically "touch" a file on the WD. Glad you found a solution that works.
 

Carlos E

macrumors 6502
Jun 30, 2007
333
0
NYC
Yes, I was having the same problem and was using the same fix until I upgraded the WD firmware. The upgrade permanently fixed my problem and negated the need for me to periodically "touch" a file on the WD. Glad you found a solution that works.
It did not work for me.
 

Carlos E

macrumors 6502
Jun 30, 2007
333
0
NYC
Yes, I was having the same problem and was using the same fix until I upgraded the WD firmware. The upgrade permanently fixed my problem and negated the need for me to periodically "touch" a file on the WD. Glad you found a solution that works.

I installed snow leopard. The western digital drives have been stable and wake from sleep since running snow leopard. I don't know if it's the WD firmware update or the combination of both, but the drives have been stable since this weekend.

The ESATA drivers however only load when running snow leopard in 32 bit. I've booted in 64bit and the finder shows there is a card inserted but the drivers do not load or mount the ESATA drives.
 

seim

macrumors newbie
Mar 26, 2010
2
0
I'd the same issue that the MyBook (II) was shutting down after 10min of inactivity.

I've created a cronjob as you told and since that the harddrive was awake 24h a day.
Then I've tried to limit the awake-job from 12:00 till 24:00 (that's a bit more than I'm at home and awake) but nothing happened. It was still running permanently - so now I removed the whole cronjob for testing and (!) it still doesn't shutdown it's like the cronjob is still running but the config-file is totally empty!

Mac Mini ; Snow Leopard
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.