I have a large external drive, that contains several hundred thousand photos connected to my Mac Studio, running MacOS 12.6 I’ve just noticed that Spotlight isn’t indexing it. When I look in System Preferences → Spotlight → Privacy, the drive in question is not listed, so there’s no reason that it shouldn’t be indexing.
How can I enable Spotlight searching for this drive? (I’ve searched the internet, and not come up with a solution.)
launch Terminal.app
from man tmutil # tmutil removeexclusion [-pv] item ...
Configure Time Machine to back up a file, directory, or volume during future backups.
Many things can cause Spotlight to misbehave. For instance, it refuses to index a clone — a drive that has been duplicated with a utility such as SuperDuper. To fix the problem, you need to deal with two invisible files on the problem drive. (To toggle them visible/invisible type Shift-CMD-period at any time in Finder.)
Step 1. Delete this file:
.metadata_never_index_unless_rootfs.
You will see it in the drive’s root (top) level. Step 2. Edit this file:
VolumeConfiguration.plist
You will see it inside the folder named /.Spotlight-V100. Use a text editor (NOT a word processor!) such as BBEdit to replace these lines
Step 3. Eject the drive, then remount it. (System reads these files only once, at the time of mounting.)
Performing Step 1 without Step 2 has no effect.
Performing Step 2 without Step 1 has no effect.
To check for success, launch Terminal, and issue this command: sudo mdutil -a -i on /
It will report which drives have Spotlight enabled and which do not.