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

Stop problematic disk spin-downs System
Ever since I installed Jaguar, I've been having probems with my external firewire EZQuest hard drive spinning down and locking up the finder. The problem is that it would never spin back up, and the only way I could release the finder was to power cycle the drive, which is not good at all. Note that the external FireWire drive would spindown even if I had unchecked 'Put the hard disk to sleep when possible' in the Energy Saver preference panel.

So now I have 10.2.5 and the problem still persists, so I decided to get my hands dirty and do something about it. On the EZQuest support site, they suggested trying this AppleScript from macmaps.com.

To my glee, it worked, but it required running the script after every boot and entering the root password. So I made my first startup script to mimic this function, and it appears to work just fine without having to sudo as root.

A script to prevent hard drive spindown:
  1. Create a folder in /Library/StartupItems/ and name it SpindownFix

  2. Create a text file in /Library/StartupItems/ SpindownFix/ and name it SpindownFix

  3. Add the folowing to the text file:
    #!/bin/sh
    # Prevent hard drives from spinning down unnecessarily
    . /etc/rc.common
    pmset -a spindown 0
  4. Now make it executable with:
    chmod a+x /Library/StartupItems/SpindownFix/SpindownFix
  5. Create another text file in /Library/StartupItems/SpindownFix and name it StartupParameters.plist

  6. Add the following to the text file:
    {
    Description     = "Spindown Fix";
    Provides        = ("No Spindown");
    OrderPreference = "Late";
    }
Upon your next boot, spindown should be disabled totally. To double check, in the terminal enter pmset -g; spindown should now be 0.

I would appreciate if someone would look this over and double check that I didn't do anything bad here...
    •    
  • Currently 1.50 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)
 
[15,662 views]  

Stop problematic disk spin-downs | 11 comments | Create New Account
Click here to return to the 'Stop problematic disk spin-downs' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Stop problematic disk spin-downs
Authored by: BillC on Apr 28, '03 10:45:24AM

I was having this same problem with a Western Digital external,
and on a wild chance I used Cocktail to set the spindown setting
to "never." I think technically that's for the internal system
drive, but since doing so, my external drive has yet to spin
down.



[ Reply to This | # ]
re: Stop problematic disk spin-downs
Authored by: huzzam on Apr 28, '03 08:27:27PM

I *want* my internal ibook drive to spin down, but not the
external firewire ones. Anyone know how to accomplish this?

peter



[ Reply to This | # ]
re: Stop problematic disk spin-downs
Authored by: impossiblerobert on Apr 29, '03 04:15:38PM

Below is the man page for pmset, I can't find a way to adjust
only one drive, but on a laptop, you might want replace the -a
flag in my tip to -c which should allow the drives to spin down
when you are on battery power.

-----------

NAME
pmset - modify power management settings

SYNOPSIS
pmset [-a | -b | -c] [dim minutes] [spindown minutes]
[sleep minutes]
[womp 1/0] [ring 1/0] [autorestart 1/0] [dps 1/0]
[reduce 1/0]
[boot] [powerbutton 1/0]
pmset -g [disk | live | cap]

DESCRIPTION
pmset changes and reads power management settings such
as idle sleep tim-
ing, wake on administrative access, automatic restart on
power loss, etc.

SETTING
The -a, -b, -c flags determine whether the settings apply to
battery
(-b), charger (wall power) (-c), or all (-a).

Use a minutes argument of 0 to set the idle time to never.

pmset must be run as root.

The boot argument tells power management that system
bootup is complete.
Loginwindow handles this on a normal Mac OS X system.

GETTING
The -g flag outputs the settings currently in use (same as -g
live ). -g
disk will tell you the settings on disk. -g cap will tell you
which



[ Reply to This | # ]
Stop problematic disk spin-downs
Authored by: jimhoyt on May 01, '03 11:53:34PM

I've got 2 external firewire drives that I need to keep spinning. I'm pretty sure this has been covered before but a cron entry of

*/5 * * * * ls /Volumes/volumename > /dev/null

will list the top directory to the bit bucket every 5 minutes.

Works for me...



[ Reply to This | # ]

Stop problematic disk spin-downs
Authored by: tootired on Oct 19, '04 02:03:06PM

Hi !

What about that (only for UNIX folks):

The following crontab entry reads the very first byte from the external harddisk every 10 minutes (direct from the drive, not from the cache, no writes to disk, just real disk reads):

*/10 * * * * /usr/bin/hexdump -n 1 </dev/rdisk1 >/dev/null 2>&1

dont mix "<" and ">" or you are lost !!
always make backups !!
read the man pages !!

Instead of "/dev/rdisk1" use the UNIX raw character device name used for your external hard disk. You can find out that with:

$ mount|grep your_volume_name
/dev/disk1s10 on /Volumes/your_volume_name (local, journaled)


Instead of the (buffered) block device "/dev/disk1s10" you take the raw character device "/dev/rdisk1" (note the "r" before the name and omit slice "s10" from it).

(No warranties; seems to work for me - at least doing no harm: use at your own risk!!)

Hans



[ Reply to This | # ]
Stop problematic disk spin-downs
Authored by: MogwaiSC on Jan 17, '04 01:33:55AM

I am running 10.3.2 and tried this hint exactly as described. Upon using pmset -g to check the spindown time after a reboot, spindown time was set to 10. So, clearly this hint is broken for 10.3 (.2 anyway).

However, I did a manual change in Terminal to "spindown 0" which survived a reboot. As such it would seem this hint is no longer necessary, though I have yet to test the long term effects of this, to see if it indeed does prevent all drives from spinning down. I'll report back later with my findings.

---
Mac OS X; because giving Unix a user friendly GUI was easier than fixing Windows.



[ Reply to This | # ]
Stop problematic disk spin-downs
Authored by: baturjan on Aug 31, '04 05:33:28AM

how do I "manually" change the 10 to a 0 in Terminal??

Thanks



[ Reply to This | # ]
Stop problematic disk spin-downs
Authored by: regulus on Oct 20, '04 12:07:15PM

I just checked my pmset spindown setting on an emac 10.3... it's set to 0. Since I have the "spin down hard drives" unchecked in energy saver, this must make the setting in 10.3 correctly.



[ Reply to This | # ]
Stop problematic disk spin-downs
Authored by: raymondlewisjone on Jan 03, '07 06:56:33AM

Using 1.8Mhz iMac G5 (PPC) OSX 10.4.8

I have a Mad Dog USB Hard Drive Enclosure connected, and up until 2 weeks ago, I did not have any problems leaving it on all the time. Then, it began to sleep every 15 minutes or so. It would freeze my Finder, and force me to have to restart the computer. No fixes in my "Energy Preferences" would work. And the above "SpindownFix" startup item would not (I changed spindown to diskleep, of course because of Tiger). However, the above:

*/5 * * * * ls /Volumes/volumename > /dev/null

worked beautifully. I dowloaded "Cronnix" from MacUpdate.com and added it there (must be admin to ad to system cron jobs).

I spent hours trying to figure this out. Stupid me, I know I should've checked this site for the answer. I have found coutless other answers here.

Thank you all so much



[ Reply to This | # ]
Stop problematic disk spin-downs
Authored by: raymondlewisjone on Jan 17, '07 02:04:15PM
Well, just to let everyone know.

Check out http://software.electriceelprod.com

I have an app there that fixies this problem.

[ Reply to This | # ]
Stop problematic disk spin-downs
Authored by: scottdb on Jan 18, '07 08:45:14AM

I use a cron script to touch an invisible file that I've placed on each of my three external drives. Works like a champ.

You can use CronniX to easily set this up to run every 20 mininutes or whatever.

/usr/bin/touch /Volumes/extra/.nospin.txt >&2 /dev/null



[ Reply to This | # ]