External hard drive keeps waking up
July 7, 2008 2:15 PM   Subscribe

Why does my external hard drive (OS X) keep spinning up?

I have a Mac Mini connected to a Lacie external hard drive. I've had them for about a year and a half, but about two weeks ago, the hard drive started spinning up every two minutes or so. All the time. How should I go about investigating this?
posted by one_bean to Computers & Internet (15 answers total) 2 users marked this as a favorite
 
It's probably a file access to something on that drive. If you can get the timing right, using the lsof command should discover what process is reading or writing to that disk.
posted by mkb at 2:29 PM on July 7, 2008


Did you enable "time machine" using that drive? I did recently, and that drive talks to itself all the time now.
posted by gyusan at 2:47 PM on July 7, 2008


Response by poster: Still running Tiger, no Time Machine.

lsof looks like the right track -- is there an option to output only files in use on a specific drive?
posted by one_bean at 2:53 PM on July 7, 2008


Do you have Google Desktop or Spotlight indexing the drives? (Check System Prefs)

Do you have a Mozy account? (I forgot about mine and couldn't figure out why something I was doing slowed down.)
posted by Fuzzy Skinner at 3:06 PM on July 7, 2008


Check Spotlight preferences and make sure under the "Privacy" tab that the external drive is listed to be excluded from Spotlight searches (a good solution if you're using the external as backup only; not a good solution if you need to run Spotlight on the external).
posted by webhund at 3:07 PM on July 7, 2008


Response by poster: I like the Spotlight idea -- it won't let me exclude anything on the drive (which makes me think it's not indexing it), but I do have an alias to that drive in another folder on the main drive. I excluded that. Guess I'll twiddle my thumbs for awhile and see if it starts up again.
posted by one_bean at 3:17 PM on July 7, 2008


is there an option to output only files in use on a specific drive?

"lsof | grep DRIVENAME", where DRIVENAME is the name of the drive as represented in /Volumes/. But, something like spotlight won't show up this way.
posted by advil at 3:34 PM on July 7, 2008


Best answer: You might want run lsof with the "-r" opotion. This will repeatedly call lsof and can help you catch something that accesses a file only periodically

lsof -r | grep DRIVENAME > files.txt

You can then review the text file called files.txt to check out the results.

control-c will stop the collection of the data and get you back to the command prompt
posted by bottlebrushtree at 4:25 PM on July 7, 2008 [1 favorite]


Response by poster: Still spinning after the Spotlight attempt. I'll let the lsof command run for a while (thanks! Seems like I use *nix just enough to remember and promptly forget the grep command). Are there other services like Spotlight that won't show up under lsof?
posted by one_bean at 5:09 PM on July 7, 2008


Are there other services like Spotlight that won't show up under lsof?

Spotlight will show up in some form (I don't know exactly what the process name would be) under bottlebrushtree's version, when it is accessing the drive; I just meant that because it might not access the drive continuously, the odds are you wouldn't see it on a single run of lsof (I didn't know about the -r option).
posted by advil at 5:19 PM on July 7, 2008


Response by poster: Argh. It's still spinning up, but nothing shows up in lsof. I did test the command ahead of time by accessing some files on the drive, which did appear under the command, but since then it's been spinning up all night and nothing reported. Anything else I can try? Thanks for all the help so far.
posted by one_bean at 10:44 AM on July 8, 2008


Best answer: Adding a volume to the Privacy settings for Spotlight creates a file '_exclusions.plist' in the volume's '.Spotlight-V100' directory
e.g.
/Volumes/Your_hard_drive/.Spotlight-V100/Store-V1/Exclusions.plist

Therefore every time spotlight starts up, it will read that file, realise theres nothing to do and immediately stop, of course reading that one file will spin up the drive and it will continue spinning for 10 minutes until power saving spins it down again.

Therefore I think you have 2 choices, either unmount the drive when you don't want to use it, by ejecting it in finder or disable Spotlight completely, this page has a bunch of tips about disabling and Rebuilding Spotlight indices
posted by Lanark at 3:20 PM on July 8, 2008


Response by poster: Marked best answers as the most likely to help other people with the same problem. Hard drive is still spinning up, so I'm just ejecting it and re-mounting (through the disk utility) when I need it. Frustrating, but better than nothing.
posted by one_bean at 1:15 PM on July 9, 2008


Response by poster: ...and thanks for all the great suggestions.
posted by one_bean at 1:15 PM on July 9, 2008


It's Spotlight. I have all my external drives excluded for just this reason. I'm hoping it gets fixed soon. I've filed a bug with Apple for it, but can't really tell what's going on with it. It's pretty prevalent, though, so my hopes are high.
posted by CipherSwarm at 1:46 PM on July 9, 2008


« Older DIY pedicure   |   Random acts of violins Newer »
This thread is closed to new comments.