Spotlight not indexing external ssd
On my Mac Studio running macOS 12.4, I can't get Spotlight to index any files/folders on an external SSD. When I use Spotlight to search for files, no files on the external drive are listed. Similarly, when I use Finder search no files are listed. I have tried very simple search terms e.g. “the” and various files types I know are on the drive. I have also tried searching the drive itself and “This Mac”. But, no files are found.
Some details:
- The drive is a Samsung 1TB SATA 6Gbps SSD in an enclosure which provides USB3 data at 5Gbps. The enclosure is connected to a Thunderbolt 4 port in my Mac Studio. Finder accesses all files correctly and all apps can open the relevant files on the SSD correctly. That is, all files/folders are accessible.
- The drive is formatted with APFS.
- I have Read & Write permission on the entire drive but “Ignore ownership on this volume” is on.
- Spotlight indexes the internal SSD perfectly.
- It also indexes APFS volumes on an external 2TB HDD perfectly:
- Spotlight updates the index immediately if I change any files on the external HDD.
- The external HDD is in a LaCie enclosure outputting via USB 3.0 to a TB 4 port on the Studio – much the same as the SSD.
- Both the SSD and HDD were erased on another Mac running macOS 10.15 Catalina.
I have tried many ideas:
- Rebuilding Spotlight index as suggested on Apple's Support page (Rebuild the Spotlight index on your Mac - Apple Support). That failed with this error:
- I have run First Aid on the drive and the volume inside the drive. Disk utility reported no errors and searching the drive was still not working.
- I tested the drive on my old mid-2011 Mac Mini running OS X 10.13.6. Worked perfectly. Finder search worked on the drive no matter what I did to discourage it.
- I took the drive back to my Mac Studio and plugged it into the original TB4 port – searching not working.
- I turned off file hiding (command-shift-.) and I could see that Spotlight on the Mac Mini had indexed the drive almost immediately after mounting. Back on the Studio, it’s clear that Spotlight is not indexing the drive.
- I tried one of the USB-C ports on the front of the Studio – searching not working.
- I tried a different TB4 port – searching not working.
- I tried to force re-indexing on the external drive with: sudo mdutil -E /Volumes/[external drive]
Result was this: “Error: unknown indexing state.”
- I also tried to force re-indexing of individual files and folders with: mdimport -i /Volumes/[external drive]
Result was nothing – not even an error message.
Does anyone know why this is happening ?
Are there any bugs in macOS Monterey that would cause this problem ?
Could there be something in or about the SSD which is preventing Spotlight from indexing that drive ?
What does “Error: unknown indexing state.” mean ?
Mac Studio, macOS 12.4