Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have a 2TB external drive I use for Time Machine. At random intervals, it will decide to spin up and my entire UI freezes until it's finished. This is incredibly annoying.

It appears that this is due to Spotlight indexing. They suggest adding the Backup drive to Spotlight's blacklist, so I did:

fffffffuuuuuuuuu

Am I stuck having to live with constant beach ball attacks?

Update: I've already tried mdutil. It doesn't work.

$ sudo mdutil -E -i off /Volumes/Backup/Backups.backupdb/
Password:
/Volumes/Backup/Backups.backupdb:
    Indexing enabled.

If it's impossible to disable indexing, I would settle for making the backup drive never spin down.

share|improve this question
    
"Your entire UI freezes" doesn't sound right. It's true that anything that accesses the drive will have to wait for it to spin up, but the Spotlight indexer is a background process which the UI shouldn't be waiting for. Is it possible that there is something other than Spotlight which is using the drive? –  Kevin Reid Dec 3 '11 at 17:52
    
@Kevin I agree, it makes no sense. But it isn't limited to any particular app, and frequently occurs when doing something that has nothing to do with the backup drive whatsoever. The drive simply decides at random intervals that it needs to spin up, and whatever I am doing freezes until it completes. –  Adam Lassek Dec 6 '11 at 1:41
    
Did you (or anyone else) ever find a solution to this problem? –  Hemm Oct 16 at 19:02
    
@Hemm no, I had to resort to ejecting the drive when I wasn't backing up to keep it from freezing my UI. Pretty lame. –  Adam Lassek Oct 19 at 3:25

3 Answers 3

Here's the man page for mdutil:

mdutil(1) BSD General Commands Manual

NAME mdutil -- manage the metadata stores used by Spotlight

SYNOPSIS mdutil [-pEsav] [-i on | off] mountPoint ...

DESCRIPTION The mdutil command is useful for managing the metadata stores for mounted volumes.

 The following options are available:

 -p  Spotlight caches indexes of some network devices locally.  This option requests that a local
     caches be flushed to the appropriate network device.

 -E  This flag will cause each local store for the volumes indicated to be erased.  The stores will
     be rebuilt if appropriate.

 -i on | off
     Sets the indexing status for the provided volumes to on or off.  Note that indexing may be
     delayed due to low disk space or other conditions.

 -s  Display the indexing status of the listed volumes.

 -a  Apply command to all volumes.

 -v  Print verbose information when available.

I would use:

mdutil -E -i off [the mountpoint for your backup drive]

share|improve this answer
1  
I've already stated that mdutil leaves Backups.backupdb enabled no matter what. Did you try it? –  Adam Lassek Oct 29 '11 at 0:20

Create an empty file on the root of that drive, named .metadata_never_index. This Mac OS X Hints article says more.

share|improve this answer
    
Did you try it? Because mdutil says Backups.backupdb is still being indexed. –  Adam Lassek Oct 29 '11 at 0:15
    
Yes. On a flash drive, a camera flash-card and two .dmgs. It works on all of them. –  JRobert Oct 30 '11 at 0:15
    
it appears that Time Machine backups are a special case. –  Adam Lassek Oct 31 '11 at 18:34

Do it from Terminal via sudo (info courtesy this page):

sudo mdutil -a -i off

You'll also need to supply your admin password.

Similarly, to turn back on:

sudo mdutil -a -i on

Note: Set the items for Spotlight to show at Prefs > Spotlight

share|improve this answer
1  
You probably should include a command for turning it back on. –  daviesgeek Oct 28 '11 at 21:14
    
mdutil also refuses to turn off Time Machine indexing. –  Adam Lassek Oct 28 '11 at 21:15
    
@daviesgeek, good point - I thought it would be reasonably obvious (and was covered in the article) –  JW8 Oct 28 '11 at 21:18
    
You shouldn't turn spotlight off for your main drive unless you know the consequences, such as App Store upgrades will never work again, email searches won't work (if using Apple Mail), etc. Spotlight is a real nuisance but required by the OS for a number of things. –  kakubei Sep 10 '13 at 14:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.