How to stop Spotlight from searching an NTFS partition?

Hi everyone,

I used bootcamp and installed Windows XP. But this obviously slowed down my Spotlight searching a LOT. I want to exclude the Windows partition from being searched. Is there a way to do so? I tried the system preference -- privacy part, doesn't seem to work.

Thanks.

MacBook Pro 2.0GHz, Mac OS X (10.4.6)

Posted on Apr 21, 2006 2:36 PM

Reply
8 replies

Jun 22, 2006 1:12 PM in response to haginile

here's your answer. this works.

let's say your windows partition is called "XPpro"....

fire up Terminal and enter the following.

sudo mdutil -i off /Volumes/XPpro
sudo mdutil -E /Volumes/XPpro
sudo mdutil -s /Volumes/*

the first command turns off spotlight indexing on this volume. the second command would rebuild the index (if on) but since we just turned it off with the first command, now the second command deletes the index file.
the third command lists the spotlight indexing status of all connected volumes.

cheers

Jul 12, 2006 9:39 PM in response to mrichmon

One way to get prevent spotlight from searching an NTFS partition is to prevent the partition from being mounted in the first place. For me, I have an external USB/Firewire drive that has an NTFS partition named "WINDOWS" and a FAT32 partition named "DATAXCHANGE".

I want to be able to plug in the drive and access the DATAXCHANGE partition without having to sit through spotlight traversing the WINDOWS partition. In my case, I can prevent the WINDOWS partition from ever mounting by editing the file /etc/fstab and adding the following line:

LABEL=WINDOWS none ntfs ro,noauto 0 2

The fstab controls which filesystems are mounted, where they are mounted and with which options. In this case, I've said that any filesystem with the label "WINDOWS" should not be mounted by specifying "noauto".

After adding the line to fstab I can umount the drive and then plug it back in and only the DATAXCHANGE partition will mount.

In my situation there is one drawback to this. Since I have Windows installed on a USB drive, I need to use the Startup Disk preference pane to force the machine to boot into Windows. If I do not have the WINDOWS partition mounted I cannot select that partition as the boot disk.

Mac OS X (10.4.3)

Mac OS X (10.4.3)

Mac OS X (10.4.3)

Jul 13, 2006 1:04 AM in response to mrichmon

After a bit of poking around I've found a way to prevent Spotlight from indexing an NTFS partition when the partition is mounted while still allowing the Startup Disk preference pane to see the Windows partition and allow selection of Windows.

The solution is to create a .Spotlight-V100 file on the NTFS partition so that Spotlight thinks it has already indexed the partition but cannot write to the index. The result is that Spotlight aborts the index creation. The tricky part is that OS X cannot write to NTFS partitions and Windows refuses to let you create a file or directory if the name starts with a '.' character.

Instead, you can create an empty file in OS X with the correct name then zip up the file and transfer it to a Windows machine (or reboot into Windows) and then unzip the archive into the root of the NTFS partition.

You can use TextEdit to create an empty file in OS X and then archive the file using the finder, or you can open the Terminal and use the following commands to create the zip file:

cd ~/Desktop
touch .Spotlight-V100
zip spotlight.zip .Spotlight-V100
rm .Spotlight-V100


Copy the zip file to somewhere that you can access from Windows. Boot into Windows and unzip the zip file into the top level of your NTFS partition. Next time you boot into OS X Spotlight will not index the NTFS partition.

Mac OS X (10.4.3)

Aug 24, 2006 9:50 AM in response to Yer_Man

My 2 cents

Apparently the trick is to add the volume to the
privacy pane in the Spotlight PreferencePane
while it is indexing...

Regards

TD


I'm guessing this would work as it is what I have to do to every drive I hook up to my machine that I do editing on. I do NOT want ANY drive indexed by Spotlight except the start up volume. There is no way to set this. A MAJOR FLAW! Why on earth would I want to index drives that have temporary data (video and audio clips) when as soon as the project is completed the whole thing is getting deleted? I have indexes for more than a dozen drives where the disc has been wiped. This is becoming bloatware!

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to stop Spotlight from searching an NTFS partition?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.